1

Topic: iRedAdmin very slow after upgrade to iRedAdmin-PRO version

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

Hi Zhang,

I updated to iRedAdmin-Pro but when logged in the CPU goes to 100%. Impossible to use.

My system is:

FreeBSD 10.0-STABLE #0 r266218
real memory  = 8589934592 (8192 MB)
hw.model: Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
hw.ncpu: 4
Virtual Machine in VmWare ESX

Top command:

(root@mail)[~]# top -P
last pid: 21329;  load averages:  1.10,  0.65,  0.44                                                              up 98+09:37:39  18:31:27
112 processes: 1 running, 111 sleeping
CPU 0:  5.6% user,  0.0% nice,  8.3% system,  0.0% interrupt, 86.1% idle CPU 1: 69.4% user,  0.0% nice,  9.7% system,  0.0% interrupt, 20.8% idle CPU 2: 16.7% user,  0.0% nice,  5.6% system,  0.0% interrupt, 77.8% idle CPU 3: 27.8% user,  0.0% nice,  5.6% system,  0.0% interrupt, 66.7% idle
Mem: 662M Active, 4220M Inact, 1375M Wired, 77M Cache, 846M Buf, 1607M Free
Swap: 16G Total, 41M Used, 16G Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
1030 mysql        58  20    0   479M   335M uwait   1 663:54  98.39% mysqld
21065 vscan         1  42    0   221M   102M lockf   3   0:04  15.48% perl
20983 vscan         1  45    0   225M   104M lockf   2   0:05   1.56% perl
21077 vscan         1  24    0   225M   103M lockf   2   0:04   0.78% perl
20992 vscan         1  24    0   221M   101M lockf   2   0:03   0.59% perl
21073 vscan         1  24    0   221M   100M lockf   1   0:02   0.39% perl
1048 clamav        4  20    0   418M   317M uwait   3 937:35   0.29% clamd
21051 vscan         1  27    0   221M   103M lockf   2   0:03   0.29% perl
21068 vscan         1  23    0   221M   102M lockf   2   0:02   0.10% perl
1051 clamav        1  52    0 52956K     0K pause   2  66:17   0.00% <freshclam>
1067 root          1  20    0 15288K  1524K kqread  0  45:55   0.00% dovecot
85026 root          1  20    0 52660K   680K kqread  0  36:50   0.00% master
  597 root          1  20    0 14484K  1256K select  1  22:23   0.00% syslogd
85028 postfix       1  20    0 52796K  1356K kqread  2  17:43   0.00% qmgr
1164 policyd       1  20    0 74572K  9024K select  2  15:37   0.00% perl
1071 dovecot       1  20    0 15224K   948K kqread  2  11:05   0.00% anvil
85041 postfix       1  20    0 52728K  1372K kqread  0   4:04   0.00% anvil
9379 iredadmin    18  52    0   351M 73268K uwait   1   2:01   0.00% httpd
85033 postfix       1  20    0 52744K  1352K kqread  2   1:18   0.00% tlsmgr
1233 root          1  20    0 16576K   592K nanslp  3   0:20   0.00% cron
91991 policyd       1  20    0 95632K  8592K lockf   3   0:04   0.00% perl
11117 iredapd       1  20    0 87432K 18272K select  3   0:03   0.00% python2.7
  460 root          1  20    0 13164K   476K select  0   0:03   0.00% devd

The dashboard page is slower than others.

What do i do ?

Thanks for return.

----

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

2

Re: iRedAdmin very slow after upgrade to iRedAdmin-PRO version

Do you have cron job to delete old records in Amavisd database?
For example:

# iRedMail: Cleanup Amavisd database
1  2   *   *   *   python /var/www//iredadmin/tools/cleanup_amavisd_db.py >/dev/null

3

Re: iRedAdmin very slow after upgrade to iRedAdmin-PRO version

Hello,

Yes i have!

(root@mail)[~]# crontab -u root -l
1   3   *   *   *   /usr/local/bin/cbpadmin --config=/usr/local/etc/cluebringer.conf --cleanup >/dev/null
# iRedMail: Cleanup Amavisd database
1  2   *   *   *   python /usr/local/www/iredadmin/tools/cleanup_amavisd_db.py &>/dev/null
# iRedMail: update Awstats statistics
1   */1   *   *   *   perl /usr/local/www/awstats/cgi-bin/awstats.pl -config=web -update >/dev/null
1   */1   *   *   *   perl /usr/local/www/awstats/cgi-bin/awstats.pl -config=smtp -update >/dev/null
# iRedMail: Backup MySQL databases on 03:30 AM
30   3   *   *   *   /usr/local/bin/bash /var/vmail/backup/backup_mysql.sh

4

Re: iRedAdmin very slow after upgrade to iRedAdmin-PRO version

How many records in your Amavisd database?

When logging to iRedAdmin-Pro, it will query Amavisd to show you how many emails received/sent/quarantined in last 24 hours, and top 10 senders/recipients, if Amavisd database has too many records, it will take too much time and slow down logging.

5

Re: iRedAdmin very slow after upgrade to iRedAdmin-PRO version

Hi,

Estatísticas Das Últimas 24 Horas

    Recebido    12517
    Enviado    3479
    Vírus    2
    Em quarentena    14617
Informações do Sistema

Número de domínios    116
Número de usuários    1322
Número de apelidos    1
Emails Armazenados    137361 Emails. 7701 MB.
iRedAdmin-Pro    v1.8.2 (MySQL)
Nome do Host    mail.xxxxxxx.com
Carga do Servidor    0.476, 0.601, 0.606
Rede (lo0)    127.0.0.1/255.0.0.0
Rede (em0)    x.x.x./255.255.255.192

6

Re: iRedAdmin very slow after upgrade to iRedAdmin-PRO version

This info just shows the statistic of latest 24 hours, you have to check it with MySQL command line or tools like phpMyAdmin.

You can run script /usr/local/www/iredadmin/tools/cleanup_amavisd_db.py manually to delete old records. NOTE: if there're many records, it will take a long time. Please be patient.

7

Re: iRedAdmin very slow after upgrade to iRedAdmin-PRO version

Zhang,

I ran the script manually and now back to normal. I'll check because cron doesn't automatically running the script.

Problem Solved!

Thanks for attention!!!