Re: slab needs more agressive trimming

Chris Wedgwood (chris@cyphercom.com)
Sun, 21 Sep 1997 14:03:07 -0400


From: "David S. Miller" <davem@jenolan.rutgers.edu>
To: linux-kernel@vger.rutgers.edu
Subject: slab needs more agressive trimming

[...]

I've even seen this behavior lead to fork()'s failing until I killed
off some huge job like GNU emacs or whatever.

Although I will note that 3 or 4 days of uptime and at least moderate
usage are needed before things get this way...

This reminds me. ..

With a week or so of heavy use on .55 I noticed that I run out of file
descriptors.

Killing everything (killall5) doesn't necessarily help (but usually does).
If I can free one of two descriptors, then
echo "2048" > /proc/sys/kernel/file-max
will buy me some more time).

I'm not sure I can work out why it happens in the first place. I thought it
might be the squid - but it can only use 256 descriptors at most.

It often happens with gdb, and a 'ls /proc/<pid-of-gdb>/fd' will yield
hundreds of unused descriptors - but I have no idea why they should be
there. It not easily repeatable either.

Could it be descriptors are leaking somewhere? (I'm not using any network
filesystems). I've tried to make them leak in various ways, but to no avail.

(Oh, and why if file-nr if /proc/sys/kernel - shouldn't if be in
/proc/sys/fs or /proc/sys/vfs ?)

-Chris