Tuning with 'noatime' and 'dirsync'. Exactly WHICH dirs to tune?

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
RogerTennet
Advanced member
Advanced member
Posts: 50
Joined: Mon Dec 01, 2014 9:16 am

Tuning with 'noatime' and 'dirsync'. Exactly WHICH dirs to tune?

Postby RogerTennet » Sun Jan 18, 2015 10:12 am


I run

zmcontrol -v
Release 8.6.0.GA.1153.UBUNTU14.64 UBUNTU14_64 FOSS edition.

The fstab I have now is

cat /etc/fstab
/dev/sda1 /boot ext4 defaults 0 2
proc /proc proc nodev,noexec,nosuid 0 0
/dev/mapper/Z_BACKUP /opt/zimbra/backup ext4 defaults 0 2
/dev/mapper/Z_DB /opt/zimbra/db ext4 defaults 0 2
/dev/mapper/Z_INDEX /opt/zimbra/index ext4 defaults 0 2
/dev/mapper/Z_LOG /opt/zimbra/log ext4 defaults 0 2
/dev/mapper/Z_REDOLOG /opt/zimbra/redolog ext4 defaults 0 2
/dev/mapper/Z_ROOT / ext4 errors=remount-ro 0 1
/dev/mapper/Z_STORE /opt/zimbra/store ext4 defaults 0 2
/dev/mapper/Z_SWAP none swap sw 0 0
/dev/mapper/Z_ZIMBRA /opt/zimbra ext4 defaults 0 2

For performance tuning this page

http://wiki.zimbra.com/wiki/Performance_Tuning_Guidelines_for_Large_Deployments

says

"Mount your file systems with the noatime option. By default, the atime option is enabled and updates the last access time data for files. Mounting your file systems with the noatime option reduces write load on the disk subsystem."

and

"We recommend dirsync be enabled for all blob stores, Lucene search index directories, and MTA queues."


(1) Are we supposed to add 'noatime' to ALL the filesystems on the server? Or just some?

(2) Which specific set of DIRS are the "all blob stores, Lucene search index directories, and MTA queues"? Sounds like you should avoid "/" at least.

(3) When you add 'noatime' & 'dirsync' options to fstab where 'defaults' is set now, do you just ADD in front of the 'defaults' like this


- /dev/mapper/Z_ZIMBRA /opt/zimbra ext4 defaults 0 2
+ /dev/mapper/Z_ZIMBRA /opt/zimbra ext4 noatime,dirsync,defaults 0 2

? Or do you have to REMOVE the 'defaults' and replace it with specific options?


User avatar
pup_seba
Outstanding Member
Outstanding Member
Posts: 687
Joined: Sat Sep 13, 2014 2:43 am
Location: Tarragona - Spain
Contact:

Tuning with 'noatime' and 'dirsync'. Exactly WHICH dirs to tune?

Postby pup_seba » Mon Jan 19, 2015 8:31 am

Hi,



Those are good questions that should maybe be addressed by default in the wiki. In any case, I would recomend to:



noatime in all your mountpoints.

dirsync in all your mountpoints except your "/" and swap.



Boy...those are a lot of mount points you have in there! :) I have deployments for several thousands of users and don't use even half of those mount point. If that's necessary, ok. If it is not, maybe you are complicating things.



defaults should stay in there and lines look like this:

/dev/mapper/Z_ZIMBRA /opt/zimbra ext4 defaults, noatime, dirsync 0 2



Just in case is a good idea for you, what I usually do is:



sda - 30 GB - Thick lazy

sda1 - /boot - 200 MB - noatime & dirsync

sda2 - swap - 6 GB - noatime

sda3 - / - noatime



sdb - n GB - Thick eager

LVM - /opt/zimbra - noatime & dirsync



sdc - n GB - Thin

LVM - /opt/zimbra/backup - noatime & dirsync



sdd - n GB - thick lazy

LVM - /var/log/ - noatime & dirsync

- /opt/zimbra/log - noatime & dirsync

- /opt/zimbra/stats - noatime & dirsync



Everything w/ext4 and if you are using vmware as your hypervisor, all controllers Paravirtualized.
RogerTennet
Advanced member
Advanced member
Posts: 50
Joined: Mon Dec 01, 2014 9:16 am

Tuning with 'noatime' and 'dirsync'. Exactly WHICH dirs to tune?

Postby RogerTennet » Mon Jan 19, 2015 1:09 pm

<pre>

> noatime in all your mountpoints.



Ok.



I set /home to defaults,relatime -- mainly to keep my local 'mutt' happy.



> dirsync in all your mountpoints except your "/" and swap.



Ok.



> Boy...those are a lot of mount points you have in there



Yeah -- There's no harm in it though, and for me it keeps housekeeping easy.



And, I added one for /var/log with dirsync, since "/" doesn't get it :-)



> defaults should stay in there and lines look like this:

> /dev/mapper/Z_ZIMBRA /opt/zimbra ext4 defaults, noatime, dirsync 0 2



Ok. I kindof understood 'defaults' wasn't really needed -- since it IS "the default". So good to know.



> Everything w/ext4



Ok. Except for swap.



> and if you are using vmware as your hypervisor



Not here. Zimbra's got its own real box.



> , all controllers Paravirtualized.



Sooner or later I'll add one to a Xen server. So OK.



Thanks for the howto & ideas!

</pre>
User avatar
ccelis5215
Outstanding Member
Outstanding Member
Posts: 612
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P12

Tuning with 'noatime' and 'dirsync'. Exactly WHICH dirs to tune?

Postby ccelis5215 » Fri Jan 23, 2015 6:03 pm

deleteMe ¡?
metux
Advanced member
Advanced member
Posts: 146
Joined: Mon Jul 28, 2014 6:21 pm

Tuning with 'noatime' and 'dirsync'. Exactly WHICH dirs to tune?

Postby metux » Wed Feb 04, 2015 4:38 pm

maybe move /opt/zimbra to different spindle, and put the ext4 journal on an SSD.



for the VM - if the host is Linux: switch to kvm w/ parvirt (vmware's io performance is horrible), increase the vm memory, limit the (guest) kernel's cache size and drop the swap (IOW: let the host do the swapping).

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 16 guests