Re: [SAtalk] Why does helper-app run mode take 3 seconds

2003-06-15 Thread Theo Van Dinter
On Sun, Jun 15, 2003 at 09:37:46AM -0700, Ed Kasky wrote:
 Would it help do you think if I put the discovery server entries in the 
 hosts file?

No.  The debug lines showed that the 3 seconds was the amount of time
the razor server took to respond with the razor servers you should use.
Name lookup isn't the issue here.

-- 
Randomly Generated Tagline:
There are all of these warnings and incantations and unnatural rituals
 and everything's veiled in this threat of you mess with the mayo,
 the mayo mess with you, man.   - Alton Brown, Good Eats, Mayo Clinc


pgp0.pgp
Description: PGP signature


Re: [SAtalk] Why does helper-app run mode take 3 seconds

2003-06-15 Thread Ed Kasky
At 12:15 PM Sunday, 6/15/2003, Theo Van Dinter wrote -=
 Jun 14 07:28:29 yoda2 spamd[1289]: debug: entering helper-app run mode
 Jun 14 07:28:32 yoda2 spamd[1289]: debug: Using results from Razor v2.34

 Could this be related to cpu speed or dns or my setup?
entering happens when Razor is about to run.  Using happens after the
result has been received.  So the 3 seconds is what it takes to contact
the Razor server, send them the query, get the result, and disconnect.
That's dependent on a number of things, but typically network speed and
how loaded the Razor servers are.
I have a dsl connection of 768/384, local dns.

I get the same 3 second delay running razor-admin -d --discover
Jun 15 09:24:36.408157 admin[11738]: [ 5] Finding Discovery Servers via DNS 
in the
razor2.cloudmark.com zone
Jun 15 09:24:39.191490 admin[11738]: [ 6] Found 1 Discovery Servers via DNS 
in the
razor2.cloudmark.com zone

Would it help do you think if I put the discovery server entries in the 
hosts file?

Ed Kasky
Los Angeles, CA
. . . . . . . .
Don't let your mouth write no check that your tail can't cash.
-- Bo Diddley


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk


Re: [SAtalk] Why does helper-app run mode take 3 seconds

2003-06-15 Thread Simon Byrnand
 Does anyone have any ideas as to why it would take 3 seconds to do the
 following:

 Jun 14 07:28:29 yoda2 spamd[1289]: debug: entering helper-app run mode
 Jun 14 07:28:32 yoda2 spamd[1289]: debug: Using results from Razor v2.34

 If I turn Razor2 off, I get times of .5 to 1.5 seconds. Otherwise it's 3
 to
 4.5.

 Could this be related to cpu speed or dns or my setup?

 Inquiring minds want to know ;-)

Hi Ed,

Check back through the archives for messages from me for an explanation of
what it probably is, but to cut a long story short, try adding -H to the
end of your spamd options...(also if you use the -u option for spamd, make
sure the spamd user account really has a home directory)

Regards,
Simon




---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk


Re: [SAtalk] Why does helper-app run mode take 3 seconds

2003-06-15 Thread Simon Byrnand
At 20:19 15/06/03 -0700, Ed Kasky wrote:
At 08:19 AM Monday, 6/16/2003, Simon Byrnand wrote -=
 Does anyone have any ideas as to why it would take 3 seconds to do the
 following:

 Jun 14 07:28:29 yoda2 spamd[1289]: debug: entering helper-app run mode
 Jun 14 07:28:32 yoda2 spamd[1289]: debug: Using results from Razor v2.34

 If I turn Razor2 off, I get times of .5 to 1.5 seconds. Otherwise it's 3
 to
 4.5.

 Could this be related to cpu speed or dns or my setup?

 Inquiring minds want to know ;-)
Hi Ed,

Check back through the archives for messages from me for an explanation of
what it probably is, but to cut a long story short, try adding -H to the
end of your spamd options...(also if you use the -u option for spamd, make
sure the spamd user account really has a home directory)
Adding the -H to the spamd options had the desired effect for sure! 
Average processing time was between 3 and 4.5 seconds.  Now processing 
messages .5 to 1.5 seconds.

I could not however find the explanation in the archives but did read 
through the man page for spamd.  Am I correct in assuming that by having a 
home directory specified for the helper-app, it doesn't have to look for 
one and saves the 3 seconds ??

Jun 15 16:01:19 yoda2 spamd[3543]: debug: entering helper-app run mode
Jun 15 16:01:19 yoda2 spamd[3543]: debug: Using results from Razor v2.34
(Or something like that???)
What happens without -H is that when spamd does a setuid() to another user 
(other than root) the environment variable $HOME which is passed to helper 
apps like razor is still pointing to root's home directory. Of course razor 
can't save its files in /root when its running as another user so it has to 
do its server discovery process for every single message. (which takes 3 to 
4 seconds)

With -H razor can cache the results of its server discovery and only do it 
occasionally...

If I remember correctly, Theo put a fix for this into 2.60-cvs...

Regards,
Simon


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk


Re: [SAtalk] Why does helper-app run mode take 3 seconds

2003-06-15 Thread Ed Kasky
At 03:25 PM Monday, 6/16/2003, Simon Byrnand wrote -=
What happens without -H is that when spamd does a setuid() to another user 
(other than root) the environment variable $HOME which is passed to helper 
apps like razor is still pointing to root's home directory. Of course 
razor can't save its files in /root when its running as another user so it 
has to do its server discovery process for every single message. (which 
takes 3 to 4 seconds)

With -H razor can cache the results of its server discovery and only do it 
occasionally...
Makes sense

Do most folks run as a different user or as root?  I tried running it as 
spamd but then realized I'd have to change permissions on all the home 
directories and haven't take that leap as of yet.

If I remember correctly, Theo put a fix for this into 2.60-cvs...
I'll look for it on cpan when it becomes available...

Thanks again.

Ed Kasky
Los Angeles, CA
. . . . . . . .
An excuse only satisfies the person giving it...


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk


Re: [SAtalk] Why does helper-app run mode take 3 seconds

2003-06-15 Thread Simon Byrnand
At 21:07 15/06/03 -0700, Ed Kasky wrote:
At 03:25 PM Monday, 6/16/2003, Simon Byrnand wrote -=
What happens without -H is that when spamd does a setuid() to another 
user (other than root) the environment variable $HOME which is passed to 
helper apps like razor is still pointing to root's home directory. Of 
course razor can't save its files in /root when its running as another 
user so it has to do its server discovery process for every single 
message. (which takes 3 to 4 seconds)

With -H razor can cache the results of its server discovery and only do 
it occasionally...
Makes sense

Do most folks run as a different user or as root?  I tried running it as 
spamd but then realized I'd have to change permissions on all the home 
directories and haven't take that leap as of yet.
If you have user preferences in their home directories, with file 
permissions such that those files belong to the user, then you'll have to 
let spamd switch to the user, as you probably do now. (Or change directory 
and file permissions)

I don't have user home directories, I use the -x and -V options to specify 
a virtual user preferences directory where the prefs files are all owned by 
the same user, created by a web based php script, and therefore I run spamd 
as a fixed, unprivileged user...

If I remember correctly, Theo put a fix for this into 2.60-cvs...
I'll look for it on cpan when it becomes available...
Well don't expect it any time soon, 2.60 is still in heavy development 
AFAIK... :)

Regards,
Simon


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk