Witaj na Forum Linuxiarzy
Zanim zalogujesz się, by pisać na naszym forum, zapoznaj się z kilkoma zasadami savoir-vivre'u w dziale Administracja.
Wiadomości z problemami zamieszczone w wątku "Przywitaj się" oraz wszelkie reklamy na naszym forum będą usuwane.

Odczyt/zapis szyfrowanego dysku - im nowszy kernel tym wolniejszy?

Zaczęty przez Piotr_1988, Marzec 03, 2020, 07:37:46 PM

Poprzedni wątek - Następny wątek

Piotr_1988

Ponieważ stosuję pełne szyfrowanie dysku, zaciekawiło mnie, jak zmieni się prędkość odczytu/zapisu w zależności od użytego kernela. Testy przeprowadziłem na MX Linux 19.1.

Aby je podsumować trochę czytelniej, przy "standardowym" szyfrowaniu AES-256 (klucz 512-bitowy):






kernelszyfrowanieodszyfrowywanie
5.5.0-5.1-liquorix-amd641650.6-1653.0 MiB/s1666.7-1669.4 MiB/s
5.4.0-3-amd641718.6-1723.1 MiB/s1732.8-1751.4 MiB/s
4.19.0-6-amd641747.4-1752.3 MiB/s1752.8-1758.9 MiB/s

Co się stało? Czy to normalne, że im nowszy kernel tym wolniejszy?

piotr@ThinkPad-E480:~
$ inxi
CPU: Quad Core Intel Core i5-8250U (-MT MCP-) speed/min/max: 3400/400/3400 MHz Kernel: 5.5.0-5.1-liquorix-amd64 x86_64 Up: 1m
Mem: 607.0/15549.4 MiB (3.9%) Storage: 1.14 TiB (3.6% used) Procs: 287 Shell: bash 5.0.3 inxi: 3.0.36
piotr@ThinkPad-E480:~
$ cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1      1337469 iterations per second for 256-bit key
PBKDF2-sha256    1733183 iterations per second for 256-bit key
PBKDF2-sha512    1261824 iterations per second for 256-bit key
PBKDF2-ripemd160  707541 iterations per second for 256-bit key
PBKDF2-whirlpool  536081 iterations per second for 256-bit key
argon2i       5 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id      5 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
#     Algorithm |       Key |      Encryption |      Decryption
        aes-cbc        128b      1019.6 MiB/s      3056.8 MiB/s
    serpent-cbc        128b        83.5 MiB/s       651.0 MiB/s
    twofish-cbc        128b       183.5 MiB/s       344.3 MiB/s
        aes-cbc        256b       777.0 MiB/s      2462.5 MiB/s
    serpent-cbc        256b        87.9 MiB/s       651.1 MiB/s
    twofish-cbc        256b       190.2 MiB/s       344.4 MiB/s
        aes-xts        256b      1856.6 MiB/s      1864.7 MiB/s
    serpent-xts        256b       629.1 MiB/s       620.8 MiB/s
    twofish-xts        256b       341.6 MiB/s       343.6 MiB/s
        aes-xts        512b      1653.0 MiB/s      1669.4 MiB/s
    serpent-xts        512b       631.1 MiB/s       620.9 MiB/s
    twofish-xts        512b       342.4 MiB/s       343.1 MiB/s
piotr@ThinkPad-E480:~
$ cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1      1327311 iterations per second for 256-bit key
PBKDF2-sha256    1839607 iterations per second for 256-bit key
PBKDF2-sha512    1260307 iterations per second for 256-bit key
PBKDF2-ripemd160  707541 iterations per second for 256-bit key
PBKDF2-whirlpool  540503 iterations per second for 256-bit key
argon2i       5 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id      5 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
#     Algorithm |       Key |      Encryption |      Decryption
        aes-cbc        128b      1022.9 MiB/s      3055.8 MiB/s
    serpent-cbc        128b        88.1 MiB/s       650.8 MiB/s
    twofish-cbc        128b       190.2 MiB/s       344.4 MiB/s
        aes-cbc        256b       776.8 MiB/s      2464.8 MiB/s
    serpent-cbc        256b        87.8 MiB/s       649.9 MiB/s
    twofish-cbc        256b       190.1 MiB/s       344.3 MiB/s
        aes-xts        256b      1853.1 MiB/s      1856.9 MiB/s
    serpent-xts        256b       630.6 MiB/s       620.9 MiB/s
    twofish-xts        256b       342.4 MiB/s       343.4 MiB/s
        aes-xts        512b      1650.6 MiB/s      1666.7 MiB/s
    serpent-xts        512b       630.3 MiB/s       620.5 MiB/s
    twofish-xts        512b       341.9 MiB/s       343.3 MiB/s

piotr@ThinkPad-E480:~
$ inxi
CPU: Quad Core Intel Core i5-8250U (-MT MCP-) speed/min/max: 801/400/3400 MHz Kernel: 5.4.0-3-amd64 x86_64 Up: 1m
Mem: 628.0/15614.9 MiB (4.0%) Storage: 1.14 TiB (3.6% used) Procs: 237 Shell: bash 5.0.3 inxi: 3.0.36
piotr@ThinkPad-E480:~
$ cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1      1426634 iterations per second for 256-bit key
PBKDF2-sha256    1892736 iterations per second for 256-bit key
PBKDF2-sha512    1363557 iterations per second for 256-bit key
PBKDF2-ripemd160  759837 iterations per second for 256-bit key
PBKDF2-whirlpool  583839 iterations per second for 256-bit key
argon2i       6 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id      6 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
#     Algorithm |       Key |      Encryption |      Decryption
        aes-cbc        128b      1024.3 MiB/s      3068.3 MiB/s
    serpent-cbc        128b        76.9 MiB/s       651.9 MiB/s
    twofish-cbc        128b       181.5 MiB/s       346.0 MiB/s
        aes-cbc        256b       777.6 MiB/s      2473.5 MiB/s
    serpent-cbc        256b        87.6 MiB/s       651.9 MiB/s
    twofish-cbc        256b       190.7 MiB/s       345.9 MiB/s
        aes-xts        256b      1926.9 MiB/s      1906.1 MiB/s
    serpent-xts        256b       629.8 MiB/s       620.3 MiB/s
    twofish-xts        256b       344.6 MiB/s       345.3 MiB/s
        aes-xts        512b      1723.1 MiB/s      1751.4 MiB/s
    serpent-xts        512b       630.8 MiB/s       621.5 MiB/s
    twofish-xts        512b       344.4 MiB/s       345.2 MiB/s
$ cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1      1426634 iterations per second for 256-bit key
PBKDF2-sha256    1896159 iterations per second for 256-bit key
PBKDF2-sha512    1361787 iterations per second for 256-bit key
PBKDF2-ripemd160  759837 iterations per second for 256-bit key
PBKDF2-whirlpool  583190 iterations per second for 256-bit key
argon2i       6 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id      6 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
#     Algorithm |       Key |      Encryption |      Decryption
        aes-cbc        128b      1018.4 MiB/s      3022.0 MiB/s
    serpent-cbc        128b        86.9 MiB/s       649.7 MiB/s
    twofish-cbc        128b       190.0 MiB/s       344.5 MiB/s
        aes-cbc        256b       774.2 MiB/s      2450.7 MiB/s
    serpent-cbc        256b        87.0 MiB/s       649.8 MiB/s
    twofish-cbc        256b       190.0 MiB/s       344.7 MiB/s
        aes-xts        256b      1910.9 MiB/s      1888.2 MiB/s
    serpent-xts        256b       626.9 MiB/s       616.5 MiB/s
    twofish-xts        256b       343.2 MiB/s       343.8 MiB/s
        aes-xts        512b      1718.6 MiB/s      1732.8 MiB/s
    serpent-xts        512b       626.7 MiB/s       616.9 MiB/s
    twofish-xts        512b       343.2 MiB/s       343.6 MiB/s

piotr@ThinkPad-E480:~
$ inxi
CPU: Quad Core Intel Core i5-8250U (-MT MCP-) speed/min/max: 801/400/3400 MHz Kernel: 4.19.0-6-amd64 x86_64 Up: 1m
Mem: 651.1/15575.0 MiB (4.2%) Storage: 1.14 TiB (3.6% used) Procs: 237 Shell: bash 5.0.3 inxi: 3.0.36
piotr@ThinkPad-E480:~
$ cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1      1432480 iterations per second for 256-bit key
PBKDF2-sha256    1885928 iterations per second for 256-bit key
PBKDF2-sha512    1363557 iterations per second for 256-bit key
PBKDF2-ripemd160  760940 iterations per second for 256-bit key
PBKDF2-whirlpool  584490 iterations per second for 256-bit key
argon2i       6 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id      6 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
#     Algorithm |       Key |      Encryption |      Decryption
        aes-cbc        128b      1027.0 MiB/s      3080.1 MiB/s
    serpent-cbc        128b        75.0 MiB/s       655.4 MiB/s
    twofish-cbc        128b       185.8 MiB/s       346.5 MiB/s
        aes-cbc        256b       781.5 MiB/s      2485.8 MiB/s
    serpent-cbc        256b        87.5 MiB/s       654.3 MiB/s
    twofish-cbc        256b       190.4 MiB/s       346.5 MiB/s
        aes-xts        256b      1935.3 MiB/s      1917.0 MiB/s
    serpent-xts        256b       632.1 MiB/s       623.4 MiB/s
    twofish-xts        256b       345.2 MiB/s       345.9 MiB/s
        aes-xts        512b      1752.3 MiB/s      1752.8 MiB/s
    serpent-xts        512b       631.8 MiB/s       622.9 MiB/s
    twofish-xts        512b       344.9 MiB/s       345.7 MiB/s
piotr@ThinkPad-E480:~
$ cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1      1416994 iterations per second for 256-bit key
PBKDF2-sha256    1896159 iterations per second for 256-bit key
PBKDF2-sha512    1363557 iterations per second for 256-bit key
PBKDF2-ripemd160  755458 iterations per second for 256-bit key
PBKDF2-whirlpool  583839 iterations per second for 256-bit key
argon2i       6 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id      6 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
#     Algorithm |       Key |      Encryption |      Decryption
        aes-cbc        128b      1028.1 MiB/s      3082.4 MiB/s
    serpent-cbc        128b        87.4 MiB/s       656.7 MiB/s
    twofish-cbc        128b       189.8 MiB/s       346.8 MiB/s
        aes-cbc        256b       781.3 MiB/s      2497.2 MiB/s
    serpent-cbc        256b        87.5 MiB/s       656.9 MiB/s
    twofish-cbc        256b       190.9 MiB/s       346.6 MiB/s
        aes-xts        256b      1939.6 MiB/s      1923.2 MiB/s
    serpent-xts        256b       632.9 MiB/s       626.2 MiB/s
    twofish-xts        256b       345.5 MiB/s       346.3 MiB/s
        aes-xts        512b      1747.4 MiB/s      1758.9 MiB/s
    serpent-xts        512b       633.2 MiB/s       625.3 MiB/s
    twofish-xts        512b       345.0 MiB/s       346.1 MiB/s


EDIT

Sprawdziłem jeszcze nowszy kernel, 5.6.13, tym razem pod Fedora 32. Prędkość znów spadła w porównaniu do starszych kerneli. Potwierdza się zasada "im nowszy tym wolniejszy":








kernelszyfrowanieodszyfrowywanie
5.6.13-300.fc32.x86_641613.7-1639.6 MiB/s1609.5-1650.5 MiB/s
5.5.0-5.1-liquorix-amd641650.6-1653.0 MiB/s1666.7-1669.4 MiB/s
5.4.0-3-amd641718.6-1723.1 MiB/s1732.8-1751.4 MiB/s
4.19.0-6-amd641747.4-1752.3 MiB/s1752.8-1758.9 MiB/s

[piotr@ThinkPad-E480 ~]$ inxi
CPU: Quad Core Intel Core i5-8250U (-MT MCP-) speed/min/max: 800/400/3400 MHz Kernel: 5.6.13-300.fc32.x86_64 x86_64
Up: 6h 21m Mem: 1553.7/15538.0 MiB (10.0%) Storage: 1.14 TiB (4.7% used) Procs: 257 Shell: bash 5.0.11 inxi: 3.1.00
[piotr@ThinkPad-E480 ~]$ cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1      1502257 iterations per second for 256-bit key
PBKDF2-sha256    1906501 iterations per second for 256-bit key
PBKDF2-sha512    1383345 iterations per second for 256-bit key
PBKDF2-ripemd160  781353 iterations per second for 256-bit key
PBKDF2-whirlpool  583190 iterations per second for 256-bit key
argon2i       7 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id      7 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
#     Algorithm |       Key |      Encryption |      Decryption
        aes-cbc        128b       989.5 MiB/s      2778.5 MiB/s
    serpent-cbc        128b        86.5 MiB/s       637.8 MiB/s
    twofish-cbc        128b       189.3 MiB/s       341.0 MiB/s
        aes-cbc        256b       758.3 MiB/s      2286.1 MiB/s
    serpent-cbc        256b        86.5 MiB/s       637.9 MiB/s
    twofish-cbc        256b       189.3 MiB/s       341.0 MiB/s
        aes-xts        256b      1787.9 MiB/s      1809.9 MiB/s
    serpent-xts        256b       618.3 MiB/s       609.2 MiB/s
    twofish-xts        256b       331.9 MiB/s       341.1 MiB/s
        aes-xts        512b      1639.6 MiB/s      1650.5 MiB/s
    serpent-xts        512b       618.1 MiB/s       608.6 MiB/s
    twofish-xts        512b       331.2 MiB/s       340.3 MiB/s
[piotr@ThinkPad-E480 ~]$ cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1      1502257 iterations per second for 256-bit key
PBKDF2-sha256    1909974 iterations per second for 256-bit key
PBKDF2-sha512    1381523 iterations per second for 256-bit key
PBKDF2-ripemd160  781353 iterations per second for 256-bit key
PBKDF2-whirlpool  582542 iterations per second for 256-bit key
argon2i       7 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id      8 iterations, 1048576 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
#     Algorithm |       Key |      Encryption |      Decryption
        aes-cbc        128b       972.4 MiB/s      2689.4 MiB/s
    serpent-cbc        128b        85.5 MiB/s       622.6 MiB/s
    twofish-cbc        128b       189.4 MiB/s       332.0 MiB/s
        aes-cbc        256b       756.1 MiB/s      2247.1 MiB/s
    serpent-cbc        256b        86.5 MiB/s       634.1 MiB/s
    twofish-cbc        256b       185.8 MiB/s       337.2 MiB/s
        aes-xts        256b      1706.7 MiB/s      1763.9 MiB/s
    serpent-xts        256b       613.5 MiB/s       599.6 MiB/s
    twofish-xts        256b       329.4 MiB/s       338.3 MiB/s
        aes-xts        512b      1613.7 MiB/s      1609.5 MiB/s
    serpent-xts        512b       612.6 MiB/s       610.5 MiB/s
    twofish-xts        512b       329.3 MiB/s       333.8 MiB/s
Fedora Silverblue  |  Rocky Linux  |  NomadBSD

Zobacz najnowsze wiadomości na forum