[Dovecot] interesting stats pattern
Cor Bosman
cor at xs4all.nl
Tue May 29 21:03:53 EEST 2012
On May 29, 2012, at 2:21 PM, Timo Sirainen wrote:
> On 29.5.2012, at 13.23, Cor Bosman wrote:
>
>> Hey all, im experimenting with dovecot stats service, and graphing the result. My initial results are kind of interesting. Check out this graph showing connected sessions and users:
>>
>> http://grab.by/dReu
>
> How do you get the list? Are you periodically just getting list of sessions/users with doveadm stats dump?
>
>> Anyone have any idea what could cause such a pattern? Maybe dovecot does some cleaning up of idle sessions at specific intervals? Or maybe our loadbalancers do, or the imapdirectors.
>
> doveadm stats dump by default dumps a lot of historic data as well. If you want to see only the currently connected sessions/users, add "connected" parameter.
>
> Note that I'm not entirely sure what would be the best API for getting the stats. I'm also thinking that for best behavior the stats process should simply be dumping the data to some permanent database, and you'd do the lookups from there. Otherwise data is lost when Dovecot restarts. The dumping to db could already be done with a "doveadm stats dump" cronjob that runs e.g. once a minute.
>
> And/or perhaps stats process should be saving its state permanently to /var/lib/dovecot/ and loading it at startup. Still, a permanent DB would probably be better for some purposes.
Yes, I am getting a list of sessions/users every 5 minutes through cron. Im already using "doveadm stats dump session/user connected"
It's not a big deal or anything, just wondering about the weird patterns. If it's really dropping/gaining connections, id like to figure out why.
Cor
More information about the dovecot
mailing list