You are not logged in.

#1 2013-09-20 12:21:15

alesssia
Member
Registered: 2013-01-16
Posts: 12

[Solved] System freezes when starts to swap

Hi!

I'm running a x86_64 Arch Linux (kernel  3.11.1-1-ARCH, packages updated daily) on a MacBookPro (5.1, late 2008) and I'm experiencing system's freezings (no activity at all, only the mouse works).  
I think freezings happen when I'm over 99% of RAM usage and the system starts to swap. This agrees with the vm.swappiness parameter (set to 1 in /etc/sysctl.d/99-sysctl.conf).  I have 2GB of RAM and a 4GB swap file and the problem started a couple of weeks ago.

I googled the problem and had a look to this forum discovering that I'm not the only one facing this issue. Anyway, all proposed  solutions did not work for me.
According to smartctl my HD is fine, and one of the proposed cause of the issue (zramswap.service) is not enable on my system.
Elsewhere it has been suggested that the responsible of such behaviour is the  nvidia 325.* driver, but also to disable the MSI scheme (as suggested) had not effect.

Does anyone have any suggestion?
Thank in advance for any help I can get!
Alessia

Last edited by alesssia (2013-09-20 15:51:49)

Offline

#2 2013-09-20 12:26:40

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] System freezes when starts to swap

Have you tried things like zswap https://bbs.archlinux.org/viewtopic.php?pid=1326576 ?

It doesn't solve the problem, but might help a bit.

Offline

#3 2013-09-20 13:04:31

alesssia
Member
Registered: 2013-01-16
Posts: 12

Re: [Solved] System freezes when starts to swap

karol wrote:

Have you tried things like zswap https://bbs.archlinux.org/viewtopic.php?pid=1326576 ?.

Thanks for the reply, but I read somewhere (I cannot find the link now) that the zramswap.service may lead to these freezings.
I'm a bit puzzled now... shall I activate the service? Will it lead to a even worse situation?

Offline

#4 2013-09-20 13:11:22

jdarnold
Member
From: Medford MA USA
Registered: 2009-12-15
Posts: 485
Website

Re: [Solved] System freezes when starts to swap

Do you mean your system completely locks up and you have to reboot? Or does it just go into a long "hang" state, and then recovers? If the latter, then I think that's as good as you'll get. Swapping to the hard drive is a long and slow process and there just isn't much you can do to speed it up, besides getting a faster (ie, SSD) hard drive. Or just get more RAM.

Offline

#5 2013-09-20 13:17:37

alesssia
Member
Registered: 2013-01-16
Posts: 12

Re: [Solved] System freezes when starts to swap

It hangs for a while, then recovers. It's not a thrashing problem: just two weeks ago it worked just fine and I did not pickup any  different usage pattern in the meanwhile.

Offline

#6 2013-09-20 13:29:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] System freezes when starts to swap

zramswap and zswap are two different animals.
I had some issues with the former: https://bugs.archlinux.org/task/36574 but I've been using zswap for over a week now and everything's fine.


Getting more RAM or using less RAM - .e.g not opening 20 tabs with multimedia content at once - will surely remedy the situation too.

Offline

#7 2013-09-20 15:01:37

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Solved] System freezes when starts to swap

You might run dstat (e.g. dstat -cdnpmgs --top-bio --top-cpu) to see what your PC is doing when it stops responding (you could paste the output here). Setting swappiness to e.g. 60 might help - then it'd swap out unneeded stuff gradually, not a lot at once when your applications need more memory.

Offline

#8 2013-09-20 15:51:33

alesssia
Member
Registered: 2013-01-16
Posts: 12

Re: [Solved] System freezes when starts to swap

@lucke I set the swappiness to the default value (as you suggested) and stressed a bit the system: so far so good!
Thanks a lot!

Offline

Board footer

Powered by FluxBB