1

Topic: Iredadmin login interface getting slow

- iRedMail version (check /etc/iredmail-release)
==> 1.3.2 and iRedAdmin-Pro 4.7 (MySQL)

- Deployed with iRedMail Easy or the downloadable installer?
==> downloadable installer

- Linux/BSD distribution name and version:
==> Debian Linux 9

- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
==> Mysql

- Web server (Apache or Nginx)
==> Nginx

- Manage mail accounts with iRedAdmin-Pro?
==> yes


Hi,

We have kept setting below
1) Remove log of inbound/outbound mails older than 3 days
2) Remove quarantined mails older than 4 days

still we are facing issue slow login to iredadmin interface some time it give 504 timeout error

Could you please confirm by running below mention script it will help to resolve the issue.

python /opt/www/iredadmin/tools/cleanup_amavisd_db.py

Thanks
Sunil

----

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

2

Re: Iredadmin login interface getting slow

Is this server busy? CPU high usage?

3 (edited by RajeshM 2022-03-12 13:45:31)

Re: Iredadmin login interface getting slow

server is a busy one with around 100k emails per day.
However it has plenty of resources. 2 X 24 core procs and 256 gb ram.
The smtp send and receive logs are available since may 2021 ie around 10 months

mariadb cnf file details below

#######################################

key_buffer_size         = 16M
max_allowed_packet      = 16M
thread_stack            = 192K
thread_cache_size       = 8
myisam_recover_options  = BACKUP
max_connections         = 2000

query_cache_limit       = 1M
query_cache_size        = 24M

innodb_buffer_pool_size=30G
innodb_buffer_pool_instances=8
innodb_read_io_threads=4
innodb_write_io_threads=4
innodb_log_file_size=1G
innodb_log_buffer_size= 20M

#######################################

Output of mysqltuner.pl

#############################
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
      OPTIMIZE TABLE `amavisd`.`quarantine`; -- can free 2329 MB
      OPTIMIZE TABLE `iredapd`.`smtp_sessions`; -- can free 106 MB
    Total freed space after theses OPTIMIZE TABLE : 2435 Mb
    Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1
    Performance schema should be activated for better diagnostics
    Consider installing Sys schema from https://github.com/mysql/mysql-sys for MySQL
    Consider installing Sys schema from https://github.com/FromDual/mariadb-sys for MariaDB
Variables to adjust:
    query_cache_size (=0)
    query_cache_type (=0)
    query_cache_size (> 16M)
    performance_schema = ON enable PFS
    innodb_buffer_pool_size (>= 26.0G) if possible.
#############################

amavisd database
table msgrcpt contains 19,138,674 rows and size 5.8 GB
table msgs contains 18,326,530 rows and size 16.1 GB    

iredapd database
table smtp_sessions contains 443,094 rows and size 441.1 MB


Thanks
Sunil

4

Re: Iredadmin login interface getting slow

Mostly caused by Amavisd sql database, especially table "msgs".
I suggest keeping old records for shorter time, e.g. 1 day.