Re: [qmailtoaster] how to set nice level?

2006-11-03 Thread Simone Marzona

Eric Shubes wrote:

Simone Marzona wrote:

Eric Shubes wrote:

David Sánchez Martín wrote:
 

That sounds like it's worth a try, but I kinda doubt that it'd be
effective.
spamd spawns the processes that actually do the spam checking
(spamd child), so those are the processes you'd really need to
'nice'. I don't know if the children pick up the nice level of the
parent or not, or how their nice level is determined.

Yes, in UNIX, among other things nice is inherited by child.

http://bama.ua.edu/cgi-bin/man-cgi?fork1+2


Looks like modifying the run file will work then!

Please let us know how this works for you, Simone.


just for a try I made a renice 5 to all spamd processes (also the
father, so something renice 5 $( pidof spamd ) does not catch all
relevant processes..)

LIVE, so without modifying the run file nor restarting spamd or qmail.

I've found that it works.



Cool.

You'll want to nice it in the run file too though, right? (so it'll run at 5
after you restart)

Also, if smtp timeouts occur, you may see some duplicate emails. Keep an eye
on scan times.

Once you get it all set, would you care to add this to the Tips and Tricks
section of the wiki?



sure.

-
QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [qmailtoaster] how to set nice level?

2006-11-02 Thread Simone Marzona

Eric Shubes wrote:

David Sánchez Martín wrote:
 
That sounds like it's worth a try, but I kinda doubt that it'd be 
effective.
spamd spawns the processes that actually do the spam checking (spamd 
child), so those are the processes you'd really need to 'nice'. I 
don't know if the children pick up the nice level of the parent or 
not, or how their nice level is determined.

Yes, in UNIX, among other things nice is inherited by child.

http://bama.ua.edu/cgi-bin/man-cgi?fork1+2



Looks like modifying the run file will work then!

Please let us know how this works for you, Simone.



just for a try I made a renice 5 to all spamd processes (also the 
father, so something renice 5 $( pidof spamd ) does not catch all 
relevant processes..)


LIVE, so without modifying the run file nor restarting spamd or qmail.

I've found that it works.

--
Dr. Simone Marzona
Clikkapuntocom
via Castellana 45/a
33100 Udine
tel. 0432 2428 804
fax. 0432 2428 999
http://www.clikka.com

-
QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [qmailtoaster] how to set nice level?

2006-10-31 Thread Simone Marzona

Eric Shubes wrote:

Simone Marzona wrote:

Hi all

how is possible to set nice level on spamassassin on mandriva?

On Debian systems it's configured in /etc/default/spamassassin nice-level.

I could simply put a nice x value before spamd.. in
/var/qmail/supervise/spamd/run?


That sounds like it's worth a try, but I kinda doubt that it'd be effective.
spamd spawns the processes that actually do the spam checking (spamd child),
so those are the processes you'd really need to 'nice'. I don't know if the
children pick up the nice level of the parent or not, or how their nice
level is determined.


or there is a predefined place?


Not that I'm aware of in the toaster. You might ask the spamassassin list
how this is done.


thanks


Welcome.

Having said that, let me guess what your problem might be (since you've
asked about a solution w/out stating your problem).


Quite correct.
The fact was that I supposed I've already a solution but I could not 
find a clean place where put may idea into action because the sistem is 
Mandriva based, and usually I use Debian.


But you're quite correct.


spamd on your toaster occasionally sucks up the cpu, the number of smtp
sessions grows, some sessions might time out resulting in duplicate emails.


no, this is not my problem.

My system does web server and not only mail server. I'm thinking that 
reniceing spamd processes could leave more cpu-time to apache processes, 
and slow down a little the delivery of mails (wich is not noticeable by 
users).
The idea is that 0.5 seconds on a web page is not tolerable, 10 seconds 
on an email is not noticeable. (as an example).


it could be seen as a very raw profiling on the cpu, or more correctly 
manageing the priority of processes in a custom way.



What's might be going on here is that autoexpire is configured on, and when
it kicks in things go kinda haywire, because the expiration process can take
a bit of time and a lot of cpu.

A solution in this case is to turn off autoexpire, and create a cron job
(sa-learn --force-expire) which runs periodically (daily is probably good).
This will also force the bayes database log to sync.

EE, do you suppose we can change the basic spamassassin-toaster package to
use this configuration? I think it'd be a good idea, as this will remove the
expiration process from active smtp sessions, as well as forcing the bayes
log to sync, which TTBOMK isn't being done by anything in the basic toaster.



I never had this problem. Sorry.


-
QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [qmailtoaster] how to set nice level?

2006-10-31 Thread David Sánchez Martín
 
 That sounds like it's worth a try, but I kinda doubt that it'd be 
 effective.
 spamd spawns the processes that actually do the spam checking (spamd 
 child), so those are the processes you'd really need to 'nice'. I 
 don't know if the children pick up the nice level of the parent or 
 not, or how their nice level is determined.

Yes, in UNIX, among other things nice is inherited by child.

http://bama.ua.edu/cgi-bin/man-cgi?fork1+2
BEGIN:VCARD
VERSION:2.1
N:Sánchez Martín;David
FN:[EMAIL PROTECTED] ([EMAIL PROTECTED])
ORG:E2000 Financial Investments, S.A.;Centro de Nuevas Tecnologías
TITLE:Administrador de Sistemas
TEL;WORK;VOICE:902196177
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA;Asturias;;;Espa=F1a
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA=0D=0AAsturias=0D=0AEspa=F1a
URL;WORK:http://www.e2000.es
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20060705T152542Z
END:VCARD

-
 QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: [qmailtoaster] how to set nice level?

2006-10-31 Thread Eric \Shubes\
David Sánchez Martín wrote:
  
 That sounds like it's worth a try, but I kinda doubt that it'd be 
 effective.
 spamd spawns the processes that actually do the spam checking (spamd 
 child), so those are the processes you'd really need to 'nice'. I 
 don't know if the children pick up the nice level of the parent or 
 not, or how their nice level is determined.
 
 Yes, in UNIX, among other things nice is inherited by child.
 
 http://bama.ua.edu/cgi-bin/man-cgi?fork1+2
 

Looks like modifying the run file will work then!

Please let us know how this works for you, Simone.

-- 
-Eric 'shubes'

-
 QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [qmailtoaster] how to set nice level?

2006-10-31 Thread Eric \Shubes\
Simone Marzona wrote:
 Eric Shubes wrote:
 Simone Marzona wrote:
 Hi all

 how is possible to set nice level on spamassassin on mandriva?

 On Debian systems it's configured in /etc/default/spamassassin
 nice-level.

 I could simply put a nice x value before spamd.. in
 /var/qmail/supervise/spamd/run?

 That sounds like it's worth a try, but I kinda doubt that it'd be
 effective.
 spamd spawns the processes that actually do the spam checking (spamd
 child),
 so those are the processes you'd really need to 'nice'. I don't know
 if the
 children pick up the nice level of the parent or not, or how their nice
 level is determined.

 or there is a predefined place?

 Not that I'm aware of in the toaster. You might ask the spamassassin list
 how this is done.

 thanks

 Welcome.

 Having said that, let me guess what your problem might be (since you've
 asked about a solution w/out stating your problem).
 
 Quite correct.
 The fact was that I supposed I've already a solution but I could not
 find a clean place where put may idea into action because the sistem is
 Mandriva based, and usually I use Debian.
 
 But you're quite correct.
 
 spamd on your toaster occasionally sucks up the cpu, the number of smtp
 sessions grows, some sessions might time out resulting in duplicate
 emails.
 
 no, this is not my problem.
 
 My system does web server and not only mail server. I'm thinking that
 reniceing spamd processes could leave more cpu-time to apache processes,
 and slow down a little the delivery of mails (wich is not noticeable by
 users).
 The idea is that 0.5 seconds on a web page is not tolerable, 10 seconds
 on an email is not noticeable. (as an example).
 
 it could be seen as a very raw profiling on the cpu, or more correctly
 manageing the priority of processes in a custom way.
 
 What's might be going on here is that autoexpire is configured on, and
 when
 it kicks in things go kinda haywire, because the expiration process
 can take
 a bit of time and a lot of cpu.

 A solution in this case is to turn off autoexpire, and create a cron job
 (sa-learn --force-expire) which runs periodically (daily is probably
 good).
 This will also force the bayes database log to sync.

 EE, do you suppose we can change the basic spamassassin-toaster
 package to
 use this configuration? I think it'd be a good idea, as this will
 remove the
 expiration process from active smtp sessions, as well as forcing the
 bayes
 log to sync, which TTBOMK isn't being done by anything in the basic
 toaster.

 
 I never had this problem. Sorry.
 

Well, it was just a guess. Glad you're not having that problem. :)

I see more clearly now what your situation is. An alternative to decreasing
spamd's priority might be to increase apache's priority. That might have
undesirable side effects though. Please let us know how you manage with this
one.

Keep in mind that your smtp sessions are still active while spamd is
processing, so they might time out if your spam scanning takes too long. If
that happens, I believe that you'll see a 256 termination code in the smtp
log, and the sending server will (should) resend the message, resulting in a
duplicate because qmail will have successfully received it the first time
even though the session timed out.

-- 
-Eric 'shubes'

-
 QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [qmailtoaster] how to set nice level?

2006-10-30 Thread Eric \Shubes\
Simone Marzona wrote:
 Hi all
 
 how is possible to set nice level on spamassassin on mandriva?
 
 On Debian systems it's configured in /etc/default/spamassassin nice-level.
 
 I could simply put a nice x value before spamd.. in
 /var/qmail/supervise/spamd/run?

That sounds like it's worth a try, but I kinda doubt that it'd be effective.
spamd spawns the processes that actually do the spam checking (spamd child),
so those are the processes you'd really need to 'nice'. I don't know if the
children pick up the nice level of the parent or not, or how their nice
level is determined.

 or there is a predefined place?

Not that I'm aware of in the toaster. You might ask the spamassassin list
how this is done.

 
 thanks
 
Welcome.

Having said that, let me guess what your problem might be (since you've
asked about a solution w/out stating your problem).

spamd on your toaster occasionally sucks up the cpu, the number of smtp
sessions grows, some sessions might time out resulting in duplicate emails.
What's might be going on here is that autoexpire is configured on, and when
it kicks in things go kinda haywire, because the expiration process can take
a bit of time and a lot of cpu.

A solution in this case is to turn off autoexpire, and create a cron job
(sa-learn --force-expire) which runs periodically (daily is probably good).
This will also force the bayes database log to sync.

EE, do you suppose we can change the basic spamassassin-toaster package to
use this configuration? I think it'd be a good idea, as this will remove the
expiration process from active smtp sessions, as well as forcing the bayes
log to sync, which TTBOMK isn't being done by anything in the basic toaster.

-- 
-Eric 'shubes'

-
 QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]