Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2002 18:07:41 -0300
From:      Ian Campbell <ian@damnit.org>
To:        freebsd-hackers@freebsd.org
Subject:   sfbuf problems
Message-ID:  <3DB8611D.1040507@damnit.org>

next in thread | raw e-mail | index | archive | help
    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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DB8611D.1040507>