[lugip] losing memory
Rod Nayfield
rod at nayfield.com
Sun Sep 14 10:02:45 EDT 2008
the vmsize (aka VIRT or VSZ) for a process shows its address space,
not resident pages. Memory pages in linux are allocated on-demand.
(for example, if you malloc() you will grow the vsz of the process -
but you won't take any resident pages until you access them).
You probably want to watch resident size to find a memory leak in a
process ... the easiest way would be to start top and sort by %MEM
(e.g. hit ">" once)
If that doesn't help, take a step back and cat /proc/meminfo every 5
minutes to a file so you can see what pages are actually taking up
space (e.g. confirm that they are anonymous pages, make sure that
you're not running out of lowmem (if it's 32 bit kernel))
-rod
On Sep 13, 2008, at 10:35 PM, Thomas Pfau wrote:
> I have an Actiontec DSL modem that likes to hang after 6-8 hours of
> use. I have been trying to debug what's causing this and think it
> might
> be running out of memory. The device runs linux with busybox. I can
> telnet to it and it has a few command line utilities so I can find out
> what's going on to some extent.
>
> What I've seen while watching it today is that 'free' will report less
> free memory as time goes on. The buffer count stays the same until
> free
> memory gets real low then the system takes buffers to get free RAM.
> From the rate it was disappearing, I have a feeling that after 6-8
> hours, all of the memory is consumed and that's why it's hanging.
>
> I can't figure out where the memory is going, though. Vmsize reported
> by ps remains constant for all processes.
>
> Does anyone have any ideas where else I could look to find out what's
> consuming all the RAM on this device?
>
> _______________________________________________
> Lugip mailing list
> Lugip at lugip.org
> http://www.lugip.org/mailman/listinfo/lugip
>
> LUG/IP Hardware Sig meets first Tuesday of the month at the Hamilton
> Public Library at 7pm
>
> LUG/IP meets Second Wednesday of the month at the Lawrence
> Headquarters Branch of the Mercer County Library at 7pm
>
> LUG/IP Coffee Klatch meets on the fourth Sunday of the month at the
> Panera Bread in West Windsor near Target at 8am
>
> For more information go to http://www.lugip.org
More information about the Lugip
mailing list