root      3002  0.0  0.5 10364 8924 ?        S    Mar19   0:04
/usr/bin/perl -w /usr/bin/spamd -D -d -L -c -a -F0

It's allocated 10364k on my machine, of which after 10 days uptime 8924
is resident in core, being around 0.5% of my 1.5GB -- this seems to be
about normal.  What's taking up memory is the perl VM, and the
pre-compiled regexes.  Note a few things:

1. Contrary to previous posting by someone, this *does not* include any
allocation to do with the AWL -- that is loaded dynamically, per-user at
runtime when a message is processed.  It will probably increase mem
usage minimally, since it's using a disk-based DB.

2. Yes, it's just sitting idle most of the time, but most OSes when they
spawn a sub-process to actually process a message will not copy memory,
just share the existing process' copy of the data, and so a 2nd, 3rd,
4th, etc spamd will not increase memory consumption by much at all.

3. If 8MB is 5% of your memory, then get more memory if it's a problem! 
Even though DRAM prices are rising, you can still get a 256MB PC-100
stick for about $40.  Even DDR memory is barely more expensive than
that.  Maybe $50 for 256MB.

4. You can always run spamassassin instead of spamc/spamd if you want to
trade off latency in processing messages for only allocating the RAM
when you need it.  But effectively if spamd is sitting idle, your OS
will just swap it out if it needs the RAM, so I wouldn't worry about it.

C

On Fri, 2002-03-29 at 07:59, dman wrote:
> On Fri, Mar 29, 2002 at 09:06:29AM -0600, AHA Lists wrote:
> | My % = 6.8 megs.  That just seems really high while sitting there doing
> | nothing but waiting.
> 
> If you rewrite it in C, then perhaps (depends on the source of memory
> usage and your coding skills) it would use less memory.  I think much
> of it is due to storing all the rules (I assume the regexes are
> pre-compiled too) in memory so that they don't need to be loaded when
> a message arrives.
> 
> $ ps aux | grep spamd
> USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
> root      8834  0.0  0.7 11268 1820 ?        S    Mar26   0:04 /usr/bin/perl 
>/usr/sbin/spamd -d -F 0
> 
> If I restart it,
> 
> USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
> root      5208  0.0  3.6 11328 9236 ?        S    09:52   0:00 /usr/bin/perl 
>/usr/sbin/spamd -d -F 0
> 
> Apparently the VSZ field didn't change over the last 3 days.  I'm not
> sure what "VSZ" means in this context, though.
> 
> If I use gtop I get a Size and RSS of 9236 with 1624 as shared memory.
> No AWL here.
> 
> -D
> 
> -- 
> 
> Pride goes before destruction,
> a haughty spirit before a fall.
>         Proverbs 16:18
> 
> 
> _______________________________________________
> Spamassassin-talk mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/spamassassin-talk
> 
> 


_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to