Re: [exim] How well does lsearch scale on high volume server…

Góra strony
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
Dla: ShaunR
CC: exim-users
Temat: Re: [exim] How well does lsearch scale on high volume servers?
On 2010-01-11 at 10:55 -0800, ShaunR wrote:
> For example say my /etc/userdomains file has 10,000 lines(domains) in
> it. Or say my /etc/aliases has 100,000 lines(aliases) in it. How well
> is exim going to be able to perform with these files being this large
> when it needs to search? Are there better options to use?


It depends. 100k aliases means, on average, scanning through 50k to
confirm a match, or 100k to confirm no match. The file itself will
typically be cached entirely in RAM for any real mail-system, but the
searching is inefficient -- whether that matters depends upon your
system and inbound mail load.

Use a lookup type designed to let you query if a given key exists in a
DB. Exim supports various DB types, not just linear search. These
scale all the way up to full-blown relational database support and LDAP
support, but also down to single files which can be drop-in replacements
for many lsearch usages.

Chapter 9 of The Exim Specification is "File and database lookups".

My personal preference is to store data in CDB files, but if you don't
fancy writing your own DB build tools, take a look at exim_dbmbuild
(part of the Exim distribution), which will let you use the "dbm" lookup
type.

Regards,
-Phil