Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!b-tech!zeeff From: zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) Newsgroups: news.software.b Subject: Re: Enhanced dbz for SunOS 4.0 Keywords: mmap SunOS 4.0 Message-ID: <9501@b-tech.ann-arbor.mi.us> Date: 28 Jun 89 15:36:06 GMT References: <17059@elroy.Jpl.Nasa.Gov> Reply-To: zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) Organization: Branch Technology Ann Arbor, MI Lines: 33 In article <17059@elroy.Jpl.Nasa.Gov> david@elroy.Jpl.Nasa.Gov (David Robinson) writes: >In attempts to speed up news processing we installed the public >domain dbz.c DBM replacement. We noticed a significant speedup >but a runtime analysis found that a large number of system calls >were being performed to lseek() and read() 4 bytes at a time. As >the history file grew it appeared to get worse. Dbz used to use fread/fseek which I expect was better. Someone took it out and I let it go. Maybe I should take a look at putting it back in. > >Below is a SunOS 4.0 specific enhancement to dbz that mmap()'s >the history file and .pag file into main memory and accesses it >directly instead of through lseek() and read(). Our tests have shown >a decrease in system time as much as 50% with no additional page faults. Sounds nice. > >lcase() [which was broken] was replaced by strcasecmp() from the >4.3BSD distribution archives on UUNET. I believe this is a reference to using tolower() without checking what the char is. It was a bsd only bug. Mark Moraes did some patches for cnews with dbz. The most important ones are removing lcase() from dbz.c and changes to make mkdbm work. They may make it into the next cnews patch. -- Are you making the world | zeeff@b-tech.ann-arbor.mi.us a better place? | Ann Arbor, MI