Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-3015

A typo in udmu_objs_count_estimate() causing overly conservative os_ffree values

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.4.1, Lustre 2.5.0
    • Lustre 2.4.0
    • None
    • 3
    • 7336

    Description

      In this hunk from udmu_objs_count_estimate():

              est_refdblocks = (refdbytes >> SPA_MAXBLOCKSHIFT) +
                      (OSD_DNODE_EST_COUNT << OSD_DNODE_EST_BLKSHIFT);
              est_usedobjs   = usedobjs + OSD_DNODE_EST_COUNT;
      

      OSD_DNODE_EST_COUNT should be right-shifted, not left-shifted. This typo leads to a larger-than-actual dnode size estimation, which further causes overly conservative os_ffree (number of available objects) values, especially for MDTs.

      Attachments

        Activity

          [LU-3015] A typo in udmu_objs_count_estimate() causing overly conservative os_ffree values

          Patch landed to master. Let me know if more patches are needed and I will reopen this ticket.

          jlevi Jodi Levi (Inactive) added a comment - Patch landed to master. Let me know if more patches are needed and I will reopen this ticket.
          liwei Li Wei (Inactive) added a comment - http://review.whamcloud.com/5806

          Current os_ffree values for "empty" 1 GB ZFS-based MDT and OSTs:

          [root@linux tests]# df -h
          Filesystem            Size  Used Avail Use% Mounted on
          [...]
          lustre-mdt1/mdt1      929M  3.0M  924M   1% /mnt/mds1
          lustre-ost1/ost1      929M  1.3M  926M   1% /mnt/ost1
          lustre-ost2/ost2      929M  1.3M  926M   1% /mnt/ost2
          linux@tcp:/lustre     1.9G  2.5M  1.9G   1% /mnt/lustre
          [root@linux tests]# df -i
          Filesystem            Inodes   IUsed   IFree IUse% Mounted on
          [...]
          lustre-mdt1/mdt1        7583     178    7405    3% /mnt/mds1
          lustre-ost1/ost1        7631     212    7419    3% /mnt/ost1
          lustre-ost2/ost2        7631     212    7419    3% /mnt/ost2
          linux@tcp:/lustre       7583     178    7405    3% /mnt/lustre
          

          With the typo fixed:

          [root@linux tests]# df -h
          Filesystem            Size  Used Avail Use% Mounted on
          [...]
          lustre-mdt1/mdt1      929M  2.9M  924M   1% /mnt/mds1
          lustre-ost1/ost1      929M  1.3M  926M   1% /mnt/ost1
          lustre-ost2/ost2      929M  1.3M  926M   1% /mnt/ost2
          linux@tcp:/lustre     1.9G  2.5M  1.9G   1% /mnt/lustre
          [root@linux tests]# df -i
          Filesystem            Inodes   IUsed   IFree IUse% Mounted on
          [...]
          lustre-mdt1/mdt1      161966     178  161788    1% /mnt/mds1
          lustre-ost1/ost1      223825     212  223613    1% /mnt/ost1
          lustre-ost2/ost2      223825     212  223613    1% /mnt/ost2
          linux@tcp:/lustre     161966     178  161788    1% /mnt/lustre
          
          liwei Li Wei (Inactive) added a comment - Current os_ffree values for "empty" 1 GB ZFS-based MDT and OSTs: [root@linux tests]# df -h Filesystem Size Used Avail Use% Mounted on [...] lustre-mdt1/mdt1 929M 3.0M 924M 1% /mnt/mds1 lustre-ost1/ost1 929M 1.3M 926M 1% /mnt/ost1 lustre-ost2/ost2 929M 1.3M 926M 1% /mnt/ost2 linux@tcp:/lustre 1.9G 2.5M 1.9G 1% /mnt/lustre [root@linux tests]# df -i Filesystem Inodes IUsed IFree IUse% Mounted on [...] lustre-mdt1/mdt1 7583 178 7405 3% /mnt/mds1 lustre-ost1/ost1 7631 212 7419 3% /mnt/ost1 lustre-ost2/ost2 7631 212 7419 3% /mnt/ost2 linux@tcp:/lustre 7583 178 7405 3% /mnt/lustre With the typo fixed: [root@linux tests]# df -h Filesystem Size Used Avail Use% Mounted on [...] lustre-mdt1/mdt1 929M 2.9M 924M 1% /mnt/mds1 lustre-ost1/ost1 929M 1.3M 926M 1% /mnt/ost1 lustre-ost2/ost2 929M 1.3M 926M 1% /mnt/ost2 linux@tcp:/lustre 1.9G 2.5M 1.9G 1% /mnt/lustre [root@linux tests]# df -i Filesystem Inodes IUsed IFree IUse% Mounted on [...] lustre-mdt1/mdt1 161966 178 161788 1% /mnt/mds1 lustre-ost1/ost1 223825 212 223613 1% /mnt/ost1 lustre-ost2/ost2 223825 212 223613 1% /mnt/ost2 linux@tcp:/lustre 161966 178 161788 1% /mnt/lustre

          People

            liwei Li Wei (Inactive)
            liwei Li Wei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: