Hello, I'm testing Dovecot 2.0. I plan to use Dovecot 2.0 with thousands of domains per server. My user base is under virtual MySQL. Is there a way to make the LMTP not make query to MySQL for each message delivered ? I'm afraid that the MySQL server does not support the load. Best Regards -- []'s Thiago Henrique Network Administration Digirati Networks K8 Networks
On 8.7.2010, at 1.02, Thiago Henrique wrote:> Is there a way to make the LMTP not make query to MySQL for each message > delivered ? I'm afraid that the MySQL server does not support the load.It depends on your configuration. a) Is the MySQL query needed at all? If everyone uses the same uid/gid and the home directory can be set up with a template, you could use userdb static and avoid the query for everyone. This assumes that your MTA already verified that the address is valid, otherwise it could start creating "new users". b) If a) doesn't work, you can set auth_cache_size so Dovecot will cache recent lookups. c) You can create a local replica of your SQL userdb, either again to MySQL or even a flat file or something..
Thiago Henrique wrote:> I'm testing Dovecot 2.0. > > I plan to use Dovecot 2.0 with thousands of domains per server. My user base is under virtual MySQL. > > Is there a way to make the LMTP not make query to MySQL for each message delivered ? I'm afraid that the MySQL server does not support the load.A "SELECT" query retrieving a single record on a MySQL database should be a cheap operation. How long are your queries taking? Your common queries should work principally by index scans. Your indexes should be entirely in RAM. So queries which retrieve a single row from a table should run in O(log N) time, which in my experience is usually measured in milliseconds. Bill