1. 30 3月, 2018 2 次提交
    • H
      lightnvm: pblk: add padding distribution sysfs attribute · 5d149bfa
      Hans Holmberg 提交于
      When pblk receives a sync, all data up to that point in the write buffer
      must be comitted to persistent storage, and as flash memory comes with a
      minimal write size there is a significant cost involved both in terms
      of time for completing the sync and in terms of write amplification
      padded sectors for filling up to the minimal write size.
      
      In order to get a better understanding of the costs involved for syncs,
      Add a sysfs attribute to pblk: padded_dist, showing a normalized
      distribution of sectors padded. In order to facilitate measurements of
      specific workloads during the lifetime of the pblk instance, the
      distribution can be reset by writing 0 to the attribute.
      
      Do this by introducing counters for each possible padding:
      {0..(minimal write size - 1)} and calculate the normalized distribution
      when showing the attribute.
      Signed-off-by: NHans Holmberg <hans.holmberg@cnexlabs.com>
      Signed-off-by: NJavier González <javier@cnexlabs.com>
      Rearranged total_buckets statement in pblk_sysfs_get_padding_dist
      Signed-off-by: NMatias Bjørling <mb@lightnvm.io>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      5d149bfa
    • H
      lightnvm: pblk: export write amplification counters to sysfs · 76758390
      Hans Holmberg 提交于
      In a SSD, write amplification, WA, is defined as the average
      number of page writes per user page write. Write amplification
      negatively affects write performance and decreases the lifetime
      of the disk, so it's a useful metric to add to sysfs.
      
      In plkb's case, the number of writes per user sector is the sum of:
      
          (1) number of user writes
          (2) number of sectors written by the garbage collector
          (3) number of sectors padded (i.e. due to syncs)
      
      This patch adds persistent counters for 1-3 and two sysfs attributes
      to export these along with WA calculated with five decimals:
      
          write_amp_mileage: the accumulated write amplification stats
                            for the lifetime of the pblk instance
      
          write_amp_trip: resetable stats to facilitate delta measurements,
                          values reset at creation and if 0 is written
                          to the attribute.
      
      64-bit counters are used as a 32 bit counter would wrap around
      already after about 17 TB worth of user data. It will take a
      long long time before the 64 bit sector counters wrap around.
      
      The counters are stored after the bad block bitmap in the first
      emeta sector of each written line. There is plenty of space in the
      first emeta sector, so we don't need to bump the major version of
      the line data format.
      Signed-off-by: NHans Holmberg <hans.holmberg@cnexlabs.com>
      Signed-off-by: NJavier González <javier@cnexlabs.com>
      Signed-off-by: NMatias Bjørling <mb@lightnvm.io>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      76758390
  2. 09 3月, 2018 1 次提交
  3. 05 1月, 2018 6 次提交
  4. 22 11月, 2017 1 次提交
  5. 13 10月, 2017 19 次提交
  6. 01 7月, 2017 3 次提交
  7. 27 6月, 2017 8 次提交