Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9537

Unaligned write size

    • Type: Icon: Workload Workload
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.3.0-rc4
    • Component/s: Block Manager
    • Environment:
      Linux 5.4.0

      Running YCSB-A (and changing update rate to 100%), and observing the I/O using blktrace, I find that MongoDB issue writes in different sizes, sometimes 4KB, 8KB, 16KB 20KB (+8/+16/+32/+40 at last of each row):

      259,8   15     4340    42.036937565   417  D WFS 416915888 + 8 [kworker/15:1H]
      259,8   15     4351    42.041572626   471  D  WS 416915896 + 16 [jbd2/nvme2n1p4-]
      259,8   15     4356    42.041601220   417  D  FN [kworker/15:1H]
      259,8   15     4358    42.042938434   417  D WFS 416915912 + 8 [kworker/15:1H]
      259,8   15     4369    42.047559157   471  D  WS 416915920 + 16 [jbd2/nvme2n1p4-]
      259,8   15     4374    42.047587040   417  D  FN [kworker/15:1H]
      259,8   15     4376    42.048928562   417  D WFS 416915936 + 8 [kworker/15:1H]
      259,8   15     4387    42.053558684   471  D  WS 416915944 + 16 [jbd2/nvme2n1p4-]
      259,8   15     4392    42.053584714   417  D  FN [kworker/15:1H]
      259,8   15     4394    42.054936124   417  D WFS 416915960 + 8 [kworker/15:1H]
      259,8    5     6833    42.011513979  8054  D  WS 469224192 + 40 [JournalFlusher]
      259,8    5     6843    42.017508575  8054  D  WS 469224224 + 32 [JournalFlusher]
      259,8    5     6853    42.023523522  8054  D  WS 469224248 + 40 [JournalFlusher]
      259,8    5     6863    42.029511596  8054  D  WS 469224280 + 32 [JournalFlusher]
      259,8    5     6873    42.035518888  8054  D  WS 469224304 + 32 [JournalFlusher]
      259,8    5     6883    42.041512542  8054  D  WS 469224328 + 32 [JournalFlusher]
      259,8    5     6893    42.047510425  8054  D  WS 469224352 + 40 [JournalFlusher]
      259,8    5     6903    42.053508139  8054  D  WS 469224384 + 40 [JournalFlusher] 

      This works well in my old HDD, but when I upgrade to NVMe SSD, and did some benchmarks on its performance, I find that my SSD performance is bad when the write size is not multiple of 32KB. 

      So is there any ways that I can workaround this issue?  Thanks!

            Assignee:
            keith.smith@mongodb.com Keith Smith
            Reporter:
            hehaochen@hotmail.com haochen he
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: