2001-12-07 16:45:30

by Brian

[permalink] [raw]
Subject: knfsd and memory usage

So I have this new file server (2.4.16), and it's memory looks like
Mem: 771952K total, 767492K used, 4460K free, 22016K buffers
Swap: 0K total, 0K used, 0K free, 71848K cached

So cache, buffers, and free memory account for ~100MB.
There are a handful of userspace processes taking ~20MB.

Obviously I expect the kernel to take up some memory, but 650 megs?

Is there I way I can find out where all of that memory went?
If knfsd is hoarding (no other box has this much unaccounted for), is
there a way to tweak it at runtime? Are there 'safe' things to adjust at
compile time?

Thanks
-- Brian


2001-12-07 18:46:49

by Brian

[permalink] [raw]
Subject: Re: knfsd and memory usage

It's not under any kind of VM pressure, but I was curious since our squid
servers have a huge cache size. A difference between mmap and
fopen/fread, I assume?

Is there a way to determine how much memory is going toward page-cache?
Maybe it doesn't matter that much. I'm just into stats.

-- Brian

On Friday 07 December 2001 01:25 pm, you wrote:
> The non-obvious memory usage is a big disk cache. Free memory is
> wasted memory seems to be the philosophy. Theoretically, the disk
> cache memory should be able to be discared when needed, but that
> aspect seems to be a problem in some environments.
>
> john
>
>
> On Fri, 7 Dec 2001 11:45:07 -0500, Brian <[email protected]>
>
> wrote:
> >So I have this new file server (2.4.16), and it's memory looks like
> >Mem: 771952K total, 767492K used, 4460K free, 22016K
> > buffers Swap: 0K total, 0K used, 0K free,
> > 71848K cached
> >
> >So cache, buffers, and free memory account for ~100MB.
> >There are a handful of userspace processes taking ~20MB.
> >
> >Obviously I expect the kernel to take up some memory, but 650 megs?
> >
> >Is there I way I can find out where all of that memory went?
> >If knfsd is hoarding (no other box has this much unaccounted for), is
> >there a way to tweak it at runtime? Are there 'safe' things to adjust
> > at compile time?
> >
> >Thanks
> > -- Brian
> >-
> >To unsubscribe from this list: send the line "unsubscribe linux-kernel"
> > in the body of a message to [email protected]
> >More majordomo info at http://vger.kernel.org/majordomo-info.html
> >Please read the FAQ at http://www.tux.org/lkml/

2001-12-07 20:04:58

by NeilBrown

[permalink] [raw]
Subject: Re: knfsd and memory usage

On Friday December 7, [email protected] wrote:
> So I have this new file server (2.4.16), and it's memory looks like
> Mem: 771952K total, 767492K used, 4460K free, 22016K buffers
> Swap: 0K total, 0K used, 0K free, 71848K cached
>
> So cache, buffers, and free memory account for ~100MB.
> There are a handful of userspace processes taking ~20MB.
>
> Obviously I expect the kernel to take up some memory, but 650 megs?

Have a look at /proc/slabinfo. It might show you where the memory is.

>
> Is there I way I can find out where all of that memory went?
> If knfsd is hoarding (no other box has this much unaccounted for), is
> there a way to tweak it at runtime? Are there 'safe' things to adjust at
> compile time?

knfsd directly uses about 20K per thread. Maybe as much as 30. Any
other memory usage is incidental and should be cleaned up by memory
pressure.

NeilBrown