Current location - Recipe Complete Network - Complete cookbook - What does lfs mean?
What does lfs mean?
LFS──Linux from Scratch is an installation method of downloading source code directly from the Internet and compiling Linux from scratch. It's not a distribution, it's just a recipe that tells you where to buy food (download the source code) and how to make these source codes into dishes that suit your taste-personalized Linux, not just personalized desktop.

Log structure file system is a far-reaching design, which affects modern high-performance file system. Many performance-oriented special application file systems, such as WAFL, Sprint and ZFS, are based on the concept of LFS. Because the general file system can only use 10~ 15% of the disk bandwidth, the LFS can be increased to 80%.

This is because the IO bandwidth of today's disk drives is already very fast. However, due to the limited acceleration of the mechanical motion of the head track and the time required for the disk to rotate to the required sector, it is much faster to read continuous sectors with less mechanical motion than to read random ones that require a lot of mechanical motion. However, according to research, about 80% of UNIX file systems are small files below 8K, and small files scattered everywhere will cause a lot of random reading, which will make disk I/O obvious.

In order to make full use of disk I/O bandwidth and reduce random reading and writing, LFS defines a segment as a basic disk access unit, which consists of small continuous sectors with a size of 565,438+02kB (65,438+0024 sectors). LFS assumes that the system has a large enough cache, so the disk drive will focus on writing (because most of the reads will come from the cache).

As the name implies, LFS itself regards the file system as a huge log. Its advantage is that it can easily handle the problems caused by abnormal shutdown, and only need to check the last written sector. However, it has a relative disadvantage, that is, there must be enough free space at the end of the log to add/change files. Therefore, once the log is full, all deleted files in the log must be cleared to free up space, and the vacated space must be moved back to the end for reuse.

Segment cleaning is a very heavy task, which will occupy most of the disk bandwidth, so the system performance will be dragged down, resulting in a very big problem in LFS implementation.

In addition, although LFS clusters small files into segments, which greatly improves the writing efficiency, it may still be necessary to read small files in each segment when reading, because segments are large IO units, resulting in IO bottlenecks. When there is no such file in the cache, the reading efficiency will slow down.