On Thu, 15 Jul 2004, Daniel Lang wrote: > My values are the following (with adjusted maxvnodes): > [..] > kern.maxvnodes: 64000 > vnodes 35 7K 7K 166 16,32,64,128,256 > kern.minvnodes: 52958 > vm.stats.vm.v_vnodein: 568488 > vm.stats.vm.v_vnodeout: 1 > vm.stats.vm.v_vnodepgsin: 1384470 > vm.stats.vm.v_vnodepgsout: 1 > vfs.numvnodes: 190867 > vfs.wantfreevnodes: 25 > vfs.freevnodes: 135112 > debug.sizeof.vnode: 264 > [..] > > So the actual consumed memory (7k ?) appears neglectible. > However, kern.minvnodes has nearly reached the now upper limit, > so maybe trimming maxvnodes to 64000 was maybe too small, > and the saved space appears not worth the effort? > > I will bump it up a bit more... > > What about the 35 vnodes "In Use" (reported by kern.malloc) but > vfs.numvnodes: 190867, I am not sure how to interpret these > values.... > > As far as I understand it, a vnode is a kernel data-structure > referring to a file-like entity (file, directory, socket, pipe, etc). > So there are obviously much more in use than 35. 190867 appears > too much, for ~ 400 active processes. Even if there are many > filedescriptors open by each process, it is probably much less than 500 > per process. But maybe if these include all cached vnodes, so > all vnodes which have been in use in the past, it could fit. > > Sorry for being not too educated about this really basic > UNIX concept. :-} Daniel, If you are running a lot of dynamically-linked programs, an fd is allocated for every library that is imported. If you really want to find out what's going on where as far as fds on your system, lsof(8) from ports is your friend. Vnodes, are kernel-land structures that can reference any file or directory. Your vnode use count is always going to be greater than the number of open fds on your system. The two are somewhat related because you're guaranteed to have a vnode allocated for every file that is opened and for each process' current working directory (In the case of multiple programs accessing the same file or directory, the kernel increments the given vnode's reference count). The kernel keeps a vnode cache in order to limit the number of expensive lookups that would otherwise have to be performed while heavy I/O is under way. The namei(9) and vnode(9) manpages contain a wealth of information on the matter. I hope this helps. :) Regards, Andy > Andre Guibert de Bruet | Enterprise Software Consultant > > Silicon Landmark, LLC. | http://siliconlandmark.com/ >Received on Sun Jul 18 2004 - 16:17:18 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:02 UTC