[exim] performance-problem exim spam SQL-idle

Pàgina inicial
Delete this message
Reply to this message
Autor: hlehmann
Data:  
A: exim-users
Assumpte: [exim] performance-problem exim spam SQL-idle
Hallo *!

I have a performance problem with exim4-postgres.
Configured is a dynamic Blacklist with SQL.
A SQL server for up to 6.000 Requests p. min. was planned.
A P200 with 128 MB RAM should this doing. But:

problem:
Very many postgres processes, which apparent only wait.
If a Spam wave comes, then the SQL server swapt itself to death.

details:
- some mails need up to 10 min. [1]
- Exim send a SQL-Request at begin to connection,
but keeps the connection open during the entire period [2]
- approx. 2 min. after exim-process end, the postgres-process ended.
- 3 MTAs with to 500 simultaneous connections work at moment.
worstcase: 3*500*3MB - 4500MB



How to configured exim/postgres to:
- postgres-timout ?
- exim close DB-connection after SQL-Request?

regards Heiko

---------------------------------------------------------------
- System
- 500MHz/256MB

- [1]
sql $ ps auxww | grep ^postgres
postgres 22021  0.0  2.6 22756 3528 ?        S    12:04   0:00 postgres:
smtpuser smtp x.x.x.56 idle
postgres 22046  0.0  5.5 22752 7468 ?        S    12:05   0:00 postgres:
smtpuser smtp x.x.x.56 idle
postgres 22073  0.0  2.6 22752 3528 ?        S    12:06   0:00 postgres:
smtpuser smtp x.x.x.56 idle
...
postgres 22635  0.0  2.5 22760 3464 ?        S    12:17   0:00 postgres:
smtpuser smtp x.x.x.56 idle


- [2]
smtp $  ps axuw | grep exim | more
Debian-  21942  0.0  0.6  9372 1796 ?        S    12:06   0:00
/usr/sbin/exim4 -bd -q15m
Debian-  22041  0.0  0.6  9372 1780 ?        S    12:07   0:00
/usr/sbin/exim4 -bd -q15m
Debian-  22196  0.0  0.6  9372 1788 ?        S    12:08   0:00
/usr/sbin/exim4 -bd -q15m
Debian-  22322  0.0  0.6  9372 1792 ?        S    12:08   0:00
/usr/sbin/exim4 -bd -q15m



- [3] exim4.conf (part)

BL_ADD = INSERT INTO blacklist
(mta,relay_ip,from_domain,from_addr,local_part) \
                     VALUES  
('smtp0','$sender_host_address','$sender_address_domain','$sender_address','$local_part')


...
  #### accept mails to known users only
  deny  message       = User account unknown
    domains       = +virtual_domains
    !local_parts  = ${if exists{CONFDIR/virtual.aliases.${domain}}\
                   {CONFDIR/virtual.aliases.${domain}}\
                   {}}
  condition      = ${lookup pgsql{BL_ADD}{yes}{no}}