Wednesday, January 14, 2009

Linux and EXT4

It was already announched and we could already find it in the latest Friday build of Ubuntu, EXT4 support under Ubuntu. EXT4 is a Journaling file system, a journaling file system is a file system that logs changes to a journal (usually a circular log in a dedicated area) before committing them to the main file system. Such file systems are less likely to become corrupted in the event of power failure or system crash.

And an other great thing is that it can be really fast, you can read some benchmarking at phoronix.com and you can read some nice information about testing softpedia.com. Ubuntu booting in 21.4 seconds,..... that is very very fast in my opinion. How much this is due to the EXT4 filesystem, I think there are also a lot of other things that can help in Ubuntu 9.04.

However the support of EXT4 under Linux is a good step, one of the great values of supporting EXT4 is that you now can work with very large volumes. EXT4 is supporting currently volumes up until 1 exbibyte and files up until 16 TiB. A other thing is the way EXT4 can 'reserve' space on the disk, this can come in handy when creating large files for for example virtual disks when running virtual machines also streaming and databases come to mind.

"The ext4 filesystem allows for pre-allocation of on-disk space for a file. The current methodology for this on most file systems is to write the file full of 0's to reserve the space when the file is created (although XFS has an ioctl to allow for true pre-allocation as well). This method would no longer be required for ext4; instead, a new preallocate() system call was added to the linux kernel for use by filesystems, including ext4 and XFS, that have this capability. The space allocated for files such as these would be guaranteed and would likely be contiguous. This has applications for media streaming and databases."

Besides this EXT4 is also trying to prevent in all kinds of ways to prevent fragmentation, EXT4 has an online defragmenter. Even with the various techniques used to avoid it, a long lived file system does tend to become fragmented over time. ext4 will have a tool which can defragment individual files or entire file systems.

No comments: