5

I have partition, which I'm going to use for keeping VirtualBox disk images (VDI, or may be VMDK). They are fixed-size (not dynamically-allocated) images. There are no other files/directories on partition (only several *.vdi files in the root directory of partition).

Which ext4 parameters are best for that purpose? As partition contains only few fixed-size ~20 GB files, and no other files are ever created on partition -- I guess some special flags can be used to optimize performance.

Requirements:

  1. Stability: images must not corrupt in case of sudden power-off (or, at least, they should corrupt no more than with default ext4 options).
  2. Maximum performance.

2 Answers 2

7

The following mount options should be suitable:

noatime,nodiratime,journal_async_commit

Also I think it is always makes sense to use "journal_checksum" but on modern systems it will be used by default.

5
  • Thanks. I'm not sure whether your answer if correct/complete, but at least, it goes into direction I wanted.
    – Sasha
    Commented May 5, 2014 at 12:18
  • cs.rochester.edu/~kshen/papers/fast2014.pdf Commented Sep 27, 2014 at 4:26
  • update /etc/fstab and "mount -o remount,noatime,nodiratime,journal_async_commit /" Commented Oct 17, 2014 at 16:00
  • raid6.com.au/posts/fs_ext4_external_journal Commented Mar 8, 2015 at 5:08
  • noatime Do not update inode access times on this filesystem (e.g. for faster access on the news spool to speed up news servers). This works for all inode types (directories too), so it implies nodiratime. Commented Sep 22, 2018 at 13:18
0

To get maximum performance, make sure you do RAID stripe size alignment correctly, this can have a pretty big performance impact.

For large files, just make sure you are using extents and you shall be good.

Off-topic: XFS is usually a better option in this case and even RHEL switches over to XFS as default filesystem in RHEL7. If you want high availability of the Virtual Images and you have multiple storage servers, use Ceph.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .