Bug 3761

Summary: spamd memory use grows too high (leak?)
Product: Spamassassin Reporter: Glen Stewart <glen_stewart>
Component: spamc/spamdAssignee: SpamAssassin Developer Mailing List <dev>
Status: RESOLVED WONTFIX    
Severity: normal Keywords: triage
Priority: P5    
Version: 3.0.2   
Target Milestone: Undefined   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Glen Stewart 2004-09-08 15:31:18 UTC
spamd was started at Sep  7 22:45

About 19 hours later, here's memory use:

/etc/init.d > date
Wed Sep  8 17:33:28 EDT 2004

/etc/init.d > ps axu | grep spam
root      2302  0.0  6.5 56084 33660 ?       S    Sep07   0:48 [spamd]
root      2303  0.0  6.6 60860 34280 ?       S    Sep07   0:52 [spamd]
root      2304  0.0  6.8 60336 35196 ?       S    Sep07   0:51 [spamd]
root      2305  0.0  6.3 60032 32840 ?       S    Sep07   0:38 [spamd]
root      2306  0.0  7.0 61436 36444 ?       S    Sep07   0:57 [spamd]
root     18780  0.0  0.1  1672  612 pts/1    S    17:32   0:00 grep spam

/etc/init.d > free
             total       used       free     shared    buffers     cached
Mem:        515280     500572      14708          0      40440     124084
-/+ buffers/cache:     336048     179232
Swap:       514040     230184     283856

/etc/init.d > ./spam*n restart (reduced to 1 thread to minimize RAM use)
Shutting down spamd:                                            [  OK  ]
Starting spamd:                                                 [  OK  ]

/etc/init.d > ps axu | grep spam
root     18879  0.0  0.1  1668  604 pts/1    S    17:32   0:00 grep spam

/etc/init.d > free
             total       used       free     shared    buffers     cached
Mem:        515280     387296     127984          0      41000     124836
-/+ buffers/cache:     221460     293820
Swap:       514040     101364     412676

30 minutes later...
/root > date
Wed Sep  8 18:02:12 EDT 2004

/etc/init.d > ps axu | grep spam
root     18893  0.1  5.8 32440 30244 ?       S    17:32   0:02 [spamd]
Comment 1 Malte S. Stretz 2004-09-08 15:39:07 UTC
Please fill out the Version field above.  Is that Mandrake you're running 
under? 
Comment 2 Bob Menschel 2005-04-11 20:59:10 UTC
Glen, again, can you verify for us what version of SpamAssassin you were using?
 And, due to the age of this entry, can you verify whether it still happens on a
current version? 
Comment 3 Glen Stewart 2005-04-12 03:38:56 UTC
(In reply to comment #2)
> Glen, again, can you verify for us what version of SpamAssassin you were using?
>  And, due to the age of this entry, can you verify whether it still happens on a
> current version? 

I was using 3.0.0  Now I am using SpamAssassin version 3.0.2 and it is still 
taking an excessive amount of RAM to run: 34Mb.  Since I only use this for 
about 100 messages per day, it's a lot to pay.


USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root     18469  0.1  6.6 66632 34088 ?       S    Apr10   3:40 [spamd]

Yes, Mandrake 9.0 using perl v5.8.0
Comment 4 Michael Parker 2005-04-12 07:02:52 UTC
Subject: Re:  spamd memory use grows too high (leak?)

> 
> I was using 3.0.0  Now I am using SpamAssassin version 3.0.2 and it is still 
> taking an excessive amount of RAM to run: 34Mb.  Since I only use this for 
> about 100 messages per day, it's a lot to pay.
> 

34 megs is not really that much and pretty easy to reach after
scanning a few larger msgs and possibly loading an auto-whitelist
database into memory.

Are you seeing actualy real growth? for instance if after another few
minutes is the process MUCH larger? or are you just seeing a high
water mark? where all processes get around 34 megs and stay?

If you're truely only using this for 100 msgs a day and you can't
afford 30-60 megs then I suggest you just run the spamassassin script
and do away with spamd all together.

Michael
Comment 5 Glen Stewart 2005-04-12 18:23:20 UTC
RAM use creeps up fairly quickly - maybe within 30-60 minutes to 25Mb, then it
stays at 34Mb peak.

I've switch to just spamassassin itself, and shut down spamd as you suggested. 
Thanks for your help!