Home  >  Article  >  Operation and Maintenance  >  What is the difference between ex3 and ex4 in linux

What is the difference between ex3 and ex4 in linux

青灯夜游
青灯夜游Original
2022-03-21 16:50:292842browse

Differences: 1. The file system of ext3 is 16TB, while that of ext4 is 1EB; 2. There can be 32,000 subdirectories in ext3, while the number of subdirectories in ext4 can be unlimited; 3. ext4 operates large files The efficiency is higher than ext3; 4. Data block allocation strategy, ext3 allocates as soon as possible, while ext4 allocates delayedly, etc.

What is the difference between ex3 and ex4 in linux

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

The difference between ex3 and ex4 in Linux

1. Larger file system and larger files

ext3: 16TB file system and maximum 2TB file, ext4: 1EB file system and maximum 16TB file.

2. Unlimited number of subdirectories

ext3: 32,000 subdirectories, ext4: unlimited number of subdirectories.

3. Extents

ext3 uses indirect block mapping, which is extremely inefficient when operating large files. For example, for a 100MB file, a mapping table of 25,600 data blocks (each data block size is 4KB) needs to be established in ext3.

ext4 introduces the concept of extents. Each extent is a set of continuous data blocks. The above file is expressed as "the file data is stored in the next 25,600 data blocks", which improves a lot of efficiency. .

4. Multi-block allocation

The data block allocator of ext3 can only allocate one 4KB block at a time. Writing a 100MB file requires calling the data block 25,600 times. allocator, and ext4's multiblock allocator "multiblock allocator" (mballoc) supports allocating multiple data blocks in one call.

5. Delayed allocation

The data block allocation strategy of ext3 is to allocate as soon as possible, while ext4 delays allocation as much as possible until the file is written in the cache. Allocating data blocks and writing them to disk optimizes the allocation of data blocks throughout the file, which can significantly improve performance when paired with the first two features.

6. Inode related features

ext3: 128byte, ext4: 256byte.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What is the difference between ex3 and ex4 in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn