How to test HDD & SSD for journal / metadata compatibility?

You have read a lot about fast SSDs which do not perform well in a ceph cluster?
SSDs which die fast in a ceph cluster?
Shall you prefer HDDs over SSDs?
You have no clue how to determine what is true or what is a myth?

To understand this article fully you shall read also this both articles:

Available tools under linux for our tests

Under linux we are pretty happy to have a bunch of tools, which help us to test read in depth our drives. Well known tools are

  • fio
    flexible I/O tester
  • dd
    disk dump

Controller dependent impacts on your tests

Linux use disk caches, so also do hardware controllers. These caches will cause wrong tests, since we will test the speed of the RAM instead the speed of the drive.

Disable the linux cache

Linux uses for all drives a cache. Here we need first to disable the write-cache of linux on our drive

sudo hdparm -W 0 /dev/hda 0

In the above example we disable the write cache for the drive /dev/hda

Disable HP controller cache

HP controllers have typically RAID array management, which itself requires also controller based caches to optimize the write and read performance. This caches we also need to disable!

sudo hpacucli ctrl slot=2 modify dwc=disable
sudo hpacucli controller slot=2 logicaldrive 1 modify arrayaccelerator=disable

The above command assumes, that your HP controller is in slot 2 and your drive is the number 1:

Using fio

For the more thorough tests we need to use fio. This is the sample command for our tests:

sudo fio --filename=/dev/<yourDevice> --direct=1 --sync=1 --rw=write --bs=4k --numjobs=<numOfConcurrentThreads> --iodepth=1 --runtime=600 --time_based --group_reporting --name=journal-test

Let us dive into the command options:

  • –filename
    the device we want to test.
    E.g. /dev/sda or /dev/nvme0n1
  • –direct
    here we tell fio to work with O_DIRECT (details see Performance considerations for journal / metadata disks)
  • –sync
    here we teill fio to work with O_DSYNC (details see Performance considerations for journal / metadata disks)
  • –rw
    what IO pattern to use. In our case we use write for sequential writes as journal/metadata writes are always sequential (details see Performance considerations for journal / metadata disks))
  • –bs
    this is the block size. With the blocksize we simulate the object size handed over from a client to our OSD.. In our example here, we are submitting 4K objects.
    4k is is probably a worst case scenario. If you know your workload in terms of block size, you can here modify it to your needs
  • –numjobs
    here we simulate the amount of concurrent client accesses to our ceph OSD. number of threads that will be running, think this has ceph-osd daemons writing to the journal
  • –iodepth
    we are submitting IO one by one.
  • –runtime
    job duration in seconds. Here you shall test different durations to ensure that all optimizations of the HDD/SSD vendor gets overridden to get down to the real performance values of your drive.
    The drive optimizations are typically tiering of different storage types. So this tiers are helping to increase the overall performance. Means something like memory, caches and on SSDs faster SSD cells, as the cells for the final data storage on SSDs.
  • –time_based
    if you have a fast drive, the test could finish the test before reaching the “runtime” limit. So this ensures to run the test for the specified runtime. So basically it reruns the operation over an over again until the total runtime is reached.
  • –group_reporting
    This tells fio to report a overall value. If you have multiple threads (numjobs) usually fio will report each job independently. But the independent report does not help us here. So we group the results into one overall result with this parameter.
  • –name
    name of this run/test

IMPORTANT NOTICE

The above command will overwrite your data on the drive! So be careful to take the correct drive, else you operating system or even your data is getting overwritten!

Tests to saturate your fastest drives

Your disks can be so fast that you need multiple tests to max out (saturate) the disks. We can try this with the runtime or with the numjobs parameters.

Test via long running tests

As named already above you need to test different runtimes with –runtime parameter to saturate the caches or drive tunings. Start with 60 seconds and increase it step wise to 120, 180. My tests are often this:

  • 60
    start test
  • 180
    second test
  • 600
    third test

If the 600 seconds test has nearly the same values as the previous tests, you either have already the saturation or we cannot reach itdo not reach a saturation

Test via parallel running jobs

If you have really fast drives, the above named test will not saturate your drive. To saturate the drive we have to run more parallel threads against the drive with the parameter –numjobs. My tactic here is to try first one thread and to get up by one increment.

  • –numjobs=1
  • –numjobs=2
  • –numjobs=3
  • –numjobs=4

Using dd

Sometimes you do not have the fio on you system nor the option to install it. In this case you can use also dd. This is the sample command for our dd tests. First let us generate a random test file and we ensure that the file is synced to disk

sudo dd if=/dev/urandom of=randomtestfile bs=1M count=1024
sudo sync

now lets run the test against our drive

sudo dd if=randomtestfile of=/dev/<yourdrive> bs=4k count=100000 oflag=direct,dsync

Let us dive into the command options:

  • if
    the input file, which is either our test file or the random device
  • of
    the output file, which is either our test file or our drive
  • bs
    this is the block size. With the blocksize we simulate the object size handed over from a client to our OSD.. In our example here, we are submitting 4K objects.
    4k is is probably a worst case scenario. If you know your workload in terms of block size, you can here modify it to your needs
  • count
    here we tell the the dd command how many operations to process
  • oflag
    here we define the IO operations like O_DIRECT and O_DSYNC (details see Performance considerations for journal / metadata disks)

Community driven performance measurings

You can submit your own measurings also here to let other users reduce their work too, which you also have profited yourself. So please share your details, it costs you only one minute, which helps others to reduce maybe hours of days of senseless analysis.

Step 1 of 4

Your tested drive

Please choose your drive vendor
960 pro (for the Samsung MZ-V6P512)
MZ-V6P512 (for the Samsung 960pro with 512GB of capacity)
please enter here the drive capacity in GB
The firmware version of your drive
Drive vendorDrive vendor (not listed above)Drive market model nameDrive model codeDrive capaacity in (GB)Device connection typeDevice connection type (not listed above)Drive firmware versionBandwidth: 1 threadIOPS: 1 threadBandwidth: 5 threadsIOPS: 5 threadsBandwidth: 10 threadsIOPS: 10 threadscommands executed for your testresults got from the above commandNotes / Hints to share to the community
IntensoThomaspepQQGray Mountainother634815451034037512247746805260705857215544078478646408518432425306樂貸網|全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com樂貸網|全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com
IntensoRicardocagTTKlimmenother088633184431888434670542611155108553420718452303462745638014254332樂貸網 全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com/樂貸網 全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com/
IntelDarrellDexDPKhujandother103575367654623651724751815835281211675705418043052852387678774225水微晶玻尿酸 - 八千代醫美集團 https://yachiyo.com.tw/水微晶玻尿酸 - 八千代醫美集團 https://yachiyo.com.tw/
BIWINAndrewpruptOWKuwaitother772660646033842458471654607012234537065508354266625370428481525522第一借錢網-借錢,小額借款 https://168cash.com.tw/第一借錢網-借錢,小額借款 https://168cash.com.tw/
MaxtorRandyusafeQSAarschotother450450032175023074388175862817264888646841284680214337328521516316品空間----您是SOHO族、團隊創業、新創工作者- https://gouterspace.com/品空間----您是SOHO族、團隊創業、新創工作者- https://gouterspace.com/
PlextorEdwardKedUEKuwaitother652112420808820252460312753084548463777118560743580541463220021121第一借錢網 https://168cash.com.tw/第一借錢網 https://168cash.com.tw/
TrekStorRicardocagTTKlimmenother757384673780307016254627214148534626880006514135137763882071382833樂貸網 全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com/樂貸網 全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com/
GoodramRicardocagTTKlimmenother048025104574564577725148784246836660351368203505741134870041507334樂貸網 全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com/樂貸網 全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com/
VericoThomaspepQQGray Mountainother746155574234261644013165531603882716603018560163216728447034782275樂貸網|全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com樂貸網|全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com
KingDianAndrewpruptOWKuwaitother636181247467040227644515067304223852208630353482881732103201833034第一借錢網-借錢,小額借款 https://168cash.com.tw/第一借錢網-借錢,小額借款 https://168cash.com.tw/
MachDarrellDexDPKhujandother673360618042771216136886841684453778044847755880573754458661836215水微晶玻尿酸 - 八千代醫美集團 https://yachiyo.com.tw/水微晶玻尿酸 - 八千代醫美集團 https://yachiyo.com.tw/
EmtecEdwardKedUEKuwaitother664720542628582283487241744616841865557442825871022238643854464343第一借錢網 https://168cash.com.tw/第一借錢網 https://168cash.com.tw/
PhilipsRandyusafeQSAarschotother152460543780377317553427708175660437877512618508464410815288406247品空間----您是SOHO族、團隊創業、新創工作者- https://gouterspace.com/品空間----您是SOHO族、團隊創業、新創工作者- https://gouterspace.com/
SSSTCRicardocagTTKlimmenother675061117030086581832038127553005682854214660625686040484282006308樂貸網 全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com/樂貸網 全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com/
HPHarleybleltDWCheltenhamother680603300888687314284252383086560574242821148322142801280507550060八千代醫美集團特別聘請來自台大、馬偕、長庚、台北醫學大學等三十多位,擁有豐富醫美經驗的專業醫師及多位女醫生看診 https://yachiyo.com.tw/八千代醫美集團特別聘請來自台大、馬偕、長庚、台北醫學大學等三十多位,擁有豐富醫美經驗的專業醫師及多位女醫生看診 https://yachiyo.com.tw/
PatriotHarleybleltDWCheltenhamother251536524882420337404033856575171367511188453283600516374801761575八千代醫美集團特別聘請來自台大、馬偕、長庚、台北醫學大學等三十多位,擁有豐富醫美經驗的專業醫師及多位女醫生看診 https://yachiyo.com.tw/八千代醫美集團特別聘請來自台大、馬偕、長庚、台北醫學大學等三十多位,擁有豐富醫美經驗的專業醫師及多位女醫生看診 https://yachiyo.com.tw/
addlinkThomaspepQQGray Mountainother001633678068208447261165315372666135876086688135033155714322771166樂貸網|全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com樂貸網|全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com
G.SkillAndrewpruptOWKuwaitother384251827433386721581313486085131021223666743458330186521147207224第一借錢網-借錢,小額借款 https://168cash.com.tw/第一借錢網-借錢,小額借款 https://168cash.com.tw/
XlyneEdwardKedUEKuwaitother383400005330064568713746384685760661027273731237465512053616738812第一借錢網 https://168cash.com.tw/第一借錢網 https://168cash.com.tw/
KingstonDarrellDexDPKhujandother742780115634757163882508786360601081466666505046253866655387017162水微晶玻尿酸 - 八千代醫美集團 https://yachiyo.com.tw/水微晶玻尿酸 - 八千代醫美集團 https://yachiyo.com.tw/
ToshibaRandyusafeQSAarschotother645247162182633672722667045105701168207467542742411162223228266705品空間----您是SOHO族、團隊創業、新創工作者- https://gouterspace.com/品空間----您是SOHO族、團隊創業、新創工作者- https://gouterspace.com/
KingDianHarleybleltDWCheltenhamother518184161820884832536131334212043384108137483432657124252322405185八千代醫美集團特別聘請來自台大、馬偕、長庚、台北醫學大學等三十多位,擁有豐富醫美經驗的專業醫師及多位女醫生看診 https://yachiyo.com.tw/八千代醫美集團特別聘請來自台大、馬偕、長庚、台北醫學大學等三十多位,擁有豐富醫美經驗的專業醫師及多位女醫生看診 https://yachiyo.com.tw/
VerbatimHarleybleltDWCheltenhamother444605840650414427133273274020247540283036718407045784245226272564八千代醫美集團特別聘請來自台大、馬偕、長庚、台北醫學大學等三十多位,擁有豐富醫美經驗的專業醫師及多位女醫生看診 https://yachiyo.com.tw/八千代醫美集團特別聘請來自台大、馬偕、長庚、台北醫學大學等三十多位,擁有豐富醫美經驗的專業醫師及多位女醫生看診 https://yachiyo.com.tw/
PatriotThomaspepQQGray Mountainother425138374346762824304426150745838661530852888231414882182262335753樂貸網|全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com樂貸網|全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com
PNYEdwardKedUEKuwaitother624305316077262023505256075317885561775471441744522345213307480425第一借錢網 https://168cash.com.tw/第一借錢網 https://168cash.com.tw/
ADATADarrellDexDPKhujandother212564220486832472478518322732526743514586365784373504373578514574水微晶玻尿酸 - 八千代醫美集團 https://yachiyo.com.tw/水微晶玻尿酸 - 八千代醫美集團 https://yachiyo.com.tw/
MicroStorageAndrewpruptOWKuwaitother833708364230105061610401031026177663738753750347721503622277004018第一借錢網-借錢,小額借款 https://168cash.com.tw/第一借錢網-借錢,小額借款 https://168cash.com.tw/
ADATARandyusafeQSAarschotother573372211245511753377055122270526503414423257523777426405213765053品空間----您是SOHO族、團隊創業、新創工作者- https://gouterspace.com/品空間----您是SOHO族、團隊創業、新創工作者- https://gouterspace.com/
LexarRicardocagTTKlimmenother080812516775868320250566048061337774130605213533740486847874251606樂貸網 全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com/樂貸網 全台最多身分證借錢、小額借款服務資訊平台推薦 https://yujie365.com/
SiliconHarleybleltDWCheltenhamother564778503262747071733342255887376007711675120246162071423782787546八千代醫美集團特別聘請來自台大、馬偕、長庚、台北醫學大學等三十多位,擁有豐富醫美經驗的專業醫師及多位女醫生看診 https://yachiyo.com.tw/八千代醫美集團特別聘請來自台大、馬偕、長庚、台北醫學大學等三十多位,擁有豐富醫美經驗的專業醫師及多位女醫生看診 https://yachiyo.com.tw/