As a quick bit of background, we're evaluating Zimbra at work (Tufts University), but I'm also in the midst of moving to Zimbra for my personal mail. At home, I'm running:
Release 5.0.1_GA_1902.UBUNTU6 UBUNTU6 FOSS edition
Over the past few days, I've been working on moving my mail archives (around 570,000 messages going more than 10 years, almost 3GB) to my zimbra server.
Prior to the import, I was testing with a few months of mail and my daily incoming mail (about 1-2k messages total) and performance was great. Now that the import is done, I'm seeing terrible performance.
My server is on the small side, but I'm the only user on it and it's a dedicated zimbra server. It's a 2.4Ghz P4 with 1GB ram and a 6 disk hardware raid-5 (Yes, I know RAID5 sucks for mail and wouldn't ever do it in 'production', but I'm seeing reasonable wait/service times). A quick grep of the logs shows me getting 200-600 incoming messages per day over the past week.
When idle, mysql is always consuming at least 25% of the CPU, and I've seen it spike to 99% for long periods of time. Here's a snip of top:
My mail client of choice is mutt, which doesn't seem to deal well with the slowness. It's nearly unusable, taking seconds to just move up and down the message selector. A quick look at strace shows that sometimes it's seeing 10-15seconds delay on the recv() syscall. The Zimbra webmail is slightly usable, and Thunderbird is about the same. Apple Mail is really unhappy and just recently started showing me doubles of most of my recent mail in my Inbox.Code:top - 17:47:01 up 14 days, 7:16, 5 users, load average: 2.18, 2.22, 2.22 Tasks: 112 total, 3 running, 109 sleeping, 0 stopped, 0 zombie Cpu(s): 4.3% us, 0.7% sy, 0.0% ni, 0.0% id, 94.7% wa, 0.0% hi, 0.3% si Mem: 1035672k total, 1024132k used, 11540k free, 472k buffers Swap: 497972k total, 314308k used, 183664k free, 222680k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 11882 zimbra 16 0 343m 247m 2992 S 4.3 24.5 81:28.82 mysqld top - 18:05:26 up 14 days, 7:34, 5 users, load average: 1.74, 2.06, 2.18 Tasks: 111 total, 2 running, 109 sleeping, 0 stopped, 0 zombie Cpu(s): 68.6% us, 4.3% sy, 0.0% ni, 0.0% id, 27.1% wa, 0.0% hi, 0.0% si Mem: 1035672k total, 1025068k used, 10604k free, 152k buffers Swap: 497972k total, 305196k used, 192776k free, 215136k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 11882 zimbra 16 0 343m 248m 3008 S 72.4 24.6 87:11.77 mysqld
Looking thru the myslow.log, I see a lot of SELECT COUNT(*) transactions showing up and sometimes taking more than 5-10+ seconds:
Lastly, looking at iostat shows a large amount of read activity (almost 10MB/sec) that I can't really pin down. Is there any way to better trace what Zimbra is doing?Code:# Time: 080115 17:51:51 # User@Host: zimbra[zimbra] @ localhost [127.0.0.1] # Query_time: 14 Lock_time: 0 Rows_sent: 1 Rows_examined: 556853 SELECT COUNT(*) FROM mboxgroup3.mail_item WHERE mailbox_id = 3 AND folder_id = 28488 AND type IN (5,16,6) AND (imap_id IS NULL OR imap_id = 0 OR imap_id > 0); # Time: 080115 17:52:05 # User@Host: zimbra[zimbra] @ localhost [127.0.0.1] # Query_time: 12 Lock_time: 0 Rows_sent: 1 Rows_examined: 556853 SELECT COUNT(*) FROM mboxgroup3.mail_item WHERE mailbox_id = 3 AND folder_id = 28488 AND type IN (5,16,6) AND (imap_id IS NULL OR imap_id = 0 OR imap_id > 0); # Time: 080115 17:52:20 # User@Host: zimbra[zimbra] @ localhost [127.0.0.1] # Query_time: 10 Lock_time: 0 Rows_sent: 1 Rows_examined: 556853 SELECT COUNT(*) FROM mboxgroup3.mail_item WHERE mailbox_id = 3 AND folder_id = 28488 AND type IN (5,16,6) AND (imap_id IS NULL OR imap_id = 0 OR imap_id > 0); # Time: 080115 17:52:35 # User@Host: zimbra[zimbra] @ localhost [127.0.0.1] # Query_time: 10 Lock_time: 0 Rows_sent: 1 Rows_examined: 556853 SELECT COUNT(*) FROM mboxgroup3.mail_item WHERE mailbox_id = 3 AND folder_id = 28488 AND type IN (5,16,6) AND (imap_id IS NULL OR imap_id = 0 OR imap_id > 0); # Time: 080115 17:52:49 # User@Host: zimbra[zimbra] @ localhost [127.0.0.1] # Query_time: 9 Lock_time: 0 Rows_sent: 1 Rows_examined: 556853 SELECT COUNT(*) FROM mboxgroup3.mail_item WHERE mailbox_id = 3 AND folder_id = 28488 AND type IN (5,16,6) AND (imap_id IS NULL OR imap_id = 0 OR imap_id > 0); # Time: 080115 17:52:52 # User@Host: zimbra[zimbra] @ localhost [127.0.0.1] # Query_time: 2 Lock_time: 0 Rows_sent: 1 Rows_examined: 29118 SELECT COUNT(*) FROM mboxgroup3.mail_item WHERE mailbox_id = 3 AND folder_id = 663 AND type IN (5,16,6) AND (imap_id IS NULL OR imap_id = 0 OR imap_id > 581022); # Time: 080115 17:53:08 # User@Host: zimbra[zimbra] @ localhost [127.0.0.1] # Query_time: 14 Lock_time: 0 Rows_sent: 1 Rows_examined: 556853 SELECT COUNT(*) FROM mboxgroup3.mail_item WHERE mailbox_id = 3 AND folder_id = 28488 AND type IN (5,16,6) AND (imap_id IS NULL OR imap_id = 0 OR imap_id > 0); # Time: 080115 17:53:21 # User@Host: zimbra[zimbra] @ localhost [127.0.0.1] # Query_time: 10 Lock_time: 0 Rows_sent: 1 Rows_examined: 556853 SELECT COUNT(*) FROM mboxgroup3.mail_item WHERE mailbox_id = 3 AND folder_id = 28488 AND type IN (5,16,6) AND (imap_id IS NULL OR imap_id = 0 OR imap_id > 0); # Time: 080115 17:53:36 # User@Host: zimbra[zimbra] @ localhost [127.0.0.1] # Query_time: 9 Lock_time: 0 Rows_sent: 1 Rows_examined: 556853 SELECT COUNT(*) FROM mboxgroup3.mail_item WHERE mailbox_id = 3 AND folder_id = 28488 AND type IN (5,16,6) AND (imap_id IS NULL OR imap_id = 0 OR imap_id > 0);
I realize the box I'm on is a bit small, but I would have hoped for a single user performance would have been ok. Is it possible I've tripped on a bug?Code:Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util sda 3.99 49.10 154.69 17.56 18703.39 517.56 9.13 0.25 111.58 1.33 7.73 3.88 66.87 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 avg-cpu: %user %nice %system %iowait %steal %idle 54.38 0.00 4.58 41.04 0.00 0.00 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util sda 2.39 5.18 108.76 6.97 12698.01 135.46 6.20 0.07 110.88 0.87 7.52 4.73 54.78 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 avg-cpu: %user %nice %system %iowait %steal %idle 35.73 0.00 3.99 60.28 0.00 0.00 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util sda 4.79 0.00 170.66 5.59 29954.49 64.07 14.63 0.03 170.32 1.00 5.69 3.77 66.47 sdb 0.00 0.00 0.20 0.20 3.19 3.19 0.00 0.00 16.00 0.00 10.00 10.00 0.40 sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 avg-cpu: %user %nice %system %iowait %steal %idle 25.95 0.00 3.99 53.89 0.00 16.17 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util sda 6.19 2.99 157.49 10.58 19811.58 119.76 9.67 0.06 118.59 2.13 12.67 3.52 59.08 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 avg-cpu: %user %nice %system %iowait %steal %idle 58.08 0.00 5.99 35.93 0.00 0.00 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util sda 4.59 0.00 116.97 3.19 11356.49 36.33 5.55 0.02 94.81 0.70 5.85 3.85 46.31 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 avg-cpu: %user %nice %system %iowait %steal %idle 37.72 0.00 5.39 56.89 0.00 0.00 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util sda 2.00 0.20 157.09 4.39 27934.53 57.49 13.64 0.03 173.35 0.84 5.19 3.57 57.68 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 avg-cpu: %user %nice %system %iowait %steal %idle 25.35 0.00 5.19 66.07 0.00 3.39 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util sda 159.08 0.00 226.55 8.78 21189.62 103.59 10.35 0.05 90.48 1.24 5.26 3.26 76.65 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Any suggestions for how to proceed would be most welcome.
-j


LinkBack URL
About LinkBacks






