Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

smtpd-tls cpu utilization

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


qmail at hilbig

Apr 24, 2008, 1:48 PM

Post #1 of 4 (163 views)
Permalink
smtpd-tls cpu utilization

Recently I noticed that just a couple instances of qmail-smtpd were bringing
the processor utilization to 100% on a dual P3 550MHz server with 768mb RAM
running CentOS v5.1.

My qmail-smtpd has the combined TLS-AUTH patch applied to it. I recompiled
with just AUTH and now processor utilization stays very low -- around 3%.

Is it possible that SSL has _that_much_overhead_ that just a couple
connections using TLS could bring untilization to 100% or is it more likely
that someone is trying to find a TLS exploit?

Any suggestions as to how I can see if those connections are starting TLS or
trying to hack into my server? Logging I/O of all SMTP connections is not
feasible because of the amount of connections the server sustains. How
would I be able to look at the I/O of just those connections in question?


safari-qmail at safari

Apr 24, 2008, 2:38 PM

Post #2 of 4 (151 views)
Permalink
Re: smtpd-tls cpu utilization [In reply to]

On Thu, Apr 24, 2008 at 13:48:53 -0700, D. Hilbig wrote:
>
> Recently I noticed that just a couple instances of qmail-smtpd were bringing
> the processor utilization to 100% on a dual P3 550MHz server with 768mb RAM
> running CentOS v5.1.

If OpenSSL initialization is done for each qmail-smtpd invocation,
CPU usage is excessive.

These help:
http://www.suspectclass.com/~sgifford/ucspi-tls/files/ucspi-ssl-0.70-ucspitls-0.1.patch
http://www.superscript.com/ucspi-ssl/intro.html

--


kyle-qmail at memoryhole

Apr 24, 2008, 3:25 PM

Post #3 of 4 (151 views)
Permalink
Re: smtpd-tls cpu utilization [In reply to]

On Thursday, April 24 at 01:48 PM, quoth D. Hilbig:
> Recently I noticed that just a couple instances of qmail-smtpd were
> bringing the processor utilization to 100% on a dual P3 550MHz
> server with 768mb RAM running CentOS v5.1.
>
> My qmail-smtpd has the combined TLS-AUTH patch applied to it. I recompiled
> with just AUTH and now processor utilization stays very low -- around 3%.

Read the documentation of the TLS patch. Specifically:

- when a 512 bit RSA key is provided in /var/qmail/control/rsa512.pem,
this key will be used instead of (slow) on-the-fly generation by
qmail-smtpd. Idem for 512 and 1024 DH params in control/dh512.pem
and control/dh1024.pem. `make tmprsadh` does this.
Periodical replacement can be done by crontab:
01 01 * * * /var/qmail/bin/update_tmprsadh > /dev/null 2>&1

~Kyle
--
To sin by silence when they should protest makes cowards of men.
-- Abraham Lincoln


qmail at hilbig

Apr 24, 2008, 5:06 PM

Post #4 of 4 (150 views)
Permalink
RE: smtpd-tls cpu utilization [In reply to]

Those files do exist. Using "gstack" I was able to see that calls to
DH_generate were being made. So, digging deeper, the permissions on the
three files dh512.pem, dh1024.pem and rsa512.pem were incorrect. This
happened because I switched to using 'vpopmail' user in my run script and
'vpopmail' did not have permission.

I fixed the permissions, but the problem persists. The problem isn't a
spike during initialization, but sustained high utilization for the duration
of the session.

I just tested POP3-SSL (Courier-IMAP' daemon) to find that the same problem
is occurring.

Maybe my expectations of this server are too high.



-----Original Message-----
From: Kyle Wheeler [mailto:kyle-qmail[at]memoryhole.net]
Sent: Thursday, April 24, 2008 3:26 PM
To: qmail[at]list.cr.yp.to
Subject: Re: smtpd-tls cpu utilization

On Thursday, April 24 at 01:48 PM, quoth D. Hilbig:
> Recently I noticed that just a couple instances of qmail-smtpd were
> bringing the processor utilization to 100% on a dual P3 550MHz
> server with 768mb RAM running CentOS v5.1.
>
> My qmail-smtpd has the combined TLS-AUTH patch applied to it. I
recompiled
> with just AUTH and now processor utilization stays very low -- around 3%.

Read the documentation of the TLS patch. Specifically:

- when a 512 bit RSA key is provided in /var/qmail/control/rsa512.pem,
this key will be used instead of (slow) on-the-fly generation by
qmail-smtpd. Idem for 512 and 1024 DH params in control/dh512.pem
and control/dh1024.pem. `make tmprsadh` does this.
Periodical replacement can be done by crontab:
01 01 * * * /var/qmail/bin/update_tmprsadh > /dev/null 2>&1

~Kyle
--
To sin by silence when they should protest makes cowards of men.
-- Abraham Lincoln

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.