Whamcloud - gitweb
LU-3015 osd-zfs: Fix a typo in udmu_objs_count_estimate
authorFan Yong <yong.fan@whamcloud.com>
Sun, 21 Apr 2013 02:46:12 +0000 (10:46 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 31 May 2013 16:19:49 +0000 (12:19 -0400)
commit90ec4d3168fea4017be05c418bd6942df429f959
tree9254582fd0321253a7424cfa0d4cd3a45aa208ae
parent426194de03ad47497e99d281d86b5cdfc5142148
LU-3015 osd-zfs: Fix a typo in udmu_objs_count_estimate

The typo is relatively straightforward given the diff below.
It leads to larger-than-actual average dnode size estimations,
which further causes overly conservative os_ffree (number of
available objects) values. For example, without this patch,
os_ffree values for "empty" 1 GB ZFS-based MDT/OSTs look like:

  [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 this patch, they look like:

  [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

Only after fixing this typo could we evaluate how the intented
estimation algorithm works.

Test-Parameters: mdsfilesystemtype=zfs ostfilesystemtype=zfs mdtfilesystemtype=zfs
Signed-off-by: Li Wei <wei.g.li@intel.com>
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic3cbe569261d2c0e4338001c47f3dd64c621621a
Reviewed-on: http://review.whamcloud.com/5806
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
lustre/osd-zfs/udmu.c