I wrote an httpd based around sendfile() for a moderately high
traffic (50mbit or so) host. It chugs along happily for a couple hours
before it eventually dies, locked in the sfbufa wait. We tried upping
NSFBUFS a couple times up through 30000, to the point that there was no
free kvm and it (predictably) panicked.
The traffic isn't too much for the machine (dual 2ghz xeon, 2gb ram,
100/1000 nic), and the number of simultaneous connections is limited at
256. There's no obviously leak in either memory or fds, fstat and top
back me up on that. The server doesn't thread or fork.
I'm not sure how important it is, but it also uses kqueue/kselect
and accf_http.
I tried a hack sendfile replacement with write() and lseek(), just
to see if that made a difference... but all it did was chew mbufs
instead of sf_bufs ... How can I tell if I'm just using all available
buffer space, or if it's just a leak I'm not seeing? How can I increase
available kvm if it becomes necessary?
As a side note, is kqueue thread safe?
I'd be grateful for any help you can give me.
--Ian
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message
- Re: sfbuf problems Ian Campbell
- Re: sfbuf problems Mike Silbersack