off-topic -> memory usage
Denys Vlasenko
vda.linux at googlemail.com
Thu Feb 3 02:52:25 UTC 2011
On Wednesday 02 February 2011 16:33, David Collier wrote:
> So the question is - how close is this box to the OOM of doom - is the
> inactive cached memory available for re-use if it's needed, or am I
> really 2M from the drop?
One tool is free:
$ free
total used free shared buffers
Mem: 2054936 1078352 976584 0 94084
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mostly irrelevant
-/+ buffers: 984268 1070668 <=== useful
Swap: 131068 0 131068
Another is nmeter:
$ nmeter '%t %c alloc:%m free:%[mf]'
03:45:35 .......... alloc:190m free:1.7g
03:45:36 .......... alloc:190m free:1.7g
03:45:37 .......... alloc:190m free:1.7g
^C
Second estimate (1.7g) looks to be more correct than what free
says (1g) (because our free doesn't analyze Cached:NNN line):
$ dd bs=1700M count=1 </dev/zero >/dev/null
wasn't swapping (I heard no disk seeking), whereas
$ dd bs=1800M count=1 </dev/zero >/dev/null
swapped about 100M according to free:
$ free
total used free shared buffers
Mem: 2054936 225076 1829860 0 9252
-/+ buffers: 215824 1839112
Swap: 131068 121428 9640
--
vda
More information about the busybox
mailing list