You are not logged in.

#1 2014-06-29 18:38:41

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 186

Out of memory when only ~half memory reported used

I own an Asus Zenbook Prime UX31A (with 4Gb RAM, no swap space). Lately I've been running a pretty heavy environment (Gnome 3 with Eclipse, Chromium, Android SDK + emulator, Pidgin), and so I tend to use more RAM than I used to with tiling WMs and terminals. Often when I run a good amount of these programs at the same time, my RAM usage climbs to roughly 2.2 Gb. Around this point, my mouse cursor no longer moves around smoothly and jerks around, and Gnome is completely unresponsive.

If I switch to a virtual terminal (which takes a while to load), sometimes I can log in and kill a process like Chromium to relieve the tension, and sometimes the kernel will report that it "sacrificed a child" by killing a random process, which also seems to work. But sometimes neither of these can happen, and my system freezes, and I am sad.

I thought that maybe it was because my /tmp tmpfs was allocated half of my RAM, but according to the ArchWiki it only uses as much RAM as the files it contains, so that can't be it.

If you need more details, ask and I'll quickly provide them. Thanks.

Last edited by Mindstormscreator (2014-06-29 18:40:03)

Offline

#2 2014-06-29 20:12:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Out of memory when only ~half memory reported used

The output of `cat /proc/meminfo` might be helpful.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-06-29 20:31:06

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 186

Re: Out of memory when only ~half memory reported used

Trilby wrote:

The output of `cat /proc/meminfo` might be helpful.

So I decided to run a test.

watch cat /proc/meminfo >> /tmp/memlog

And then I opened a RAM-hungry Android vm. Here's the resulting MemAvailable right before and after the emulator crashed:

MemAvailable:     142936 kB
MemAvailable:     254392 kB
MemAvailable:     144484 kB
MemAvailable:     178356 kB
MemAvailable:     122980 kB
MemAvailable:     137888 kB
MemAvailable:     109476 kB
MemAvailable:    1600288 kB
MemAvailable:    1625100 kB

So, while gnome-system-monitor only indicated that my system was using 2.2Gb, meminfo says there was only 0.1Gb available when the emulator crashed!
Also, the MemAvailable after the crash is roughly 1.5Gb, whereas gnome-system-monitor reports 3.8-1.4=2.4Gb.

So, is the gnome monitor lying to me or is something else at play?

Offline

#4 2014-06-29 20:52:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Out of memory when only ~half memory reported used

It's hard to say as you didn't actually give any of the useful lines from meminfo.  Just run it once, and post the actual output.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2014-06-29 20:56:28

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 186

Re: Out of memory when only ~half memory reported used

Trilby wrote:

It's hard to say as you didn't actually give any of the useful lines from meminfo.  Just run it once, and post the actual output.

Here's useful lines:

MemTotal:        3935776 kB
MemFree:          962064 kB
MemAvailable:    1738728 kB
Buffers:          167440 kB
Cached:          1534540 kB
SwapCached:            0 kB
Active:          1385760 kB
Inactive:        1085464 kB
Active(anon):     936732 kB
Inactive(anon):   869680 kB
Active(file):     449028 kB
Inactive(file):   215784 kB
Unevictable:       15728 kB
Mlocked:           15728 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                80 kB
Writeback:             0 kB
AnonPages:        785004 kB
Mapped:           253080 kB
Shmem:           1030892 kB
Slab:             392092 kB
SReclaimable:     365268 kB
SUnreclaim:        26824 kB
KernelStack:        5728 kB
PageTables:        23880 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1967888 kB
Committed_AS:    3722216 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      363112 kB
VmallocChunk:   34359337196 kB
HardwareCorrupted:     0 kB
AnonHugePages:    315392 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       16696 kB
DirectMap2M:     4061184 kB

This is before I run ram-hungry programs, by the way.

Last edited by Mindstormscreator (2014-06-29 20:59:04)

Offline

Board footer

Powered by FluxBB