hunting the fatty

mancyborg at mancyborg at
Tue Nov 10 00:44:41 UTC 2015

Hello dear list,
I've recently discovered 'doveadm stats' and I'm trying to use "doveadm stats dump user" and "doveadm stats dump session"
to understand the pop/imap users that put more stress on the hard disks.

My problem is that some users refuse to delete their emails from the server,
so they keep 20GB of maildir files on the server, the webmail (roundcube) takes forever to open the inbox,
the imap searches takes forever
and meanwhile all the users wait.
(already tried roundcube + memcache(d) but didn't help)

So my problem is not the storage usage itself:
I don't care if the user gets tons of emails with big attachments;
my problem is when the user opens / searches an imap folder with more than 10K mails
and iostat util goes 100% for minutes.

So I've enabled dovecot's stats and enjoying "doveadm stats top", "" and "doveadm stats dump user/session",
but talking about "doveadm stats dump user" and its output fields:

user	reset_timestamp	last_update	num_logins	num_cmds	user_cpu	sys_cpu	min_faults	maj_faults	vol_cs	invol_cs	disk_input	disk_output	read_count	read_bytes	write_count	write_bytes	mail_lookup_path	mail_lookup_attr	mail_read_count	mail_read_bytes	mail_cache_hits

I'm not sure which of those fields can help me
and I can't find any relevant documentation.

So here are my questions:

1. is there a documentation for those 21 fields and for 'doveadm stats' in general ?
2. what's the difference between disk_output, read_bytes, read_count and mail_read_bytes ?
3. which field of those is, in your opinion, more representative for expressing the workload that gives me problems ?
4. which settings do I need to store 1 week worth of stats ?

I'm currenty using the 'standard' values:

  stats_refresh = 30 secs
  stats_track_cmds = yes
  stats_memory_limit = 16 M
  stats_command_min_time = 1 mins
  stats_domain_min_time = 12 hours
  stats_ip_min_time = 12 hours
  stats_session_min_time = 15 mins
  stats_user_min_time = 1 hours

Can you please tell me the correct parameters to store 1 week of stats ?

Thank you,

More information about the dovecot mailing list