JFS (file system)
The lead section of this article may need to be rewritten. (July 2012) (Learn how and when to remove this template message)
Journaled File System or JFS is a 64-bit journaling file system created by IBM. There are versions for AIX, eComStation, OS/2, and Linux operating systems. The latter is available as free software under the terms of the GNU General Public License (GPL). HP-UX has another, different filesystem named JFS that is actually an OEM version of Veritas Software's VxFS.
|Developer(s)||IBM et al.|
|Full name||IBM Journaled File System|
|Introduced||1990 and 1999 with JFS1 in AIX 3.1 and JFS in OS/2 4.5|
|Partition identifier||0x35 (MBR)|
|Directory contents||B+ tree|
|Max. volume size||32 PB (32 × 10245 bytes)|
|Max. file size||4 PB (4 × 10245 bytes)|
|Max. number of files||No limit defined|
|Max. filename length||255 bytes|
|Allowed characters in filenames||Any Unicode except NUL|
|Dates recorded||Modification (mtime), Attribute modification (ctime), Access (atime)|
|File system permissions||POSIX, ACLs|
|Transparent compression||Only in JFS1 on AIX|
|Transparent encryption||No (provided at the block device level)|
|Supported operating systems||AIX, OS/2, Linux, eComStation|
In the AIX operating system, there exist two generations of JFS filesystem that are called JFS (JFS1) and JFS2 respectively. In other operating systems, such as OS/2 and Linux, only the second generation exists and is called simply JFS. This should not be confused with JFS in AIX that actually refers to JFS1.
IBM introduced JFS with the initial release of AIX version 3.1 in February 1990. This file system, now called JFS1 on AIX, was the premier file system for AIX over the following decade and was installed in thousands or millions of customers' AIX systems. Historically, the JFS1 file system is very closely tied to the memory manager of AIX, which is a typical design for a file system supporting only one operating system. JFS was one of the first file systems to support Journaling
In 1995, work began to enhance the file system to be more scalable and to support machines that had more than one processor. Another goal was to have a more portable file system, capable of running on multiple operating systems. After several years of designing, coding, and testing, the new JFS was first shipped in OS/2 Warp Server for eBusiness in April 1999, and then in OS/2 Warp Client in October 2000. In December 1999, a snapshot of the original OS/2 JFS source was granted to the open source community and work was begun to port JFS to Linux. The first stable release of JFS for Linux appeared in June 2001. The JFS for Linux project is maintained by a small group of contributors known as the JFS Core Team. This release of sources also worked to form the basis of a re-port back to OS/2 of the open-source JFS.
In parallel with this effort, some of the JFS development team returned to the AIX Operating System Development Group in 1997 and started to move this new JFS source base to the AIX operating system. In May 2001, a second journaled file system, Enhanced Journaled File System (JFS2), was made available for AIX 5L.
Early in 2008 there was speculation that IBM is no longer interested in maintaining JFS and thus it should not be used in production environments. However, Dave Kleikamp, a member of the IBM Linux Technology Center and JFS Core Team, explained that they still follow changes in the Linux kernel and try to fix potential software bugs. He went on to add that certain distributions expect a larger resource commitment from them and opt not to support the filesystem.
JFS is a journaling file system. Rather than adding journaling as an add-on feature like in the ext3 file system, it was implemented from the start. The journal can be up to 128 MB. JFS journals metadata only, which means that metadata will remain consistent but user files may be corrupted after a crash or power loss. JFS's journaling is similar to XFS in that it only journals parts of the inode.
Dynamic Inode AllocationEdit
JFS dynamically allocates space for disk inodes as necessary. Each inode is 512 bytes. 32 inodes are allocated on a 16 kB Extent.
JFS allocates files as an extent. An extent is a variable-length sequence of Aggregate blocks. An extent may be located in several allocation groups. To solve this the extents are indexed in a B+ tree for better performance when locating the extent locations.
Compression is supported only in JFS1 on AIX and uses a variation of the LZ algorithm. Because of high CPU usage and increased free space fragmentation, compression is not recommended for use other than on a single user workstation or off-line backup areas.
Concurrent Input / Output (CIO)Edit
JFS normally applies read-shared, write-exclusive locking to files, which avoids data inconsistencies but imposes write serialization at the file level. The CIO option disables this locking. Applications such as relational databases which maintain data consistency themselves can use this option to largely eliminate filesystem overheads.
JFS uses Allocation groups. Allocation groups divide the aggregate space into chunks. This allows JFS to use resource allocation policies to achieve great I/O performance. The first policy is to try to cluster disk blocks and disk inodes for related data in the same AG in order to achieve good locality for the disk. The second policy is to distribute unrelated data throughout the file system in an attempt to minimize free-space fragmentation. When there is an open file JFS will lock the AG the file resides in and only allow the open file to grow. This reduces fragmentation as only the open file can write to the AG.
The superblock maintains information about the entire file system and includes the following fields:
- Size of the file system
- Number of data blocks in the file system
- A flag indicating the state of the file system
- Allocation group sizes
- File system block size
JFS in LinuxEdit
In the Linux operating system, JFS is supported with the kernel module (since the kernel version 2.4.18pre9-ac4) and the complementary userspace utilities packaged under the name JFSutils. Most Linux distributions support JFS, unless it is specifically removed due to space restrictions or other concerns. Most LiveCD distributions do not provide support of JFS because JFSutils are not installed.
According to reviews[which?] and benchmarks[which?] of the available filesystems for Linux, JFS is fast and reliable, with consistently good performance under different kinds of load, contrary to other filesystems that seem to perform better under particular usage patterns, for instance with small or large files. Another characteristic often mentioned, is that it is light and efficient with available system resources and even heavy disk activity is realized with low CPU usage. Especially for databases which need synchronous writes to survive a hardware crash, JFS with external journal seems to be the best option. File fragmentation on JFS impairs filesystem performance less than on more traditional Linux ext3 filesystems.
Actual usage of JFS in Linux is uncommon, as ext4 typically offers better performance.[according to whom?] JFS does have a niche role in Linux: it offers a case-insensitive mount option, unlike most other Linux file systems. 
There are also potential problems with JFS, such as its implementation of journal writes. They can be postponed until there is another trigger — potentially indefinitely, which can cause data loss over a theoretically infinite timeframe.
- "A mini-FAQ for JFS". JFS for Linux project.
- "Comparison of JFS1 and JFS2 on AIX". IBM.
- "Interview With the People Behind JFS, ReiserFS & XFS".
- JFS for Linux project website
- Re: which to use: ext3, JFS, XFS, ReiserFS?
- SourceForge.net: jfs-discussion
- "TRIM support for JFS Filesystem".
- "JFS overview". Steve Best, IBM. Archived from the original on January 29, 2008. Retrieved January 9, 2008. Cite uses deprecated parameter
- "JFS Layout" (PDF). Steve Best, IBM. Retrieved May 1, 2008.
- David Kleikamp. "JFS journal". OSDIR.
- "AIX Wiki: JFS". IBM. Archived from the original on May 28, 2006. Cite uses deprecated parameter
- Improving Database Performance With AIX Concurrent I/O - White Paper
- Filesystems (ext3, reiser, xfs, jfs) comparison on Debian Etch
- Database Microbenchmarks Archived February 10, 2013, at the Wayback Machine, 2012-07.
- Software and hardware annotations, 2q2006, 2013-06
- Petabytes on a Budget v2.0:Revealing More Secrets
- Analysis and Evolution of Journaling File Systems - V. Prabhakaran and others 2013-06