Bug 619063

Summary: Desktop pauses while the kernel swapping-out to the (encrypted) swap partition
Product: [Fedora] Fedora Reporter: Roland Pallai <dap78>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 13CC: anton, dougsland, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-30 23:02:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roland Pallai 2010-07-28 13:40:00 UTC
Description of problem:
On high order memory allocations kswapd evicts a lot of pages to the encrypted swap sometimes what causes long desktop pauses (mouse cursor, music playing stops). The system completely unusable until the hard disk has been flushed everything to the swap. The pause can be really long, up to 1 minute.

(The high order allocation because of cifs, see bug#617795)

I've vm.swappiness=0 and vm.min_free_kbytes=67584 setting in /etc/sysctl.conf. Swap is on LVM top of dm-crypt top of a high-performance SSD disk.

I'd like to hear flawless music playing under the swapping-out too.


Version-Release number of selected component (if applicable):
2.6.33.6-147.fc13.x86_64


How reproducible:
Make swap, fill the memory with usual memory-hungry desktop applications like gimp, firefox, netbeans, openoffice, make the free memory fragmented with updatedb and then try to allocate some high order pages (eg.: modprobe cifs CIFSMaxBufSize=128000). The desktop will freeze for a while.

If I remember correctly this issue doesn't depend on the encryption.


Additional info:

dstat log is at https://bugzilla.redhat.com/attachment.cgi?id=434098

cryptsetup status:
 /dev/mapper/luks-6eb56688-2689-49f6-8de4-6b30a0fb7cf2 is active:
  cipher:  aes-cbc-essiv:sha256
  keysize: 128 bits
  device:  /dev/sda2
  [...]

Comment 1 Roland Pallai 2011-03-30 23:02:20 UTC
I think this problem has been solved by upstream in kernel 2.6.38 as memory compaction replaced lumpy reclaim.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3e7d344970673c5334cf7b5bb27c8c0942b06126