Use of Variable Inode Extents (VIX) in AIX

Technote (FAQ)


Question

This technote addresses issues and questions surrounding what Variable Inode Extents are, and when they are useful to enable on JFS2 filesytems in AIX.

Answer

The JFS2 filesystem performs many operations to gain greater performance when reading and writing to files and directories within it. One such operation is that when a block of data is allocated in the filesystem, JFS2 attempts to pre-allocate the next contiguous block as well. This is done to speed up performance of file creation, as in general use a file will consist of more than one block of data, and is usually more performant if in a contiguous area of the filesystem.

However, in a filesystem that is very nearly full, or very fragmented, there may not be enough contiguous space to allocate two such contiguous blocks (or extents in JFS2) of 16Kb in size, and the file creation may fail.

This can be illustrated with a simple 'touch' command, to create a new zero-length file. This will attempt to allocate a pair of 16Kb extents of data in the filesystem:

 

$ touch myfile
touch: cannot create

If "df" shows the filesystem is approaching being full, or even as little as 50-60% full in a heavily fragmented filesystem, then it may be that you are encountering this issue. In some cases running the defragfs command to defragment the filesystem may give you enough contiguous space to allow the creation of new files. However defragfs may not help if it cannot defragment the filesystem enough, or it truly is very full.

If this is on an NFS, JFS, or other filesystem that is NOT JFS2, then this is NOT your issue and enabling Variable Inode Extents will not help. These filesystems do not use Variable Inode Extents.

Variable Inode Extents were a feature added with APARs:

APAR IY68589 for AIX 5.2 - included in 5200-07

APAR IY68174 for AIX 5.3 - included in 5300-03

By default the filesystem needs contiguous 16Kb extents. Using Variable Inode Extents allows JFS2 to allocate a smaller extent if 16Kb is too large.

To enable Variable Inode Extents, unmount the filesystem and use chfs with the following option, from the man page:


   -a vix={yes|no}
       Specifies whether the file system can allocate inode
       extents smaller than the default of 16K if there are no
       contiguous 16K extents free in the file system. After a
       file system is enabled for small free extents, it cannot
       be accessed on earlier versions of AIX and the marking
       cannot be removed.

        yes
            File system can allocate variable length inode
            extents.
        no
            File system must use default size of 16 KB for
            inode extents. This has no effect if the file
            system already contains variable length inode
            extents.

So if there is a filesystem /myfs you wish to enable VIX on, follow these steps:

# umount /myfs
# chfs -a vix=yes /myfs
# lsfs -q /myfs

# lsfs -q /myfs
Name            Nodename   Mount Pt               VFS   Size    Options    Auto Accounting
/dev/fslv01     --         /myfs                  jfs2  131072  rw         no   no
  (lv size: 131072, fs size: 131072, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, EAformat: v1, Quota: no, DMAPI: no, VIX: yes)

# mount /myfs


Note there may be a performance degradation of writes or file creation to the JFS2 filesystem after enabling VIX, as you are disabling or limiting a previous performance characteristic of the JFS2 filesystem.


Cross reference information
Segment Product Component Platform Version Edition
Operating Systems AIX Not Applicable AIX 5.2, 5.3

Rate this page:

(0 users)Average rating

Document information


More support for:

AIX family

Software version:

5.2, 5.3, 6.1, 7.1

Operating system(s):

AIX

Reference #:

T1010368

Modified date:

2011-11-09

Translate my page

Machine Translation

Content navigation