Size of /opt/zimbra/data/mailboxd directory

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
Chris-M
Posts: 23
Joined: Thu Jul 30, 2015 2:24 pm

Size of /opt/zimbra/data/mailboxd directory

Post by Chris-M »

On our ZCS 8.8.6 install we have noticed that the size of the /opt/zimbra/data/mailboxd directory is growing quite substantially.

I've checked and the two largest directories in that directory are:

Code: Select all

12G     imap-active-session-cache_85be333d34866255dbb2082ee3fb1a79544d0878
1.2G    imap-inactive-session-cache_fc164b40eddbe2ccbc469be50b2e7494ea03619a
The imap-active-session-cache directory is growing by ~1GB per day. We only have a handful of users using the system so is it possible to delete/reset these cache directories? What's the recommended procedure to do that?

I searched the forum and found some posts about setting zimbraImapActiveSessionEhcacheMaxDiskSize to a lower value, which I have done but it didn't seem to have any effect on the size of the above directories. For reference the command I ran was as follows:

Code: Select all

zmprov ms mail.domain.com zimbraImapActiveSessionEhcacheMaxDiskSize 10737418240
Thanks in advance,
Chris
racerock
Posts: 22
Joined: Tue Sep 20, 2016 10:09 am

Re: Size of /opt/zimbra/data/mailboxd directory

Post by racerock »

I tried this as I too have a large size in a production box but it seemed to make no difference I noted the below reference points info seems contradictory ??

In a dev server I tried the delete (zmcontrol stop, deleted the contents zmcontrol start) and so far no ill effects but this was a very limited test with only 2 mailbox imap interaction and only about 80mb in files roughly 50 / 30 split ....


My reference points
https://bugzilla.zimbra.com/show_bug.cgi?id=74478#c1

See the last comment (N0 6) not sure if that helps

And The 8.8.6 Admin Guide: https://zimbra.github.io/adminguide/latest/index.html

zimbraImapInactiveSessionCacheMaxDiskSize. Specifies the maximum disk size of inactive IMAP cache in Bytes before eviction. By default this value is 10GB. This is a rough limit, because due to internals of Ehcache actual size on disk will often exceed this limit by a modest margin.

zimbraImapInactiveSessionEhcacheSize. Specifies the maximum heap size of the inactive session cache in Bytes before eviction. By default this value is 1 megabyte. This is a rough limit, because due to internals of Ehcache actual size in memory will often exceed this limit by a modest margin.

zimbraImapActiveSessionEhcacheMaxDiskSize. Specifies the maximum amount of disk space the imap active session cache will consume in Bytes before eviction. By default this value is 100 gigabytes. This is a rough limit, because due to internals of ehcache actual size in memory will often exceed this limit by a modest margin.
Chris-M
Posts: 23
Joined: Thu Jul 30, 2015 2:24 pm

Re: Size of /opt/zimbra/data/mailboxd directory

Post by Chris-M »

Thanks for your reply.

How should I properly adjust the zimbraImapActiveSessionEhcacheMaxDiskSize value?

I have tried this command to set it to 10GB:

Code: Select all

zmprov mcf zimbraImapActiveSessionEhcacheMaxDiskSize 10737418240
But when I query the value it still shows 100GB:

Code: Select all

[zimbra@mail /]$ zmprov desc -a zimbraImapActiveSessionEhcacheMaxDiskSize
zimbraImapActiveSessionEhcacheMaxDiskSize
    Ehcache: the maximum amount of disk space the imap active session
    cache will consume in Bytes before eviction. By default this value is
    100 gigabytes. This is a rough limit,Due to internals of ehcache
    actual size in memory will often exceed this limit by a modest margin.

               type : long
              value :
           callback :
          immutable : false
        cardinality : single
         requiredIn :
         optionalIn : server,alwaysOnCluster,globalConfig
              flags : serverInherited,serverPreferAlwaysOn
           defaults : 107374182400
                min :
                max :
                 id : 3005
    requiresRestart : mailbox
              since : 8.7.6
    deprecatedSince :
phoenix
Ambassador
Ambassador
Posts: 27272
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Size of /opt/zimbra/data/mailboxd directory

Post by phoenix »

The simple question to ask yourself is did you restart the mailbox service as mentioned in the "zmprov desc" command.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
Chris-M
Posts: 23
Joined: Thu Jul 30, 2015 2:24 pm

Re: Size of /opt/zimbra/data/mailboxd directory

Post by Chris-M »

Yes, I did restart Zimbra services ("/etc/init.d/zimbra restart" as root) after making the change.

Should the 'defaults' value get updated or would it always remain the same? The word 'defaults' would imply it's displaying what the default value is.
phoenix
Ambassador
Ambassador
Posts: 27272
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Size of /opt/zimbra/data/mailboxd directory

Post by phoenix »

Yes that displays what the originally specified default is, AFAIK.

The item you should be changing is a "zmlocalconfig" entry as mentioned in comment 1, as also noted in there it's a reference to the actual number of entries not it's disk space usage. If you want to remove the cache there's a comment that also mentions how to do that but I'd suggest you make sure no users are online that are using IMAP.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
Chris-M
Posts: 23
Joined: Thu Jul 30, 2015 2:24 pm

Re: Size of /opt/zimbra/data/mailboxd directory

Post by Chris-M »

How would I adjust the value of zimbraImapActiveSessionEhcacheMaxDiskSize with zmlocalconfig? I checked the output of zmlocalconfig and don't see zimbraImapActiveSessionEhcacheMaxDiskSize listed.

I would prefer to limit the size of the cache rather than nuking it, as it'll then grow large again over time.

Thanks for your help!
racerock
Posts: 22
Joined: Tue Sep 20, 2016 10:09 am

Re: Size of /opt/zimbra/data/mailboxd directory

Post by racerock »

In answer to your query I did my testing by Nuking it then setting against the actual server name so :

Default is 10gb i.e. 10737418240 I will Set as 1GB

Code: Select all

zmprov ms yourmailserver.domain.com zimbraImapInactiveSessionCacheMaxDiskSize 1073741824

Default is 100gb i.e. 107374182400 I will Set as 10 Gb

Code: Select all

zmprov ms yourmailserver.domain.com zimbraImapActiveSessionEhcacheMaxDiskSize 10737418240

Then zmcontrol restart or a reboot

You can then check the setting by ( as Zimbra User) issue command :

Code: Select all

zmprov gs yourmailserver.domain.com zimbraImapActiveSessionEhcacheMaxDiskSize
and

Code: Select all

zmprov gs yourmailserver.domain.com zimbraImapInactiveSessionCacheMaxDiskSize
Post Reply