Db2

Db2

Connect with Db2, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Db2 11.5 Linux RHEL and xfs filesystem

    Posted Sat November 15, 2025 01:34 PM

    Hello,

    Our production environment is Linux RHEL 9.4, Db2 Linux v 11.5.9 in AWS EC2 environment with EBS gp3 volume 15.000 IOPS 500 Throughput (MiB/s) storage. We are using xfs filesystem configured over the EBS gp3 volume as database physical structure.
    We are searching suggestions / best practices related to xfs settings in a Db2 environment. We have found some documents suggesting to use nobarrier mount option that will increase the performance of the database. Does anyone already used nobarrier and notime as mount options for xfs filesystem in RHEL environment with Db2 11.5 ? 
     
    At the moment our Db2 xfs filesystems have been mounted as:
    /dev/nvme6n1 on /data3 type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)
     
    From the documentation we have found the suggested mount is:
    /dev/nvmeXnY /db2/data xfs noatime,nodiratime,inode64,logbufs=8,nobarrier,largeio,swalloc,nofail
     
    Any suggestion / experience is welcome.
     
    Thanks. Ciao. Roberto.


    ------------------------------
    Roberto Stradella
    ------------------------------


  • 2.  RE: Db2 11.5 Linux RHEL and xfs filesystem

    Posted Mon November 17, 2025 05:11 AM

    Hi Roberto,

    We have a customer who is running their DB2 workload(s) on AWS EC2 instances, using RHEL 8 and Db2 v11.5.7 (with imminent plans to upgrade to RHEL 9 and Db2 12.1).

    Their DATA disk setup looks like this:

    /dev/nvme3n1 on /data01 type ext4 (rw,relatime,seclabel)
    /dev/nvme2n1 on /data02 type ext4 (rw,relatime,seclabel)

    So, similar to your XFS setup (only lacking some of your parameters), but I cannot really say how efficient (and optimal) this is...

    Hope this helps, if only a little bit...

    Regards, Damir



    ------------------------------
    Damir Wilder
    Senior Consultant
    Triton Consulting
    London
    ------------------------------



  • 3.  RE: Db2 11.5 Linux RHEL and xfs filesystem

    Posted Tue November 18, 2025 09:57 AM

    We don't use xfs on our DB2,  but I can see how you might want to tune to the underlying RAID or backend I/O structures.

    A general search on ideas to use:

    Specific mount options recommended in the community and documentation for XFS with Db2 11.5 include: 
    noatime and nodiratime: Disables updates to file access time records, reducing metadata writes and improving performance.
    inode64: Allows inodes to use 64-bit addresses, which is highly recommended for multi-terabyte filesystems to prevent potential inode space issues.
    logbufs=8: Sets the number of in-memory log buffers to the maximum value, which can benefit metadata-intensive workloads.
    logbsize=32k (or larger, up to 256k): Sets the size of each log buffer. A larger size (e.g., 32k or 256k) is recommended for file systems with heavy modifications, as is typical in database environments.
    nobarrier: Can increase performance by disabling write barriers, but should only be used if the underlying storage hardware (RAID controller with battery-backed cache, or enterprise-grade SSDs) guarantees write integrity.
    largeio: Can be used to optimize I/O size, especially if the filesystem was created with specific stripe parameters (swidth).
    swalloc: Optimizes allocation for striped volumes, potentially improving performance on RAID configurations. 
    Example Mount Entry (/etc/fstab):
    /dev/nvmeXnY /db2/data xfs rw,noatime,nodiratime,inode64,logbufs=8,logbsize=32k,nobarrier,largeio,swalloc,nofail 0 0 

     



    ------------------------------
    Greg Sorensen
    ------------------------------



  • 4.  RE: Db2 11.5 Linux RHEL and xfs filesystem

    Posted Tue November 18, 2025 02:23 PM
    Edited by Greg Sorensen Tue November 18, 2025 02:24 PM

    I tried this out  and these are my resulting options based on my backend RAID I have.  I'll be migrating our data to these and give it a shot.

    The "nobarrier" option was invalid or not supported on either my xfs mod  my kernel 4.18.0-553.50.1.el8_10.x86_64

    # lsmod | grep xfs
    xfs                  1601536  14
    libcrc32c              16384  2 nf_tables,xfs

    # mkfs.xfs -b size=4096 <LV name>

    # mount

    <mnt point> type xfs (rw,noatime,nodiratime,seclabel,swalloc,attr2,largeio,inode64,logbufs=8,logbsize=32k,sunit=512,swidth=512,noquota)

    /etc/fstab

    <LV> /<mount> xfs rw,noatime,nodiratime,inode64,logbufs=8,logbsize=32k,largeio,swalloc,nofail 0 0



    ------------------------------
    Greg Sorensen
    ------------------------------