[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#628718: linux-2.6: Swap on encrypted volume slows system to a crawl (not explicable by encryption overhead)



+1 on this problem, im experiencing the same thing :(

Server swaps out, and I get this for 10+ minutes..

top - 22:44:01 up 22:52, 10 users,  load average: 20.62, 12.75, 6.58
Tasks: 394 total,   2 running, 392 sleeping,   0 stopped,   0 zombie
Cpu0 : 24.7%us, 27.0%sy, 0.0%ni, 0.0%id, 31.9%wa, 0.0%hi, 16.4%si, 0.0%st Cpu1 : 8.3%us, 7.9%sy, 0.0%ni, 39.4%id, 44.4%wa, 0.0%hi, 0.0%si, 0.0%st Cpu2 : 9.3%us, 32.1%sy, 0.0%ni, 46.7%id, 11.9%wa, 0.0%hi, 0.0%si, 0.0%st Cpu3 : 3.3%us, 14.7%sy, 0.0%ni, 50.5%id, 31.3%wa, 0.0%hi, 0.3%si, 0.0%st
Mem:  13358940k total, 13230432k used,   128508k free,   652296k buffers
Swap:  1048568k total,   612468k used,   436100k free,  5717792k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2264 root      20   0     0    0    0 R   51  0.0  40:31.93 [kcryptd]
 1531 root      20   0     0    0    0 S   20  0.0   1:26.13 [kcryptd]

Total DISK READ: 46.47 M/s | Total DISK WRITE: 21.82 M/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
 6377 be/4 foxx        4.98 M/s    6.84 K/s  0.00 % 99.99 % lb.prod
 6378 be/4 foxx        7.29 M/s   10.26 K/s  0.00 % 99.99 % lb.prod
 6352 be/3 root        2.01 M/s    0.00 B/s  0.00 % 99.94 % lb.admin
 6376 be/4 foxx        6.21 M/s    0.00 B/s  0.00 % 99.91 % lb.prod
 6379 be/4 root     1347.58 K/s    0.00 B/s  0.00 % 98.78 % lb.flip
 6381 be/4 root      947.41 K/s   13.68 K/s  0.00 % 97.21 % lb.monitor

Total DISK READ: 55.43 M/s | Total DISK WRITE: 0.00 B/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
 2270 be/3 root        0.00 B/s   43.43 K/s  0.00 % 99.99 % [jbd2/dm-5-8]
 6376 be/4 foxx       10.77 M/s   43.43 K/s  0.00 % 96.70 % lb.prod
 6377 be/4 foxx        6.07 M/s    0.00 B/s  0.00 % 91.63 % lb.prod
 6352 be/3 root      390.88 K/s    0.00 B/s  0.00 % 91.08 % lb.admin
 6379 be/4 root      390.88 K/s    0.00 B/s  0.00 % 88.48 % lb.flip
 6378 be/4 foxx        8.06 M/s    0.00 B/s  0.00 % 83.85 % lb.prod
 6375 be/4 foxx        8.31 M/s    0.00 B/s  0.00 % 79.33 % lb.prod
 2262 be/4 root        0.00 B/s    0.00 B/s  0.00 % 17.45 % [kdmflush]
 1390 be/4 root        0.00 B/s    0.00 B/s  0.00 %  9.54 % [kdmflush]



On 31/05/2011 17:37, SirJective wrote:
Package: linux-2.6
Version: 2.6.38-2
Severity: important


I'm using swap space on an LVM volume on a LUKS-encrypted partition.
Swapping is ridiculously slow (<  1MB/s) whenever I swap to either the encrypted
swap partition, or some file inside an encrypted partition.
It is reasonably fast when swapping to a file on an unencrypted partition.

Normal writes (file copying, dd if=/dev/zero, etc) to the encrypted partition are
reasonably fast (~30MB/s), so the CPU overhead caused by encryption
cannot account for this.

[I posted a similar bug for 2.6.32 to the linux-image-*-686 package in squeeze, which
was probably a bad idea, so I'm posting this to the linux-2.6 source package,
where all the other bugs are posted.]

The real-world impact is that, for example, when I open a huge image in iceweasel
with other stuff already open in the background, the system virtually freezes
up for 15 minutes or more.



-- System Information:
Debian Release: wheezy/sid
   APT prefers testing
   APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash







Reply to: