You are not logged in.

#1 2014-06-28 09:38:57

Nektarios
Member
Registered: 2013-02-19
Posts: 90

System freezes for long time when swapping

Recently my system got down from 8GB to 4 GB of ram, as I had to return a bad memory stick. Because of that in the last days I experience extreme sloweness down to a crawl when the system runs out of it.

The symptoms are sudden freezing (the whole KDE just freezes, including the mouse pointer) for several (3-20) seconds and then draws a frame or two and then freezes again. This cycle repeats for several minutes (5-10 minutes or more) until I can manage to close a program to free some mem and then the system snaps out of it and everything is back to normal. Needless to say that during this the whole system (desktop, VTs, ssh etc) is completely unresponsive and I can't control it.

This same problem happens even when the memory is not full. For example, if I run vmware workstation and start a guest windows 7 instance then the same thing happens. In this case the memory is 1.5GB of 4GB full and the swap is 1.5GB of 4GB full. There shouldn't be any need to do a swap in this case, but nevertheless is does and it exhibits the same symptoms.

I think this is a bug, as swapping should never cause the system to freeze that badly for so much time, this is completely unbearable and totally unacceptable for me (or for anyone).

I have swappiness=1 and vfs_cache_pressure 100. Is this what is causing the problem? I even tried ck-nehalem kernel but it had the same symptoms. Is this a problem with IO? Swap? Kernel? Somehting else? What should I do?

Last edited by Nektarios (2014-06-28 09:41:13)

Offline

#2 2014-06-28 14:29:38

jwm-art
Member
Registered: 2011-02-01
Posts: 87

Re: System freezes for long time when swapping

Seen similar freezes when running out of partition space too. Are you sure that's not it?

Offline

#3 2014-06-28 14:33:07

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Re: System freezes for long time when swapping

No that's not it, all of my partitions are below 80%, except for one which is a NTFS volume and has nothing to do with the system.

Offline

#4 2014-06-28 16:54:58

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: System freezes for long time when swapping

Nektarios wrote:

I have swappiness=1 and vfs_cache_pressure 100. Is this what is causing the problem?

Try lowering vfs_cache_pressure.

Offline

#5 2014-06-28 18:29:00

jackwild
Member
Registered: 2014-01-15
Posts: 30

Re: System freezes for long time when swapping

It looks like you solved my issue: https://bbs.archlinux.org/viewtopic.php?id=183366

When filling up my memory from the console I got the freeze which has been giving me headaches but I also got a useful error message. "Write error for swap device". Recreating my swap has solved this issue for me ( at least, so far).

I don't know if this will help you as my use case is a bit specific. I was using an encrypted swapfile, using crypttab. I have now switched to a plain partition and it seems to be working so I'll try and narrow down the issue as best I can.

Thanks for this thread as it gave me a way to reproduce my problem reliably.

Offline

Board footer

Powered by FluxBB