📜 ⬆️ ⬇️

File systems

Everyone sometimes has a question what file system to choose and for what? I also had a choice of configuration, and after running the tests it became interesting, what is the difference between one file system and another? What is the difference? What are their pros and cons? What is the advantage of one file system over another?

Unfortunately, there is very little information on this topic, especially in Russian. Therefore, I decided to consider this issue and put everything together.

Only linux file systems are considered. So who is also interested in, please under the cat.
')

First of all, different tests show different results (as different tests are carried out in different ways), so you cannot be completely objective, referring to the numbers. This must be taken into account.

Bonnie ++ and postmark were used. I will not give the results, because I should not do this (this is not a public test, I do not think I have the right to spread them, please excuse me). Therefore I will confine myself to small conclusions.

Leads on ext2 performance, jfs is not far behind, then reiserfs, ext3, and xfs.

If we compare the most common file systems with each other, then we get the following:

The performance loss for xfs as you add intermediate levels of device mapper 'a is less significant than for ext3.

ext3 is a regular, glossy, file system that is relatively simple in internal organization, due to which it is not particularly efficient. Supported by anything, compatible with ext2. Usually set by default for exactly these reasons. In addition, there is little risk of losing anything.

xfs is more complex, more efficient in working with large files, works well with large directories for reading and searching them. Effectively implemented ACL support. Low processor load.

Features when working with LVM2 - the size of the ext3 file system can be either increased or decreased, but only with the unmounted file system, unlike xfs, which can only be increased, but on a mounted file system, that is, without interrupting work with it.

for xfs it is also possible to forcibly flush buffers to disk without unmounting and interrupting work with it. For ext3 snapshot via LVM will be similar to the state of the file system when the power is turned off. But the developers promised to fix this case in new versions of the kernel.

When working with xfs, ups are vital, and it is not recommended to keep the root file system on it, since xfs believes that the contents of files that were open to write when an incorrect system interruption is not defined, and it fills these files with zeros. (deadly for database)

ext2 is the same ext3, but without journaling support, due to which it runs faster.

jfs gives a good boost in speed. The advantage of this file system is that it is possible to recover data from a damaged volume, or erased data, unlike ext3, but at the same time, jfs does not save data about deleted directories in files, which makes it difficult to search. No limit on the number of files. It is equally productive both on files of small volume and on files of large volume. fsck works very fast. The minimum load on the processor is optimized for operation in a multiprocessor environment. The section can only be increased. Ideal for storing root filesystems.

reiserfs - not fully developed, and now not developed, file system, because its developer is in prison . reiserfs is a fairly fast file system, but on the condition that the files are small. Disadvantages - high load on the processor, there are frequent cases of irretrievable loss of information when a file system crashes. Can be used for any cache.

On this, in general, everything. Have a nice day

ps: adequate people suggested that there was already a brief overview of fs in Habré. I post his link here.

Source: https://habr.com/ru/post/54043/


All Articles