kern.maxfiles problem resolved
paul beard
paulbeard at mac.com
Mon Dec 29 10:27:01 PST 2003
I figured this out last night but not before I had one spell of
catatonia on my system.
I used mrtg to graph the increase in file descriptor usage and it made
nice straight line, not a curve. That looked suspicious. I also set up
a simple while loop in my shell to keep an eye on this. (while [ 1 ] ;
do sysctl kern.maxfiles; sleep 60; done ). When that stopped updating
at about 6600 files (the max is set at 16384), I rebooted (console was
dead).
In the process of looking at this, I had noticed that there were a few
nmbd (samba) processes in the process table: I expect to see one or
two, but not 10 or more. I watched this after rebooting, and sure
enough, new processes were spawning ever couple of minutes, and this
with no logins to the samba shares.
What struck me as odd about this is that the abuse of the file table
was being blamed on the wrong UID (80): nmbd doesn't run as the www
user, so even if I had been more clueful about fstat, there's a good
chance I would have been looking in the wrong places.
I killed the samba processes, deinstalled samba, refreshed from cvs
and, noting that the version was the same (2.2.8a), I reinstalled with
portinstall -P.
That seemed to do it. Now openfiles are sitting in the low 200s . . . .
I've posted this on my weblog with the relevant image (didn't want to
send an attachment to the list).
http://www.paulbeard.org/movabletype/archives/001347.html
--
Paul Beard
<www.paulbeard.org/>
paulbeard [at] mac.com
More information about the freebsd-questions
mailing list