PingDirectory

Tuning the file system

Administrators can tune ext3 and ext4 file systems by setting the file system flushes and noatime to improve server performance.

Newer ext4 systems use delayed allocation to improve performance. This delays block allocation until it writes data to disk. Delayed allocation improves performance and reduces fragmentation by using the actual file size to improve block allocation.

This feature might increase the risk of data loss in cases where a system loses power before all of the data has been written to disk. This can occur if a program is replacing the contents of a file without forcing a write to the disk with fsync. To reduce this risk, make sure the default auto_da_alloc option is enabled on ext4 file systems.

The following changes can be made in the /etc/fstab file.

Click the following tabs to see instructions for the type of tuning you want to perform.

  • Set file system flushes

  • Set noatime

Setting the file system flushes

Reduce the span between file system flushes to improve PingDirectory server performance.

About this task

By default, Linux servers running the ext3 file system flush the data to disk every five seconds.

Steps

  1. If the PingDirectory server is running on a Linux server using the ext3 file system, consider editing the mount options for that file system to include the following command.

    commit=1

    This variable changes the flush frequency from five seconds to one second.

  2. You should also set the flush frequency in the /etc/fstab file.

    Changing the mount command alone does not survive across reboots.

Setting noatime on ext3 and ext4 Systems

If your Linux server uses an ext3 or ext4 file system, set noatime to improve performance by turning off any atime updates during read access.

About this task

Additionally, set the flush frequency in the /etc/fstab file. Performing the change through the mount command alone does not survive across reboots.

Steps

  • Run the mount command for the relevant system.

    Choose from:

    • ext3 system:

      # mount -t ext3 -o noatime /dev/fs1
    • ext4 system:

      # mount -t ext4 -o noatime /dev/fs1