Re: [exim] How to force exim to load file with whitelist IPs…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Phil Pennock
Data:  
Para: no.spa
CC: exim-users
Asunto: Re: [exim] How to force exim to load file with whitelist IPs into memory
On 2011-10-30 at 10:51 +0100, no.spa@??? wrote:
> but when I check stat of file /etc/my_whitelist I get information that this
> file was accessed when exim checked for data in this file.


You've mounted the filesystem with "atime" support, which reports last
access time. While useful, for busy file-systems this default support
in Unix has proven to be a historical mistake (in my opinion).

The only reason the disk is being affected here is because the act of
reading the file is updating the inode with a new atime, and this needs
to be written back to the disk. Otherwise, assuming local disk and not
NFS, the file would sit in buffer cache and all new reads would never go
to disk, because the cache would still be valid.

Unless your system has so little RAM and the file is accessed so
infrequently that it doesn't remain in cache. But in that case the
extra delay loading the file in should be insignificant in the scheme of
things.

Mount the filesystem noatime or move the file to a filesystem which is
mounted noatime and see how that affects performance.

If a linear scan of a small (<200kB) file which is rarely modified and
so sits permanently is cache is too slow, there are file-formats for
rarely-modified data which reduce the amount of the "disk" file to be
read (so reduce the amount of RAM scanned through when using the cache).
CDB is probably the way to go then.

-Phil