[exim] Exim taking up too much "private dirty" heap memory o…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Dreas van Donselaar
Data:  
Para: exim-users
Asunto: [exim] Exim taking up too much "private dirty" heap memory on 64bit
Hi,

We have a strange problem with Exim on 64bit systems. To test I open a
single connection to one of our Exim servers, send a valid HELO/MAIL
FROM, and then execute 100x "RCPT TO" to an invalid recipient (or a
valid recipient that is being ratelimited, that doesn't matter). The
resulting exim process takes up 6MB on 32bit systems (RES according to
top). The resulting exim process takes up 73MB on 64bit systems (RES
according to top). Why are 64bit systems taking 10x more memory than
32bit systems in this specific situation, and why in general does this
take so much memory?

When looking at /proc/PID/smaps all memory is used by "heap" (64bit system):
============================
0088e000-04fe7000 rw-p 0088e000 00:00 0                                  
[heap]
Size:              73060 kB
Rss:               72788 kB
Pss:               72758 kB
Shared_Clean:          0 kB
Shared_Dirty:         44 kB
Private_Clean:        20 kB
Private_Dirty:     72724 kB
Referenced:        72788 kB
Swap:                 32 kB
============================


I use a simple Python script (test.py) to reproduce this:
============================
import sys
import smtplib
server, helo, mail, rcpt, count = sys.argv[1:]
s = smtplib.SMTP(server)
print s.ehlo(helo)
print s.mail(mail)
for i in xrange(int(count)):
     print s.rcpt(rcpt)
print "Complete.  SIGINT to stop."
while True:
     pass
============================


To test: python test.py DESTINATIONSERVER test.com test@???
test@??? 100

Does anyone have any suggestion why so much memory is consumed? Is there
any proposed fix (besides switching exim to run in 32bit)?

Regards,

Dreas