You are not logged in.
Linux BLOZUP 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014 x86_64 GNU/Linux
240GB SSD, encypted with dm-crypt
4GB RAM
No swap
XFCE4 Desktop
Every once and a while it appears that my kernel freezes. Mouse movement grinds to a halt, but occasionally partially responds after 5-50-500s delay. Keypresses are just as slow. When I am able to switch processes/see conky, it's out of memory. I have no swap, and would like to keep it that way as it's an SSD only system. When it does freeze, my BIOS network and disk LEDs are solid for some reason.
I recently swapped the mechanical disk out for an SSD and encrypted it, and I don't recall it happening before that (but am not 100% sure). It's happened about 4 times total now, in the last 3 months. It also might be related to Chromium, as it has been open every time it happens. It's usually after I leave the computer alone for a few hours and come back, the CPU fan is at 100% and it's unresponsive. I've been able to kill off processes manually, but it takes forever to get to that point, so I usually do a hard reboot.
Normally my computer uses about 40% of it's RAM. This is with 4-6 tabs open in Chromium, Geany and/or Eclipse, and a couple terminals. Plus all the background services.
I'd like to setup my system so that if this happens again I'll have some logs of what's taking up so much CPU/memory. Any suggestions? Something like get conky or top to write-out to a file or the system log every 10 minutes or so, rotating as necessary?
Offline
http://techreport.com/review/27436/the- … -petabytes
You could probably set conky to show the most hungry process. You could run something like "dstat -cdnpmgs --top-bio --top-cpu --top-mem". You could enable Magic SysRq and use Alt-Sysrq-f to trigger an oom killer.
Offline
If you run without swap the kernel will refuse to "overcommit" memory and can result in lockups like that, even when you seem to have memory available (although you probably don't want swap on an SSD...)
Offline
If you run without swap the kernel will refuse to "overcommit" memory
Could you elaborate on this? Can you give some example scenarios?
(Afaik, Linux refuses requests that exceed the available memory. So, if you’ve got 4GB RAM + 0 byte swap, a malloc() of 5GB will fail. But if you’ve got 4GB RAM + 2GB swap, then that malloc() will succeed. You could call this “overcommit” since the program requested more memory than you’ve got RAM. Okay. A request of 10GB will still fail, though. On the other hand, nothing stops you from running two processes, each requesting 3GB of RAM without actually using them on a machine with 4GB RAM + 0 byte swap. That’s what I know as “memory overcommit”. Anyway, this might be nitpicking. I’m interested in this topic and I’d love to hear more.)
Offline
finale wrote:If you run without swap the kernel will refuse to "overcommit" memory
Could you elaborate on this? Can you give some example scenarios?
(Afaik, Linux refuses requests that exceed the available memory. So, if you’ve got 4GB RAM + 0 byte swap, a malloc() of 5GB will fail. But if you’ve got 4GB RAM + 2GB swap, then that malloc() will succeed. You could call this “overcommit” since the program requested more memory than you’ve got RAM. Okay. A request of 10GB will still fail, though. On the other hand, nothing stops you from running two processes, each requesting 3GB of RAM without actually using them on a machine with 4GB RAM + 0 byte swap. That’s what I know as “memory overcommit”. Anyway, this might be nitpicking. I’m interested in this topic and I’d love to hear more.)
I'm not very knowledgeable about this subject, but some time ago I had the same problem and had to create a swap file. I suspect you know more about it than I do.
My "explanation" was actually wrong -- by default the kernel will overcommit. Like you said, if programs actually use enough of the memory it will start the OOM killer. (Sorry for the confusion. I'm not usually that careless, but my excuse is that I was interrupted while writing the post .)
However, based on my own experience and from looking around the internet, it seems common for the system to lock up at this point if there is no swap.
Offline
Thanks guys. I upgraded the RAM to the max supported 8GB. It looks like the easiest solution is to set a user memory usage limit of ~7.8GB or so, and maybe modify the OOM killer to just kill the allocating process to avoid an expensive task of heuristically selecting a process to kill.
I just upgraded and changed these settings, so if I don't report back it probably worked.
Last edited by krovisser (2014-12-27 03:43:34)
Offline
I have the same problem and I cannot upgrade my memory. My system is really similar as the OP, but I have gnome-shell as DE and only 128 GB of SSD.
The modification of the OOM killer is not working properly. Any other idea to solve the problem and avoid the creation of the swap file?
Offline
Is creating a swap file such a great problem? You take 1 or 2 GBs out of your SSD, unused stuff gets put there, you get better performance, some additional writes totally shouldn't kill your SSD. It's kinda funny, but on my system with 2 GB of RAM often used swap is greater than used RAM.
If you really don't want a swap file, try zram.
Offline
Is creating a swap file such a great problem? You take 1 or 2 GBs out of your SSD, unused stuff gets put there, you get better performance, some additional writes totally shouldn't kill your SSD. It's kinda funny, but on my system with 2 GB of RAM often used swap is greater than used RAM.
If you really don't want a swap file, try zram.
Well, I have a small SSD (only 128GB) that is shared with window7. So, I don't have much space to take 1 o 2 GB. Furthermore, 4GB of RAM is enough for working, the system is frozen with free memory (normally when it arrives at 3,2GB), so I think it is a bug.
Thanks for the recomendation. I'll go to read about zram.
Offline
I don't think it should totally freeze.
I run without a swap, have for quite some time. have had 2GB, 4GB and now at 8GB Ram.
Sometimes a process has been eating up all the memory (it has been firefox the few times it has happened, some version of it).
What has happened for me is that the system have slowed down for a short while,
and then the firefox process has been automatically killed, and freedom restored.
So i think that is what should happen, it could feel "frozen" for a short bit until it has killed the offending process though
Last edited by PReP (2015-01-22 19:03:47)
. Main: Intel Core i5 6600k @ 4.4 Ghz, 16 GB DDR4 XMP, Gefore GTX 970 (Gainward Phantom) - Arch Linux 64-Bit
. Server: Intel Core i5 2500k @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
. Body: Estrogen @ 90%, Testestorone @ 10% (Not scientific just out-of-my-guesstimate-brain)
Offline
No, I waited lots of minuts and the systems remain frozen when it happens. Is not a short while.
Offline