Date: Sat, 18 May 2002 22:15:46 -0700 From: Peter Wemm <peter@wemm.org> To: Hiten Pandya <hiten@uk.FreeBSD.org> Cc: Doug White <dwhite@resnet.uoregon.edu>, Omar Thameen <omar@clifford.inch.com>, freebsd-hackers@FreeBSD.ORG Subject: Re: tuning a CPU bound server Message-ID: <20020519051546.A1FC539F9@overcee.wemm.org> In-Reply-To: <20020516230902.A398@hpdi.ath.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
Hiten Pandya wrote: > --- Peter Wemm <peter@wemm.org> wrote: > > The only real problem that I know of with postfix is that it still > > suffers from select(2) collisions (FreeBSD kernel problem) when it tries > > to shut down a bunch of idle smtp senders. That can cause transient load > > average spikes - this can be a bit alarming but doesn't actually affect > > things very much. > > Just wondering, are these the kind of problems which can be solved by > using the kqueue(2) mechanism, or am I talking nuts again? > > Regards. Yes, kqueue solves it nicely. I overestimated the work required. In fact, it looks like it would be quite easy to do. There are three places that need work. src/util/events.c (the main event loop, keeps a persistent select mast) src/util/readable.c (quick select-until-readable) src/util/writable.c (quick select-until-writable) events.c is practically begging to be converted to kqueue as it has explicit init/register/unregister/loop type operation that allows callers to register/unregister callbacks for given fd's when they become readable or writable. This is the exact scenario that kqueue is ideal for. The other two are not heavily used and could quickly whip up their own mini kqueue for the task. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 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?20020519051546.A1FC539F9>