[exim] exim very slow

Góra strony
Delete this message
Reply to this message
Autor: Arkadiusz Miskiewicz
Data:  
Dla: exim-users
CC: Philip Hazel
Temat: [exim] exim very slow
Hi,

I have setup where I'm using uids/gids without having
entries for these in /etc/{passwd,group}.

Now the problem is sending email from such UID
takes ages.

Exim looks into passwd multiple times (what for?) and
this takes even 10 seconds for every single email,
so very, very, very slow.

13952 11:38:04 open("/etc/passwd", O_RDONLY) = 5
13952 11:38:04 fcntl(5, F_GETFD)        = 0
13952 11:38:04 fcntl(5, F_SETFD, FD_CLOEXEC) = 0
13952 11:38:04 fstat(5, {st_mode=S_IFREG|0644, st_size=1416, ...}) = 0
13952 11:38:04 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
13952 11:38:04 read(5, "root:x:0:0:root:/root:/bin/bash\nbin:x:1:1:bin:/bin:\ndaemon:x:2:2:daemon:/sbin:\nadm:x:3:4:adm:/var/account:\nlp:x:4
:7:lp:/var/spool/lpd:\nsync:x:5:0:sync:/sbin:/bin/sync\nshutdown:x:6:0:shutdown:/sbin:/sb"..., 4096) = 1416
13952 11:38:04 close(5)                 = 0
13952 11:38:04 munmap(0x40017000, 4096) = 0
13952 11:38:04 open("/etc/passwd", O_RDONLY) = 5
13952 11:38:04 fcntl(5, F_GETFD)        = 0
[...]
13952 11:38:13 open("/etc/passwd", O_RDONLY) = 4
13952 11:38:13 fcntl(4, F_GETFD)        = 0
13952 11:38:13 fcntl(4, F_SETFD, FD_CLOEXEC) = 0
13952 11:38:13 fstat(4, {st_mode=S_IFREG|0644, st_size=1416, ...}) = 0
13952 11:38:13 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
13952 11:38:13 read(4, "root:x:0:0:root:/root:/bin/bash\nbin:x:1:1:bin:/bin:\ndaemon:x:2:2:daemon:/sbin:\nadm:x:3:4:adm:/var/account:\nlp:x:4
:7:lp:/var/spool/lpd:\nsync:x:5:0:sync:/sbin:/bin/sync\nshutdown:x:6:0:shutdown:/sbin:/sb"..., 4096) = 1416
13952 11:38:13 read(4, "", 4096)        = 0
13952 11:38:13 close(4)                 = 0
13952 11:38:13 munmap(0x40016000, 4096) = 0
13952 11:38:13 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
13952 11:38:13 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
13952 11:38:13 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
13952 11:38:13 nanosleep({1, 0}, {1, 0}) = 0
13952 11:38:14 fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0
13952 11:38:14 getpid()                 = 13952
13952 11:38:14 statfs("/var/spool/exim", {f_type=0x58465342, f_bsize=4096, f_blocks=1308160, f_bfree=783465, f_files=5242880, f_ffree=4995911
, f_namelen=255}) = 0


It takes too much time and doing the same multiple times doesn't help.

It's easy to reproduce using for example:
sudo -u \#someUID_without_passwd_entry php script_sending_emails

Any suggestions? exim 4.42 on Linux 2.4.27 with glibc 2.2.5
-- 
Arkadiusz Miśkiewicz                    PLD/Linux Team
http://www.t17.ds.pwr.wroc.pl/~misiek/  http://ftp.pld-linux.org/