Hi, Has anybody actually implemented this getc_unlocked() call in their production version of qpopper on a Sun box? What about the advice in the manpage for getc_unlocked() to use flockfile() and funlockfile() around the getc_unlocked() calls to preserve locking on the stream? I find no references to these calls in the qpopper 4.0.4 source code...
--- Jeff Earickson On Fri, 13 Dec 2002, Christopher Crowley wrote: > Date: Fri, 13 Dec 2002 16:47:53 -0600 > From: Christopher Crowley <[EMAIL PROTECTED]> > To: Subscribers of Qpopper <[EMAIL PROTECTED]> > Subject: Fw: Architectural advice. > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > At 11:48 AM 12/12/2002 -0600, you wrote: > > >But, the server is becoming CPU bound. I believe that I have made > > >all the optimizations that I can make in qpopper: server-mode, > > >temp-drop-dir (in memory based FS), disable-check-pw-max, and > > >disable-any-kerberos-principal. > > > > One change you can make (requires a source code change) is to > > change the "getc()" function call in the mfgets function inside > > pop_dropcopy to a getc_unlocked() call. Under Solaris 8, getc() > > does a mutex lock on the file handle before fetching the > > character, and a mutex unlock afterwards. For a 50Mbyte mailbox, > > that's 100 million mutex ops. I noticed a substantial drop in > > kernel time by making this one change. > > > > This change seems that it would make a vast improvement. Will this > optimization be included in future releases of Qpopper? > > Christopher Crowley > TIS Network Services > Tulane University > [EMAIL PROTECTED] > 504.314.2535 > PGP Key ID: 0x7CF18FDB > > -----BEGIN PGP SIGNATURE----- > Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com> > > iQA/AwUBPfpjmM0q7cR88Y/bEQLWNwCg6xWpBIVnzWDuUeosHq8fubWjHbwAninn > pQyt4Iq9Byq3g74MT4lGgCC2 > =+51X > -----END PGP SIGNATURE----- >
