You are not logged in.

#1 2013-01-17 15:35:22

Registered: 2013-01-17
Posts: 22

Free memory report

Hi everyone!

free is reporting my memory wrong after doing some rsyncing (-> disk cache is filled with some stuff)

[root@bigbrain ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          1610        472       1138          0          2         21
-/+ buffers/cache:        448       1162
Swap:           99          0         99

It says that allmost all of the used ram is actually used by processes and not for buffers/cache. But in fact it isn't! Much of the 448 "used w/o buffers/cache" can be used when a process needs much memory:

I started an interactive python session and aquired 1.4G of memory by some things like a=[0]*100000000; b=[0]*1000000; ...

After the python process is terminated (and the swap is cleared by swapoff/swapon) the figures look like

[root@bigbrain alex]# free -m
             total       used       free     shared    buffers     cached
Mem:          1610        113       1497          0          0          8
-/+ buffers/cache:        104       1506
Swap:           99          0         99

which seems reasonable again.

Why is free reporting that memory as used in the second line (-/+ buffers/cache) when it really is just part of the cache?

To make it perfectly clear: I don't have any unexplained out-of-memory-errors and don't seem to really miss some of my memory, it is just reported in a way i do not understand (and in fact consider wrong in particular) even after looking at the thousands of sites like



Board footer

Powered by FluxBB