Article View: news.software.nntp
Article #7134Re: expire performance enhancement
From: Jerry Aguirre
Date: Wed, 01 May 1996 00:00
Date: Wed, 01 May 1996 00:00
39 lines
2133 bytes
2133 bytes
In article <Dqp091.7q3@twwells.com> bill@twwells.com (T. William Wells) writes: > >Ever notice how it seems to take *forever* to run through the >history file? Well, last night, I was hacking on expire and noted >that it has a hash table for newsgroups. However, there are only >128 buckets in the table. I set it to 2048 and cut the processing >time to what looks to be about half of the original. I didn't >experiment to see what the best size would be. I have verified this. Unfortunatly this is on my "test" system to the history file is only about 3 meg. and doesn't give it a very long run. Here are the timings (two runs each) I got for various hash sizes: #define NGH_SIZE 128 7.6u 1.5s 0:16 55% 0+612k 9+0io 4pf+0w 7.2u 1.4s 0:16 51% 0+612k 1+0io 0pf+0w #define NGH_SIZE 512 6.5u 1.5s 0:15 50% 0+624k 2+0io 0pf+0w 6.5u 1.7s 0:10 82% 0+624k 0+0io 0pf+0w #define NGH_SIZE 2048 6.1u 1.7s 0:08 90% 0+656k 0+0io 0pf+0w 6.1u 1.1s 0:07 93% 0+656k 0+0io 0pf+0w #define NGH_SIZE 8192 6.1u 1.7s 0:08 90% 0+812k 0+0io 0pf+0w 6.0u 1.8s 0:09 84% 0+804k 0+0io 0pf+0w The hash of 2048 seems about optimal for my 4K active entries. A site with a larger active file might want to use a larger value. Personally I plan to use the 8192 value to allow for growth. Note that expire's processing of the history file is only a small part of the total news.daily time. There is still the time for fastrm, expireover, and log processing. Still, every little bit helps.
Technical Details
Message-ID:
<4m8bmq$sqa@olivea.ATC.Olivetti.Com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<Dqp091.7q3@twwells.com>Show Full Headers
Complete Article Headers
Message-ID: <4m8bmq$sqa@olivea.ATC.Olivetti.Com> Subject: Re: expire performance enhancement Date: Wed, 01 May 1996 00:00:00 +0000 From: jerry@strobe.ATC.Olivetti.Com (Jerry Aguirre) References: <Dqp091.7q3@twwells.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 152435505 Organization: Olivetti ATC; Cupertino, CA; USA Newsgroups: news.software.nntp Summary: Bigger NGH_SIZE doubles speed