DragonFly BSD
DragonFly bugs List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: (lightbulb goes off) Re: sockstat not working


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 2 Feb 2005 15:08:19 -0800 (PST)

:Ouch. Yeah, we would have to iterate over the filedesc structures and
:multiply the reference count there with f_count of the file. But we
:can't do that easily and have to iterate over the processes instead.
:Which means a multi-threaded webserver kills the *stat performance
:just for the counting.
:
:Joerg

    If you want you can clean it up some more... instead of having it
    iterate through fd_nfiles in the NULL case you could simply
    do count += fdo->fd_nfiles, but if you do that make sure fd_nfiles
    is some reasonable value (< 500), otherwise sparse descriptor sets
    may balloon the number too high.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]