码迷,mamicode.com
首页 > 其他好文 > 详细

JFS与JFS2的区别

时间:2015-04-23 02:00:05      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:

请问一下JFS与JFS2的区别? 支持最大的文件? 普通JFS:2G;支持大文件JFS:64G;JFS2:1T 支持最大的文件系统?普通JFS,支持大文件JFS,JFS2分别是多大呢?

The maximum file size and maximum file system size is limited to (1 TB - (physical partition size)) when used with the 32-bit kernel. For example, if the physical partition size for the volume group is 64 MB, then the maximum file system size is (1 TB - 64 MB) = (1048576 MB - 64 MB) = 1048512 MB. This is due to an underlying limitation on the maximum size of a logical volume when using the 32-bit kernel.

JFS2 size limits
Testing has shown that extremely large JFS2 file systems that contain very large files are more practical to maintain than those that contain a large number of small files. When a large file system contains many small files, the fsck command and other file system maintenance tasks take a long time to run. The following size limitations are recommended: Maximum JFS2 file system size: 32TB (64 bit kernel) 1 TB (32-bit kernel) Maximum JFS2 file size: 16TB (64 bit kernel) 1 TB (32-bit kernel) Minimum JFS2 file system size: 16MB
JFS2 大小限制

测试表明,维护包含很大文件的极大的 JFS2 文件系统比包含大量小文件的大文件系统更可行。当大文件系统包含许多小文件时,要花费很长时间来运行 fsck 命令和其他文件系统维护任务。

建议使用以下大小限制:

JFS2 文件系统最大大小: 32 TB
JFS2 文件最大大小: 16 TB
最小 JFS2 文件系统大小: 16 MB

--------------------------------------------------------------------------------------
JFS size limits
The maximum JFS size is defined when the file system is created. The NBPI, fragment size, and allocation group size are contributing factors to the decision. The file system size limitation is the minimum of the following:
NBPI * 224
or
FragmentSize * 228
For example, if you select an NBPI ratio of 512, the file system size is limit to 8 GB (512 * 224 = 8 GB). JFS supports NBPI values of 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, and 131072.
The JFS restricts all file systems to 16M (224) i-nodes.
One i-node is created for every NBPI bytes of allocation group space allocated to the file system. An allocation group can be partially allocated, though the full number of i-nodes per allocation group is still allocated. NBPI is inversely proportional to the total number of i-nodes in a file system.
The JFS segregates file system space into groupings of i-nodes and disk blocks for user data. These groupings are called allocation groups. The allocation group size can be specified when the file system is created. The allocation group sizes are 8M, 16M, 32M, and 64M. Each allocation group size has an associated NBPI range. The ranges are defined by the following table:
Allocation Group Size in Megabytes Allowable NBPI Values
8 512, 1024, 2048, 4096, 8192, 16384
16 1024, 2048, 4096, 8192, 16384, 32768
32 2048, 4096, 8192, 16384, 32768, 65536
64 4096, 8192, 16384, 32768, 65536, 131072
The JFS supports four fragment sizes of 512, 1024, 2048, and 4096 byte units of contiguous disk space. The JFS maintains fragment addresses in i-nodes and indirect blocks as 28-bit numbers. Each fragment must be addressable by a number from 0 to (228).
JFS 大小限制

在创建文件系统时定义最大 JFS 大小。NBPI、片段大小和分配组大小是确定最大大小的决定因素。

文件系统大小限制是以下各项中的最小值:NBPI * 224或FragmentSize * 228例如,如果您选择 512 作为 NBPI 比率,那么文件系统大小限制为 8 GB(512 * 224 = 8 GB)。JFS 支持 512、1024、2048、4096、8192、16384、32768、65536 和 131072 的 NBPI 值。  

JFS 将所有文件系统限制为 16 M(224)索引节点。

对于分配给文件系统的每 NBPI 字节的分配组空间创建一个索引节点。虽然仍然分配每个分配组的全部索引节点数,但是可以部分分配一个分配组。在文件系统中,NBPI 与索引节点总数成反比。

JFS 将文件系统空间分为索引节点和磁盘块的分组以用于用户数据。这些分组称为分配组。可在创建文件系统时指定分配组大小。分配组大小是 8 M、16 M、32 M 和 64 M。每个分配组大小有一个相关联的 NBPI 范围。这些范围由下表定义:

分配组大小(以兆字节计) 允许的 NBPI 值 8 512, 1024, 2048, 4096, 8192, 16384 16 1024, 2048, 4096, 8192, 16384, 32768 32 2048, 4096, 8192, 16384, 32768, 65536 64 4096, 8192, 16384, 32768, 65536, 131072 JFS 支持四种片段大小 512、1024、2048 和 4096 字节单元的相邻磁盘空间。JFS 保持索引节点和间接块中的片段地址为 28 位的数字。每个片段必须可通过一个从 0 到(228)的数字寻址。

 

 

JFS and JFS2 size limitations
You define the maximum size for a JFS when you create the file system. The decision of what size to define for a JFS is based on several significant issues.
The following section describes the key considerations.
The recommended maximum size for a JFS2 is 16 TBs. The minimum file system size for a JFS2 is 16 MBs. Key considerations for very large JFS2 file systems are described in JFS2 size limits.
Although file systems that use allocation units smaller than 4096 bytes require substantially less disk space than those using the default allocation unit of 4096 bytes, the use of smaller fragments might incur performance costs.
The allocation state of each fragment (JFS) or block (JFS2) within a file system is recorded in the file system allocation map. More virtual memory and file system disk space might be required to hold allocation maps for file systems with a fragment or block size smaller than 4096 bytes.
Because disk space is allocated in smaller units for a file system with a fragment (JFS) or block (JFS2) size other than 4096 bytes, allocation activity can occur more often when files or directories are repeatedly extended in size. For example, a write operation that extends the size of a zero-length file by 512 bytes results in the allocation of one 512-byte fragment or block to the file, depending on the file system type. If the file size is extended further by another write of 512 bytes, an additional fragment or block must be allocated to the file. Applying this example to a file system with 4096-byte fragments or blocks, disk space allocation occurs only once, as part of the first write operation. No additional allocation activity must be performed as part of the second write operation since the initial 4096-byte allocation is large enough to hold the data added by the second write operation. Allocation activity can be minimized if the files are extended by 4096 bytes at a time.
One size-related issue is the size of the file system log.
For JFS, in most instances, multiple file systems use a common log configured to be 4 MB in size. For example, after initial installation, all file systems within the root volume group use logical volume hd8 as a common JFS log. The default logical volume partition size is 4 MB, and the default log size is one partition, therefore, the root volume group normally contains a 4 MB JFS log. When file systems exceed 2 GB or when the total amount of file system space using a single log exceeds 2 GB, the default log size might not be sufficient. In either case, the log sizes are scaled upward as the file system size increases. When the size of the log logical volume is changed, the logform command must be run to reinitialize the log before the new space can be used. The JFS log is limited to a maximum size of 256 MB.
There is a practical limit to the size of the combined file systems that a single JFS log can support. As a guideline, one trillion bytes of total file system capacity is the recommended limitation for a single JFS log. When this guideline is exceeded or is close to being exceeded, or when out-of-memory errors occur from the logredo command (which is called by the fsck command), add an additional JFS log and then share the load between the two JFS log files.
For JFS2, in most instances, multiple file systems also use a common log. When file systems exceed 2 GB or when the total amount of file system space using a single log exceeds 2 GB, the default log size might not be sufficient. In either case, you can scale log sizes upward as the file system size increases or you can add an additional JFS2 log and then share the load between the two JFS2 log files.

JFS 和 JFS2 大小限制

在创建文件系统时您要定义 JFS 的最大大小。确定要为 JFS 定义多大的大小基于几个重要问题。

JFS2 建议的最大大小是 16 TB。JFS2 的最小文件系统大小为 16 MB。

虽然使用小于 4096 字节的分配单元的文件系统需要的磁盘空间大大少于使用缺省分配单元 4096 字节的文件系统,但是使用较小的片段可能招致性能代价。

文件系统中每个片段(JFS)或块(JFS2)的分配状态记录在文件系统分配图中。可能需要更多的虚拟内存和文件系统磁盘空间来保存具有小于 4096 字节的片段或块大小的文件系统的分配图。

因为磁盘空间对于具有除 4096 字节之外的段(JFS)或块(JFS2)大小的文件系统是以较小的单元来分配的,所以在反复扩展文件或目录的大小时,分配活动可能会更频繁地发生。例如,将零长度的文件扩展 512 字节的写操作会导致根据文件系统类型对该文件分配一个 512 字节的片段或块。如果另一个 512 字节的写操作进一步扩展了该文件的大小,那么必须将一个附加的片段或块分配给该文件。对具有 4096 字节的片段或块的文件系统应用此示例,磁盘空间分配将作为首次写入操作的部分而仅发生一次。由于初始 4096 字节的分配足够大,足以保存由第二次写操作添加的数据,所以没有附加分配活动必须作为第二次写操作的一部分执行。如果将这些文件一次扩展 4096 字节,可使分配活动变得最少。

一个与大小相关的问题是文件系统日志的大小。

对于 JFS,在大多数实例中,多个文件系统使用大小配置为 4 MB 的公用日志。例如,在初始安装后,根卷组中的所有文件系统将逻辑卷 hd8 用作公用 JFS 日志。缺省逻辑卷分区大小是 4 MB,缺省日志大小是一个分区,因此,根卷组通常包含一个 4 MB 的 JFS 日志。当文件系统超过 2 GB 或使用单个日志的文件系统空间的总量超过 2 GB 时,缺省日志大小可能不足。无论是这两种情况中的任何一种,日志大小都会随文件系统大小增大而增大。当日志逻辑卷的大小更改时,必须运行 logform 命令以重新初始化该日志,然后才可使用新空间。JFS 日志被限制为最大大小 256 MB。

对于单个 JFS 日志可支持的组合文件系统的大小,有一个实际的限制。作为一个基准,对于单个 JFS 日志的建议限制是万亿(trillion)字节的总文件系统容量。当超过此基准或快要超过此基准时,或 logredo 命令(由 fsck 命令调用)发生“内存用尽”错误时,将添加一个附加 JFS 日志,然后在两个 JFS 日志文件之间共享负载。

对于 JFS2,在大多数实例中,多个文件系统也使用一个公用日志。当文件系统超过 2 GB 或使用单个日志的文件系统空间的总量超过 2 GB 时,缺省日志大小可能不足。无论是这两种情况中的任何一种,在文件系统大小增加时您都可以增大日志大小,或者您可以添加一个附加 JFS2 日志,然后在这两个 JFS2 日志文件之间共享负载。

 

JFS与JFS2的区别

标签:

原文地址:http://www.cnblogs.com/x113/p/4438584.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!