Peter Gradwell spake unto me and said:
>
> - searching a fairly empty (5 lines) rcpthosts file and then
>   searching morercpthosts, or

Um, that should be '(50 lines)', meaning 'your 50 most commonly used
domains' (man qmail-smtpd). When a domain is found in rcpthosts, then
morercpthosts is not touched. Depending how common 'most common' is,
morercpthosts will not be used much.

> - just searching a large rcpthosts file.

Um, qmail-smtpd doesn't actually search the rcpthosts file. It parses
the file into an in-memory cdb, and searches that. qmail-newmrh parses
morercpthosts into an on-disk cdb, which qmail-smtpd searches from the
disk _when necessary_.

So your choice really is:

  - searching a fairly small (50 domains) in-memory cdb, and then
    searching a large on-disk cdb when necessary, or

  - just(!) searching a large in-memory cdb. (Remember, large in-memory
    structures are paged, so disk I/O is required in either case, with
    a suitable definition of 'large'.)

Looking at the source code suggests that search speed is not the issue;
memory is. Smaller qmail-smtpd processes mean more qmail-smtpd (and
qmail-remote) processes, which means greater concurrency. No doubt Dan
has profiled this, and seen that the bottom line is greater overall
throughput.

Len.

Reply via email to