Παρασκευή 23 Ιανουαρίου 2009

Ubuntu 9.04

η τρίτη Alpha έκδοση του αναμενόμενου Ubuntu 9.04 (Jaunty Jackalope) και σύμφωνα με δοκιμές του softpedia θα είναι πάρα πολύ γρήγορο. Αυτό οφείλεται κυρίως στο νέο filesystem EXT4, που ανακοινώθηκε την παραμονή των Χριστουγέννων και πλέον είναι σταθερό και υποστηρίζεται από τον πυρήνα 2.6.28. Τα καλά νέα είναι ότι η επόμενη έκδοση του Ubuntu 9.04 θα υποστηρίζει το νέο αυτό σύστημα αρχείων μέσω του Ubuntu Installer, αν ο χρήστης επιλέξει manual partitioning κατά τη διάρκεια της εγκατάστασης.

Τα άσχημα νέα είναι ότι το EXT4 δεν θα είναι το προεπιλεγμένο σύστημα αρχείων μέχρι την έκδοση 9.10 που αναμένεται τον Οκτώβριο του 2009. Τα πλεονεκτήματα για τους χρήστες σε σχέση με το σύστημα αρχείων EXT3 είναι η γρηγορότερη εκκίνηση, η υποστήριξη μεγαλύτερων αρχείων (έως και 16TB)...

Large file system

The ext4 filesystem can support volumes with sizes up to 1 exabyte[6] and files with sizes up to 16 terabyte.

Extents

Extents are introduced to replace the traditional block mapping scheme used by ext2/3 filesystems. An extent is a range of contiguous physical blocks, improving large file performance and reducing fragmentation. A single extent in ext4 can map up to 128MB of contiguous space with a 4KB block size.[7]

Backward compatibility

The ext4 filesystem is backward compatible with ext3, making it possible to mount an ext3 filesystem as ext4.

Forward compatibility

The ext4 file system is partially forward compatible with ext3, that is, it can be mounted as an ext3 partition (using “ext3” as the filesystem type when mounting). However, if the ext4 partition uses extents (a major new feature of ext4), then the ability to mount the file system as ext3 is lost. Extents were enabled by default in the 2.6.23 kernel. Previously, the “extents” option was explicitly required (e.g. mount /dev/sda1 /mnt/point -t ext4dev -o extents).

Persistent pre-allocation

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 fallocate() 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.

Delayed allocation

Ext4 uses a filesystem performance technique called allocate-on-flush, also known as delayed allocation. It consists of delaying block allocation until the data is going to be written to the disk, unlike other file systems, which allocate the necessary blocks before that step. This improves performance and reduces fragmentation by improving block allocation decisions based on the actual file size.

Break 32,000 subdirectory limit

In ext3 the number of subdirectories that a directory can contain is limited to 32,000. This limit has been raised to 64,000 in ext4, and with the "dir_nlink" feature it can go beyond this (although it will stop increasing the link count on the parent). To allow for continued performance given the possibility of much larger directories, htree indexes (a specialized version of a B-tree) is turned on by default in ext4. This feature is implemented in Linux kernel 2.6.23. Htree is also available in ext3 when the dir_index feature is enabled.

Journal checksumming

Ext4 uses checksums in the journal to improve reliability, since the journal is one of the most used files of the disk. This feature has a side benefit; it can safely avoid a disk I/O wait during the journaling process, improving performance slightly. The technique of journal checksumming was inspired by a research paper from the University of Wisconsin titled IRON File Systems (specifically, section 6, called "transaction checksums").[8]

Online defragmentation

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.

Faster file system checking

In ext4, unallocated block groups and sections of the inode table are marked as such. This enables e2fsck to skip them entirely on a check and greatly reduce the time it takes to check a file system of the size ext4 is built to support. This feature is implemented in version 2.6.24 of the Linux kernel.

Multiblock allocator

Ext4 allocates multiple blocks for a file in single operation, which reduces fragmentation by attempting to choose contiguous blocks on the disk. The multiblock allocator is active when using O_DIRECT or if delayed allocation is on. This allows the file to have many dirty blocks submitted for writes at the same time, unlike the existing kernel mechanism of submitting each block to the filesystem separately for allocation.

[edit] Improved timestamps

As computers become faster in general and specifically Linux becomes used more for mission critical applications, the granularity of second-based timestamps becomes insufficient. To solve this, ext4 will have timestamps measured in nanoseconds. This feature is currently implemented in 2.6.23. In addition, 2 bits of the expanded timestamp field are added to the most significant bits of the seconds field of the timestamps to defer the year 2038 problem for an additional 500 years.

Support for date-created timestamps is added in ext4. But as Theodore Ts'o points out, while adding an extra creation date field in the inode is easy (thus technically enabling support for date-created timestamps in ext4), modifying or adding the necessary system calls, like stat() (which would probably require a new version), and the various libraries that depend on them (like glibc) is not trivial and would require the coordination of many different projects[9]. So even if ext4 developers implement initial support for creation-date timestamps, this feature will not be available to user programs for now.[9]


Δεν υπάρχουν σχόλια: