Symptoms
Your server may be experiencing high IOWait or disk Utilization. Sometimes you may also see that the filesystem journal is consuming a large amount of IO when using iotop to examine IO usage.
Introduction
Please keep in mind that operating system configuration and tuning are tasks that are best handled by a systems administrator with the skills, training, and expertise required to do so for you.
Although this kind of task is not related to cPanel or the basic configuration of cPanel we would like to offer the following information as a courtesy.
The following information is specifically geared towards tuning EXT-4 filesystems, although some of the configurations may be applicable to other filesystems. You should consult the manual for your filesystem for additional details about performance tuning.
Performance Tuning Mount Options for /etc/fstab
The following mount options should be considered when attempting to improve filesystem I/O performance.
notime
The noatime mount option makes it so that the Access timestamp is not updated on files. The downside to this is that you lose the access timestamp functionality. The benefit is that this removes the disk write that was required when each file is read. In most applications, the access timestamp is not critical information so it can be easy to make this trade-off in pursuit of better performance.
data=writeback
The writeback setting for the data option makes it so that journaling is only done for metadata. The downside is that a crash & recovery can cause incorrect data to appear in files which were written shortly before the crash. The benefit is that in most workloads performance will be improved because the actual data is not being journaled, only metadata.
nobarrier
The nobarrier option disables the use of journal write barriers. Write barriers enforce proper on-disk ordering of journal commits, making volatile disk write caches safe to use, at some performance penalty. If your disks are battery-backed in one way or another, disabling barriers may safely improve performance.
commit=#
Ext4 can be told to sync all its data and metadata every 'nrsec' seconds. The default value is 5 seconds. This means that if you lose your power, you will lose as much as the latest 5 seconds of work (your filesystem will not be damaged though, thanks to the journaling). This default value (or any low value) will hurt performance, but it's good for data-safety. Setting it to 0 will have the same effect as leaving it at the default (5 seconds). Setting it to very large values will improve performance at the risk of dataloss in the event of power loss.
nobh
This makes it so that buffer_heads are not attached to the file pagecache. This only works with data=writeback.
Example /etc/fstab
Here is an example configuration that you might put into your /etc/fstab:
UUID=xxxxxx /home ext4 noatime,barrier=0,data=writeback,nobh,commit=100 0 2
Comments
0 comments
Article is closed for comments.