Zimbra: High CPU spikes every 1 minute PDF Print E-mail
Saturday, 28 March 2009 11:33

Zimbra Version 5.0.14

I encountered a problem on my VM which is running Zimbra .
Every 1 minute I got a cpu spike of around 70% to 80% 24hrs a day and I don't know why. Looks lika a JAVA process is responsible for this when I watch TOP output. I would like to get rid of this!

changes that did not help:
- 'Sleep time between subsequent mailbox purges' from 1 minute to 1 hour

- fetchmail from 1 minute to 5 minutes

- disabling or editing cronjobs:

#*/2 * * * * /opt/zimbra/libexec/zmstatuslog
 #*/10 * * * * /opt/zimbra/libexec/zmdisklog
 #00,10,20,30,40,50 * * * * /opt/zimbra/libexec/zmlogprocess > /tmp/logprocess.out 2>&1
 00,20,40 * * * * /opt/zimbra/libexec/zmlogprocess > /tmp/logprocess.out 2>&1
 #0,10,20,30,40,50 * * * * /opt/zimbra/libexec/zmqueuelog
 10,30,50 * * * * /opt/zimbra/libexec/zmqueuelog

- "$ zmloggerctl stop" did not help

- vi /opt/zimbra/libexec/zmlogprocess

#my $rawRetention = `${zimbra_home}/bin/zmprov -l gacf | egrep '^zimbraLogRawLifetime' | sed -e 's/zimbraLogRawLifetime: //'`;
   my $rawRetention = "31d";

#my $summaryRetention = `${zimbra_home}/bin/zmprov -l gacf | egrep
'^zimbraLogSummaryLifetime' | sed -e 's/zimbraLogSummaryLifetime: //'`;
   my $summaryRetention = "730d";

 

But then I found it. The zmmtaconfig has a watchdog process that will run every sixty seconds and restart services if they have crashed. I haven't had the services crash so I changed the value to five minutes. If you care about uptime should a service crash you shouldn't change this. However depending on when the service crashed it could be restarted sooner than five minutes.

# su - zimbra
# zmlocalconfig -e zmmtaconfig_interval=300

..

This is what someone else configured to overcome these problems and boost performance:

su - zimbra
zmlocalconfig -e zmmtaconfig_interval=6000
zmprov mcf zimbraLogRawLifetime 7d
zmprov mcf zimbraLogSummaryLifetime 30d
/opt/zimbra/libexec/zmlogprocess

su - zimbra
crontab -e
*/60 * * * * /opt/zimbra/libexec/zmstatuslog

Zimbra Version 6.0.1

After updating Zimbra 5.0.14 to 6.0.1 I ran into a same sort of problem again. The zimbralogger was using the CPU like crazy.
I executed the folowing command to stop te logging process and CPU went down from 50% with to 5% flat(!):

$ su - zimbra
$ zmprov ms fill_in_your_hostname -zimbraServiceEnabled logger

Then as the root user edit /etc/logrotate.d/zimbra and comment out all logger related start / reload commands e.g.

#      su - zimbra -c "/opt/zimbra/bin/zmswatchctl restart" > /dev/null 2>&1 || true
#      su - zimbra -c "/opt/zimbra/bin/zmlogswatchctl start"

Now I got a great load average once again: 0.03, 0.10, 0.21

 

Zimbra Version 6.0.7 (20 aug 2010)

Still the same issues after installing v 6.0.7 on a Fedora Core 11 x64 virtual machine on ESX4.1. Applied the same tricks to bring down CPU usage.

 

Zimbra Version 7.0.0 (07 febr 2011)

Looks like the problem is solved in version 7.0.0, read more here. I upgraded from version 6.0.10 and the cpu spikes are not there anymore.. And finally an upgrade introduced some new interesting features.

 

Comments  

 
+1 #5 Si 2010-04-17 14:35
Thanks a million for this! Have been fighting this and very slow SMTP performance for the last two days - I only have three users on the server so was pretty sure this wasn't a capacity issue! Performance is now a LOT better.
Cheers!
Quote
 
 
-1 #4 Mike Horist 2010-03-25 03:28
after searching for hours and trying various things... this post fixed my issues as well... latest version of zimbra as of this posting date ... rackable server running ESXi 4, 64 bit, 2 dual core opteron 275 CPUs, I gave this VM running Ubuntu 8.04 4GB RAM, and all 4 CPUs at first.. and the ESXi resource chart was like a roller coaster!

followed these instructions and nice and steady now (with only 1 CPU)
Quote
 
 
-1 #3 Andy 2009-12-13 10:37
Thanks for the tip - Big help!

Zimbra's an awesome product - but the CPU usage issue is pretty tragic compared to most mailservers!

Cheers - Andy ( http://www.gadgetaccess.com )
Quote
 
 
-1 #2 Matt 2009-08-17 13:30
awesome --- this did the trick, I searched the zimbra forums and couldnt find this simple answer
Quote
 
 
+1 #1 Bryan 2009-05-11 02:11
I found this command on the zimbra forums, which disables the watchdog (zmconfig__inte rval) . If you are not concerned with uptime, this may do the trick.

zmlocalconfig -e zmmtaconfig_wat chdog=FALSE
Quote
 

More KB Articles