[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: filehandles
On Wed, Oct 03, 2001 at 03:13:14PM -0500, Danny Sauer wrote:
> google is neat, but I still don't know what the numbers in file-nr mean.
Try http://www.google.com/linux next time, and put in
"/proc/sys/fs/file-nr". A little ways down, I found a link to this:
If you do a cat on /proc/sys/fs/file-nr, you will get three
numbers. The third will be your file-max. The first and second are
the number of allocated file handles and the number of actual used
file handles. Why the two numbers? When the Linux kernel allocates
a file handle, it does not release it. If you do increase the
file-max value, then you should also increase inode-max as well.
Considering that each open file requires an inode for stdin,
stdout (and possibly, a network socket) this needs to be somewhat
higher than your file-max. Take your file-max value, triple it and
write it back out to inode-max.
Looks like an interesting article:
http://www2.linuxjournal.com/articles/sysadmin/0042.html
> What kind of performance hits should I expect for wastefully enabling
> more filehandles than I need? Just less kernel memory?
I would think so. You shouldn't have a performance impact unless you
actually have all those files open, and maybe then only if you are
polling. (select()/poll() apparently suck.)
> > As a side note, X has been really unstable for me recently, and netscape
> > crashes pretty frequently (more frequently than normal for netscape).
What the heck are you still running nutscr^Wnetscape for anyway?
Mozilla 0.9.4 is quite nice (all of the 0.9.x series has been), and
the KDE 2.2 Konqueror is arguably even better. (The two have very
nice feature sets that unfortunately don't overlap enough for me to
drop one in favor of the other. But I never run netscape anymore.)
> If I just wildly delete the symlinks in the /proc/pid/fh directory, will
> that just close the handle, or is it more likely to cause rampant
> unhappiness with the running programs?
You won't get very far.
zhaan:~$ rm /proc/self/fd/0
rm: cannot unlink `/proc/self/fd/0': Permission denied
Those directories are very read-only.
Steve
--
steve@silug.org | Southern Illinois Linux Users Group
(618)398-7360 | See web site for meeting details.
Steven Pritchard | http://www.silug.org/
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.
- Follow-Ups:
- foo?
- From: Travis Davies <tddavies@yahoo.com>
- Re: filehandles
- From: Danny Sauer <sauer@cloudmaster.com>