Date: Sun, 20 Apr 2003 16:18:50 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: "Kevin A. Pieckiel" <kpieckiel-freebsd-hackers@smartrafficenter.org> Cc: freebsd-hackers@freebsd.org Subject: Re: maxfiles, file table, descriptors, etc... Message-ID: <3EA32ADA.CC05B003@mindspring.com> References: <20030420210118.GA21255@pacer.dmz.smartrafficenter.org>
next in thread | previous in thread | raw e-mail | index | archive | help
"Kevin A. Pieckiel" wrote: > First, do open sockets (inet or unix) or pipes (via pipe(2)) count > against kern.maxfiles, kern.maxfilesperproc, and other related limits? Yes. And the limits are not runtime settable. > Second, are there sysctl variables that indicate the size or usage > of the file table? Or is this simply indicated by maxfiles (and > perhaps others)? Or is there a program that will report this info? The "lsof" program will report open files. The "maxfiles" variable is a limit. The limit is runtime for files, boot time for sockets. The value of "kern.openfiles" is valid, but not very useful. > Third, where is the limit for the number of file descriptors that > can be open set? Or is this the same limit as maxfiles, etc? It's "maxfiles". > Fourth, is there a difference between an open file and an open > descriptor? Not specifically. Practically, no. > These questions were spawned from the errors possibly returned by > pipe(2). I'm not clear on what the entities and limits are as > they involve such things as the file table, open files, open > descriptors, etc. > > Finally, are answers to these questions OS specific, or are they > part of a standard indicating how such things behave? They are pretty much OS specific, for the answers. The questions aren't. -- Terry
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EA32ADA.CC05B003>