Virtual Memory limit exhausted at 1TB? malloc/mmap failures even with free memory
Curious,
even with ulimit for virtual mem set to unlimited or 0, I get malloc failures after about 1 TB virtual is exhausted, with malloc size > 128kB that should do a private mmap. Disk-supported mmap still seem to work beyond one terabyte. Anybody encountered similar? Could it be my testing distro is a "desktop" instead of an enterprise version? Many thanks. SuSE Linux Kernel 2.6.37.6-0.20-desktop #1 SMP PREEMPT 2011-12-19 23:39:38 +0100 x86_64 x86_64 x86_64 GNU/Linux 24 GB RAM + 36 GB Swap, 1020 GB can be allocated (of course not used). mmap against some 1TB+ disks in raid, malloc fails with ENOMEM after approx 1TB with 0% swap and 30% ram real usage. Just wondering if anybody has some ideas. I thought the virtual limit to be 128TB, sometimes 64TB, on Intel distros, not just 1TB..... Thanks and Cheers, Martin |
I would be suspecting something like control block shortage. Keep an eye on /proc/meminfo and /proc/slabinfo ("cat" them to disk for later perusal).
There is also slabtop which can be handy in "normal" storage shortages, but don't use it when the system (i.e. kernel controlled) storage is in crisis. Your system might just appear to "go away" - maybe for several hours. |
Thanks, in this case the mem chunks are quite big since I increased them beyond reasonable sizes, so to eliminate control structure shortages.
And found the solution: turn vm overcommit checks completely off, apparently the default heuristics stop at the reasonable size of 1 TB: Code:
echo 1 > /proc/sys/vm/overcommit_memory TOP output Code:
top - 09:13:06 up 1:00, 3 users, load average: 10.34, 7.08, 5.32 Cheers, Martin |
All times are GMT -5. The time now is 08:02 PM. |