1

Topic: iRedAdmin and Database Performance

==== Required information ====
- iRedMail version: 0.8.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Centros 5
- Related log if you're reporting an issue:
====

I've been experiencing issues with iRedAdmin (and overall system performance) after my amavisd database started to grow.

On my first tests, I found out that iredmail's my.cnf comes with the innodb_file_per_table variable disabled, this leads to a huge performance decrease as in InnoDB, by default, all of the tables are written to one file defined by default at 10MB, with an auto-extend of 8 bytes. Each time it gets to the endpoint, MySQL has to copy the file to another location and add those 8 bytes, before deleting the old one.

To fix this, I've backed up my database (http://sysadminnotebook.blogspot.com.br … store.html), edited /etc/my.cnf, added
innodb_file_per_table=1
Then stopped mysql, backed up /var/lib/mysql, deleted /var/lib/mysql/*, ran mysql_install_db, started mysql, restored my backup, restarted mysql.

My system load is now much lower, but logging in to iRedAdmin-Pro still takes considerable time. I've disabled the amavis database option on settings.ini, and it's ok now, but listing sent/received emails is a nice feature for my customers. Can you describe queries you're performing ? Those could be optimized (or maybe cached), I may take a look at those if you could point out where they are in code.

Thanks!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iRedAdmin and Database Performance

Hi guigouz,

Thanks for your solution (innodb_file_per_table=1), i will add this in next release of iRedMail.
About Amavisd queries, all are coded in libs/amavisd/*.py (especially log.py and quarantine.py). Let me know if you have any idea to improve it.

3

Re: iRedAdmin and Database Performance

Hi Zhang,

The default value of innodb_buffer_pool_size is only 8M, will it be better to set it 512M or 1G in my.cnf for speed up DB performance?

4

Re: iRedAdmin and Database Performance

Hi Pang,

I suggest reading some MySQL document about its configuration parameters. smile