12-29-07 07:06 AM
In article <87fxxotfw5@francisco.fsf.hobby-site.com>,
Andrzej Adam Filip <anfi@onet.eu> wrote:
> Doug Hardie <bc979@lafn.org> writes:
>
>
> 1) Use "-c size" option to make makemap use bigger cache.
> The default cache size is 1048576 (1 Mega Byte).
> Try "-c 4194304" (4MB) and find out if it makes a difference.
>
> Remember: it will help to decrease creation times.
> Lookup times may be "longer than usually".
>
> 2) If "1" does not help then consider creating btree map from
> *presorted* input file.
> [ from ancient discussion about virtusertable with 25E6 entries :-)
]
>
> PS
> I personally suggest "2" with some (perl) script doing presorting.
Wow - what a difference. I ran the following tests on an otherwise idle
machine.
The reference test - the production approach.
time /usr/sbin/makemap hash /etc/mail/accessnew < /etc/mail/access.tmp
8.490u 43.003s 5:28.96 15.6% 76+1558k 1497+336io 0pf+0w
Changing the cache size.
time /usr/sbin/makemap -c 4194304 hash /etc/mail/accessnew <
/etc/mail/access.tmp
7.916u 31.640s 5:10.50 12.7% 76+5441k 1321+356io 0pf+0w
Using btree with unsorted input.
time /usr/sbin/makemap btree /etc/mail/accessnew < /etc/mail/access.tmp
6.161u 10.630s 2:10.71 12.8% 76+2810k 0+676io 0pf+0w
Using btree with sorted input.
time /usr/sbin/makemap btree /etc/mail/accessnew < /etc/mail/access.sort
2.317u 1.217s 0:04.19 84.0% 77+2789k 0+368io 0pf+0w
Btree with sorted input is incredibly fast. Since I am generating most
of the access file from a database it becomes real easy to have it
sorted. Even without the sort its faster though. I believe all I need
to do to switch to btree format is recreate the access file and then
change sendmail.cf from
Kaccess hash /etc/mail/access
to
Kaccess btree /etc/mail/access
[ Post a follow-up to this message ]
|