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

看板DFBSD_bugs作者時間21年前 (2005/02/03 07:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/4 (看更多)
: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@backplane.com>
文章代碼(AID): #120MBu00 (DFBSD_bugs)
文章代碼(AID): #120MBu00 (DFBSD_bugs)