[Tfug] Memory woes

Stephen Hooper stephen.hooper at gmail.com
Sun Feb 4 20:24:06 MST 2007


On 2/4/07, Christopher Robbins <robbinsc at gmail.com> wrote:
> On 2/4/07, Stephen Hooper <stephen.hooper at gmail.com> wrote:
> >
> > On 2/4/07, Christopher Robbins <robbinsc at gmail.com> wrote:
> > >
> > > It's running 2.6.18, x86_64 version.  I'm leaning towards the install
> > being
> > > borked.  I mean, running 'top',
> > > everything looks out of whack.  Even things that shouldn't be sucking
> > down
> > > memory (non-leaking Firefox, ssh connections,
> > > etc) are killing huge amounts of free memory.  Running a media player
> > and a
> > > torrent downloader has taken all but 10 mb of
> > > available system memory.  This isn't right at all.
> >
> > That's not necessarily a bad thing.  If you observe those processes,
> > are they actually consuming that memory, or is it being allocated to
> > things like buffer-cache, etc?
> >
> > If it is just the kernel occupying the memory, then it is right at all! :)
> >
> > If by "thrashing" you mean that things are getting swapped out to disk
> > too frequently then obviously there is something wrong with your
> > virtual memory configuration:  you could try to load a different I/O
> > scheduler, and also spend some time figuring out what is causing
> > things to have to be flushed to disk so often...
> >
> > What does  vmstat look like for a nice sized run?
>
>
>
> Running amarok and firefox...
>
> procs -----------memory---------- ---swap-- -----io---- -system--
> ----cpu----
>  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id
> wa
>  0  0      0 376308  29820 602120    0    0    68    15  775  953  6  1 91
> 1
>

When things start going bad, you should probably do a "vmstat 5 20",
and look at the results.  See what is incrementing ...

If that doesn't seem helpful try vmstat -f,  see what it looks like in
a loop (e.g. "watch -n 20 vmstat -f"), maybe you have something
running away...

Basically, read the man page for vmstat:  it gives lot's of help
diagnosing the system.




More information about the tfug mailing list