• 欢迎访问速搜资源吧,如果在网站上找不到你需要的资源,可以在留言板上留言,管理员会尽量满足你!

【速搜问答】xfs是什么

问答 admin 5个月前 (09-22) 78次浏览 已收录 0个评论

汉英对照:
Chinese-English Translation:

XFS一种高性能的日志文件系统,是IRIX 5.3版的默认文件系统。以GNU通用公共许可证发布这套系统的源代码,之后被移植到Linux 内核上。XFS 特别擅长处理大文件,同时提供平滑的数据传输。

XFS, a high-performance log file system, is the default file system for IRIX version 5.3. The source code of this system is released under the GNU General Public License, and then transplanted to the Linux kernel. XFS is particularly good at handling large files while providing smooth data transfer.

XFS 一种高性能的日志文件系统,最早于 1993 年,由 Silicon Graphics 为他们的 IRIX 操作系统而开发,是 IRIX 5.3 版的默认文件系统。2000 年 5 月,Silicon Graphics 以 GNU 通用公共许可证发布这套系统的源代码,之后被移植到 Linux 内核上。XFS 特别擅长处理大文件,同时提供平滑的数据传输。

XFS, a high-performance log file system, was first developed by Silicon Graphics for their IRIX operating system in 1993. It is the default file system for IRIX version 5.3. In May 2000, Silicon Graphics released the source code of the system under the GNU General Public License, and then was transplanted to the Linux kernel. XFS is particularly good at handling large files while providing smooth data transfer.

XFS 最初是由 Silicon Graphics,Inc. 于 90 年代初开发的。那时,SGI 发现他们的现有文件系统(existing filesystem,EFS)正在迅速变得不适应当时激烈的计算竞争。为解决这个问题,SGI 决定设计一种全新的高性能 64 位文件系统,而不是试图调整 EFS 在先天设计上的某些缺陷。因此,XFS 诞生了,并于 1994 年随 IRIX 5.3 的发布而应用于计算。

XFS was originally developed by Silicon Graphics, Inc. in the early 1990s. At that time, SGI found that their existing file system (EFS) was rapidly becoming incompatible with the fierce computing competition at that time. In order to solve this problem, SGI decided to design a new high-performance 64 bit file system instead of trying to adjust some inherent defects of EFS. As a result, XFS was born and applied to computing with the release of IRIX 5.3 in 1994.

简介

brief introduction

XfS 文件系统是 SGI 开发的高级日志文件系统,XFS 极具伸缩性,非常健壮。所幸的是 SGI 将其移植到了 Linux 系统中。在 linux 环境下。目前版本可用的最新 XFS 文件系统的为 1.2 版本,可以很好地工作在 2.4 核心下。

XFS file system is an advanced log file system developed by SGI. XFS is highly scalable and robust. Fortunately, SGI transplanted it to Linux system. In Linux environment. The latest XFS file system available in the current version is version 1.2, which works well under the 2.4 core.

XFS 是 Silicon Graphics,Inc. 于 90 年代初开发的。它至今仍作为 SGI 基于 IRIX 的产品(从工作站到超级计算机)的底层文件系统来使用。现在,XFS 也可以用于 Linux。XFS 的 Linux 版的到来是激动人心的,首先因为它为 Linux 社区提供了一种健壮的、优秀的以及功能丰富的文件系统,并且这种文件系统所具有的可伸缩性能够满足最苛刻的存储需求。

XFS was developed by Silicon Graphics, Inc. in the early 1990s. It is still used today as the underlying file system for SGI IRIX based products, from workstations to supercomputers. Now XFS can also be used for Linux. The coming of Linux version of XFS is exciting, first of all, because it provides a robust, excellent and feature rich file system for the Linux community, and the scalability of this file system can meet the most demanding storage requirements.

历史

history

XFS 的开发始于 1993 年,在 1994 年被首次部署在 IRIX 5.3 上。2000 年 5 月,XFS 在 GNU 通用公共许可证下发布,并被移植到 Linux 上。2001 年 XFS 首次被 Linux 发行版所支持,现在所有的 Linux 发行版上都可以使用 XFS。

XFS was developed in 1993 and was first deployed on IRIX 5.3 in 1994. In May 2000, XFS was released under the GNU General Public License and transplanted to Linux. XFS was first supported by Linux distributions in 2001 and is now available on all Linux distributions.

XFS 最初被合并到 Linux 2.4 主线中,这使得 XFS 几乎可以被用在任何一个 Linux 系统上。Arch, Debian, Fedora, openSUSE, Gentoo, Kate OS, Mandriva,Slackware, Ubuntu, VectorLinux 和 Zenwalk 的安装程序中都可选择 XFS 作为文件系统,但由于默认的启动管理器 GRUB 中存在 bug,以上发行版中只有少数几个允许用户在 /boot 挂载点(引导目录)上使用 XFS 文件系统。

XFS was originally incorporated into the Linux 2.4 mainline, making XFS available on almost any Linux system. XFS can be selected as a file system in the installation programs of arch, Debian, Fedora, openSUSE, Gentoo, Kate OS, Mandriva, Slackware, Ubuntu, vectorlinux and zenwalk. However, due to bugs in the default boot manager grub, only a few of the above distributions allow users to use XFS file systems on the / boot mount point (boot directory).

FreeBSD 在 2005 年 12 月获得了对 XFS 的只读支持,并在次年 6 月引入了试验性的写支持。不过这些只是为了方便用户从 Linux 上迁移到 FreeBSD 上,并不是为了把 XFS 作为主打文件系统使用。Red Hat Enterprise Linux 5.4 64 位版的内核完整支持 XFS,但未包含创建和使用 XFS 的命令行工具(CentOS 正在进行这方面的尝试),原因是这些软件包还不够稳定。

FreeBSD received read-only support for XFS in December 2005, and introduced experimental write support in June the following year. However, these are just to facilitate users to migrate from Linux to FreeBSD, not to use XFS as the main file system. The kernel of Red Hat Enterprise Linux 5.4 64 bit fully supports XFS, but does not include command-line tools for creating and using XFS (CentOS is trying to do this) because these packages are not stable enough.

特性

characteristic

主要特性包括以下几点:

The main features include the following:

数据完全性

Data integrity

采用 XFS 文件系统,当意想不到的宕机发生后,首先,由于文件系统开启了日志功能,所以你磁盘上的文件不再会意外宕机而遭到破坏了。不论目前文件系统上存储的文件与数据有多少,文件系统都可以根据所记录的日志在很短的时间内迅速恢复磁盘文件内容。

Using XFS file system, when unexpected downtime occurs, first of all, because the file system has enabled the log function, so the files on your disk will no longer be damaged by unexpected downtime. No matter how many files and data are stored in the current file system, the file system can quickly recover the contents of disk files in a very short time according to the recorded logs.

传输特性

Transmission characteristics

XFS 文件系统采用优化算法,日志记录对整体文件操作影响非常小。XFS 查询与分配存储空间非常快。xfs 文件系统能连续提供快速的反应时间。笔者曾经对 XFS、JFS、Ext3、ReiserFS 文件系统进行过测试,XFS 文件文件系统的性能表现相当出众。

XFS file system adopts optimization algorithm, and the impact of logging on the overall file operation is very small. XFS queries and allocates storage space very quickly. XFS file system can provide fast response time continuously. The author has tested XFS, JFS, ext3, ReiserFS file systems, and the performance of XFS file system is quite outstanding.

可扩展性

Scalability

XFS 是一个全 64-bit 的文件系统,它可以支持上百万 T 字节的存储空间。对特大文件及小尺寸文件的支持都表现出众,支持特大数量的目录。最大可支持的文件大 小为 263 = 9 x 1018 = 9 exabytes,最大文件系统尺寸为 18 exabytes。

XFS is a full 64 bit file system, which can support millions of T bytes of storage space. Support for both large and small files is outstanding, supporting a large number of directories. The maximum supported file size is 263 = 9 x 1018 = 9 exabytes, and the maximum file system size is 18 exabytes.

XFS 使用高的表结构(B+树),保证了文件系统可以快速搜索与快速空间分配。XFS 能够持续提供高速操作,文件系统的性能不受目录中目录及文件数量的限制。

XFS uses a high table structure (B + tree) to ensure that the file system can quickly search and allocate space. XFS can continuously provide high-speed operation, and the performance of the file system is not limited by the number of directories and files in the directory.

传输带宽

Transmission bandwidth

XFS 能以接近裸设备 I/O 的性能存储数据。在单个文件系统的测试中,其吞吐量最高可达 7GB 每秒,对单个文件的读写操作,其吞吐量可达 4GB 每秒。

XFS can store data with performance close to that of bare device I / O. In the test of a single file system, the throughput is up to 7GB / s, and the throughput of read / write operations of a single file system can reach 4GB / s.

规范

standard

容量

capacity

XFS 是一个 64 位文件系统,最大支持 8exbibytes 减 1 字节的单个文件系统,实际部署时取决于宿主操作系统的最大块限制。对于一个 32 位 Linux 系统,文件和文件系统的大小会被限制在 16tebibytes。

XFS is a 64 bit file system, which supports a single file system with 8exbibytes minus 1 byte. The actual deployment depends on the maximum block limit of the host operating system. For a 32-bit Linux system, the size of the file and file system is limited to 16 tebibytes.

文件系统日志

File system log

日志文件系统是一种即使在断电或者是操作系统崩溃的情况下保证文件系统一致性的途径。XFS 对文件系统元数据提供了日志支持。当文件系统更新时,元数据会在实际的磁盘块被更新之前顺序写入日志。XFS 的日志被保存在磁盘块的循环缓冲区上,不会被正常的文件系统操作影响。XFS 日志大小的上限是 64k 个块和 128MB 中的较大值,下限取决于已存在的文件系统和目录的块的大小。在外置设备上部署日志会浪费超过最大日志大小的空间。XFS 日志也可以被存在文件系统的数据区(称为内置日志),或者一个额外的设备上(以减少磁盘操作)。

Log file system is a way to ensure file system consistency even in case of power failure or operating system crash. XFS provides logging support for file system metadata. When the file system is updated, metadata is sequentially written to the log before the actual disk blocks are updated. XFS logs are stored in the disk block’s circular buffer, and will not be affected by normal file system operations. The upper limit of XFS log size is the larger of 64K blocks and 128MB, and the lower limit depends on the size of existing file system and directory blocks. Deploying logs on external devices wastes more than the maximum log size. XFS logs can also be stored in data areas of the file system (called built-in logs), or on an additional device (to reduce disk operations).

XFS 的日志保存的是在更高层次上描述已进行的操作的“逻辑”实体。相比之下,“物理”日志存储每次事务中被修改的块。为了保证性能,日志的更新是异步进行的。当系统崩溃时,崩溃的一瞬间之前所进行的所有操作可以利用日志中的数据重做,这使得 XFS 能保持文件系统的一致性。XFS 在挂载文件系统的同时进行恢复,恢复速度与文件系统的大小无关。对于最近被修改但未完全写入磁盘的数据,XFS 保证在重启时清零所有未被写入的数据块,以防止任何有可能的、由剩余数据导致的安全隐患(因为虽然从文件系统接口无法访问这些数据,但不排除裸设备或裸硬件被直接读取的可能性)。

XFS logs hold “logical” entities that describe operations that have been performed at a higher level. In contrast, the “physical” log stores the blocks that are modified in each transaction. In order to ensure performance, the update of log is asynchronous. When the system crashes, all operations before the crash can be redone with the data in the log, which enables XFS to maintain file system consistency. XFS can mount the file system at the same time, and the recovery speed is independent of the size of the file system. For the data that has been recently modified but not fully written to the disk, XFS guarantees to clear all unwritten data blocks on restart, so as to prevent any possible security risks caused by the remaining data (because although the data cannot be accessed from the file system interface, it does not exclude the possibility that the raw device or hardware can be read directly).

分配组

Assignment group

XFS 文件系统内部被分为多个“分配组”,它们是文件系统中的等长线性存储区。每个分配组各自管理自己的 inode 和剩余空间。文件和文件夹可以跨越分配组。这一机制为 XFS 提供了可伸缩性和并行特性——多个线程和进程可以同时在同一个文件系统上执行 I/O 操作。这种由分配组带来的内部分区机制在一个文件系统跨越多个物理设备时特别有用,使得优化对下级存储部件的吞吐量利用率成为可能。

The XFS file system is divided into several “allocation groups”, which are equal length linear storage areas in the file system. Each allocation group manages its own inode and remaining space. Files and folders can span assignment groups. This mechanism provides scalability and parallelism for XFS — multiple threads and processes can perform I / O operations on the same file system at the same time. This internal partition mechanism brought by allocation group is particularly useful when a file system spans multiple physical devices, making it possible to optimize the throughput utilization of lower level storage units.

条带化分配

Striped distribution

在条带化 RAID 阵列上创建 XFS 文件系统时,可以指定一个“条带化数据单元”。这可以保证数据分配、inode 分配、以及内部日志被对齐到该条带单元上,以此最大化吞吐量。

When you create an XFS file system on a striped RAID array, you can specify a striped data unit. This ensures that data allocation, inode allocation, and internal logs are aligned to the stripe unit to maximize throughput.

基于 Extent 的分配方式

Distribution method based on extend

XFS 文件系统中的文件用到的块由变长 Extent 管理,每一个 Extent 描述了一个或多个连续的块。相比将每个文件用到的所有的块存储为列表的文件系统,这种策略大幅缩短了列表的长度。有些文件系统用一个或多个面向块的栅格管理空间分配——在 XFS 中这种结构被由一对 B+树组成的、面向 Extent 的结构替代了;每个文件系统分配组(AG)包含这样的一个结构。其中,一个 B+树用于索引未被使用的 Extent 的长度,另一个索引这些 Extent 的起始块。这种双索引策略使得文件系统在定位剩余空间中的 Extent 时十分高效。

The blocks used by files in XFS file system are managed by variable length extensions. Each extension describes one or more consecutive blocks. This strategy significantly reduces the length of the list compared to a file system that stores all the blocks used by each file as a list. Some file systems manage space allocation with one or more block oriented grids — in XFS, this structure is replaced by an extend oriented structure consisting of a pair of B + trees; each file system allocation group (Ag) contains such a structure. Among them, one B + tree is used to index the length of unused extensions, and the other index the starting blocks of these extensions. This double index strategy makes the file system very efficient in locating the extent in the remaining space.

可变块尺寸

Variable block size

块是文件系统中的最小可分配单元。XFS 允许在创建文件系统时指定块的大小,从 512 字节到 64KB,以适应专门的用途。比如,对于有很多小文件的应用,较小的块尺寸可以最大化磁盘利用率;但对于一个主要处理大文件的系统,较大的块尺寸能提供更好的性能。

A block is the smallest allocatable unit in a file system. XFS allows you to specify the size of the block, from 512 bytes to 64KB, when creating a file system, for specialized purposes. For example, for applications with many small files, smaller block size can maximize disk utilization; but for a system that mainly processes large files, larger block size can provide better performance.

延迟分配

Delay allocation

主条目:延迟分配

Main entry: deferred allocation

XFS 在文件分配上使用了惰性计算技术。当一个文件被写入缓存时,XFS 简单地在内存中对该文件保留合适数量的块,而不是立即对数据分配 Extent。实际的块分配仅在这段数据被冲刷到磁盘时才发生。这一机制提高了将这一文件写入一组连续的块中的机会,减少碎片的同时提升了性能。

XFS uses lazy computing technology in file allocation. When a file is written to the cache, XFS simply keeps an appropriate number of blocks for the file in memory instead of immediately allocating extend to the data. The actual block allocation occurs only when the data is flushed to disk. This mechanism improves the chance of writing this file into a set of contiguous blocks, reducing fragmentation and improving performance.

稀疏文件

sparse file

XFS 对每个文件提供了一个 64 位的稀疏地址空间,使得大文件中的“洞”(空白数据区)不被实际分配到磁盘上。因为文件系统对每个文件使用一个 Extent 表,文件分配表就可以保持一个较小的体积。对于太大以至于无法存储在 inode 中的分配表,这张表会被移动到 B+树中,继续保持对该目标文件在 64 位地址空间中任意位置的数据的高效访问。

XFS provides a 64 bit sparse address space for each file, so that “holes” (blank data areas) in large files are not actually allocated to the disk. Because the file system uses an extend table for each file, the file allocation table can keep a small size. For the allocation table that is too large to be stored in the inode, the table will be moved to the B + tree to maintain efficient access to the data in any location of the target file in the 64 bit address space.

扩展属性

Extended properties

XFS 通过实现扩展文件属性给文件提供了多个数据流,使文件可以被附加多个名/值对。文件名是一个最大长度为 256 字节的、以 NULL 字符结尾的可打印字符串,其它的关联值则可包含多达 64KB 的二进制数据。这些数据被进一步分入两个名字空间中,root 和 user。保存在 root 名字空间中的扩展属性只能被超级用户修改,user 名字空间中的可以被任何对该文件拥有写权限的用户修改。扩展属性可以被添加到任意一种 XFS inode 上,包括符号链接、设备节点、目录,等等。可以使用 attr 这个命令行程序操作这些扩展属性。xfsdump 和 xfsrestore 工具在进行备份和恢复时会一同操作扩展属性,而其它的大多数备份系统则会忽略扩展属性。

XFS provides multiple data streams for files by implementing extended file attributes, so that files can be appended with multiple name / value pairs. The file name is a printable string with a maximum length of 256 bytes and ends with a null character. Other associated values can contain up to 64KB of binary data. The data is further divided into two namespace, root and user. The extended attributes stored in the root namespace can only be modified by the super user, and those in the user namespace can be modified by any user who has write permission to the file. XFS can be extended to any node, directory, etc. You can use attr, a command-line program, to manipulate these extended attributes. Xfsdump and xfsrestore tools operate on extended attributes together during backup and recovery, while most other backup systems ignore extended attributes.

Direct I/O

Direct I/O

对于要求高吞吐量的应用,XFS 给用户空间提供了直接的、非缓存 I/O 的实现。数据在应用程序的缓冲区和磁盘间利用 DMA 进行传输,以此提供下级磁盘设备全部的 I/O 带宽。

For applications requiring high throughput, XFS provides a direct, non cached I / O implementation for user space. Data is transferred between application buffer and disk by DMA to provide all I / O bandwidth of subordinate disk devices.

确定速率 I/O

Determine rate I / O

XFS 确定速率 I/O 系统给应用程序提供了预留文件系统带宽的 API。XFS 会动态计算下级存储设备能提供的性能,并在给定的时间内预留足够的带宽以满足所要求的性能。此项特性是 XFS 所独有

XFS fixed rate I / O system provides an API for applications to reserve file system bandwidth. XFS will dynamically calculate the performance that the lower level storage devices can provide, and reserve enough bandwidth in a given time to meet the required performance. This feature is unique to XFS


速搜资源网 , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接:【速搜问答】xfs是什么
喜欢 (0)
[361009623@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址