Linux – the best filesystem for log files on Linux

filesystemslinuxlog-files

What file system would you choose for your /var/log directory ?

Upd:

this is for a typical medium-load web/mail/ftp server. ext3/ext4 works just fine, but I have been thinking of other filesystems too. Main considerations are as following:

  • Log files are mostly written to. Reads are rare.
  • Underlying media is a typical hard disk drive.
  • No reliability requirements. If some files get corrupted, this won't be a big problem.
  • Logs are rotated on a daily basis. Logs for each day are saved in separate files. Older logs are deleted after six months.

Best Answer

I would use ext3 making sure you mount it with the noatime option and possibly with the data=writeback option.

(Otherwise I wouldn't spend too much time considering the question unless you are experiencing specific performance problems.)