2

I have ext4 partition, which holds disk image files VirtualBox works with. They all are fixed-size images (i.e. files never change their size). They are defragmented as much as possible (with e4defrag).

I assume that a lot of filesystem features are redundant in this case. I.e. as files are never created, never deleted, never change their size, only reading and "in-place" writing happens, and file contents are aligned on the hard-drive continuously, thus much simpler filesystem could be used in this case (no need for file attributes, directories, journal, etc). Theoretically, I could even use logical volumes instead of files in this case (I am just not sure that I want).

So, questions:

  1. How to tune ext4 filesystem, to get best performance in this case?
  2. May be another filesystem is more suitable? (Some filesystem that don't support directories, and only continuous fixed-size files?) Or may be Linux has a possibility to mount part of existing partition as a file? I.e. that I create unformatted partition /dev/sda2 and then

    • mount K-th to L-th bytes of it as /somepath1/somefile1.vdi,
    • mount M-th to N-th bytes of it as /somepath2/file2.vdi,
    • and so on.
0
  1. mkfs.ext4 -T largefile ... and never mind about defrag...
  2. Use LVM, not a filesystem.
  • "mkfs.ext4 -T largefile" This means inode_ratio = 1048576, blocksize = -1. Could you please explain how increasing inode_ratio improves performance and what means "blocksize = -1"? "and never mind about defrag" WAT??? "Use LVM, not a filesystem" Why? – sasha Apr 8 '14 at 14:28
  • 1
    Mountn your FS/partition whith noatime nodiratime attributes to increase performance. – albertovar Dec 1 '15 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.