Jump to content
abarbarian

Disk Speed Test (Read/Write): SSD Performance in Linux

Recommended Posts

securitybreach

Looks good to me but I have never heard of or used the "lazytime" option....

 

Never heard of lazytime :w00t: Blimey and I thought you were right at the cutting edge. Guess we will have to change your nickname from Minute Man to Missed It Man :Laughing: As an x hippy I am familiar with all aspects of lazytime :laugh:

 

Well glancing over https://lwn.net/Articles/621046/, it seems to be just a convenience and to stay POSIX compliant but not really required.

Relatime works well enough for most systems, but there are still those who would like better atime tracking without paying the performance penalty for it. Some users also dislike the fact that relatime, for all its value, causes the system to not be fully compliant with the POSIX specification.

Share this post


Link to post
Share on other sites
V.T. Eric Layton

"Lazytime"? Sounds like a wonderful thing to me. ;)

 

I have a tee shirt that says this...

 

81x5IZfkq8L._AC_UL300_SR300,297_.jpg

  • Like 2

Share this post


Link to post
Share on other sites
raymac46

This is handy to get the schedulers set properly if you have both an SSD and an HDD in your system.

 

Gksudo gedit/etc/udev/rules.d/60-schedulers.rules
# set noop scheduler for non-rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="noop"
# set cfq scheduler for rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="cfq"

  • Like 2

Share this post


Link to post
Share on other sites
abarbarian

This is handy to get the schedulers set properly if you have both an SSD and an HDD in your system.

 

Gksudo gedit/etc/udev/rules.d/60-schedulers.rules
# set noop scheduler for non-rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="noop"
# set cfq scheduler for rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="cfq"

 

This whole I/O thing is pretty hard to pin down.

 

Arch seems to use cfq as a default for everything. Finding information for hdd's is variable and hard to pin down. Optimisation for ssd's depends on who wrote the information and when . I can find no clear advice in my searching. I did however find that nvme's do not require an I/O scheduler to be set.

 

PCIe devices (Nvme ssd drives) have their own large internal queues along with fast service and do not require or benefit from setting an I/O scheduler.

 

Mind you I did find some info that suggests that you can set a scheduler for nvme's and it will provide benefits, as it was a specialist case I got lost in all the fine detail and will stick with no scheduler for my nvme. :laugh:

  • Like 1

Share this post


Link to post
Share on other sites
abarbarian

 

 

Well glancing over https://lwn.net/Articles/621046/, it seems to be just a convenience and to stay POSIX compliant but not really required.

Relatime works well enough for most systems, but there are still those who would like better atime tracking without paying the performance penalty for it. Some users also dislike the fact that relatime, for all its value, causes the system to not be fully compliant with the POSIX specification.

 

From the horses mouth it seems that there may be benefits other than just POSIX compliance.

 

https://lwn.net/Articles/620086/

 

Enabling lazytime and disabling the default realtime will result in fewer extra disk writes,

 

 

n.b.: because of the many wins of this mode, we may want to enable lazytime updates by default in the future.

 

I realised that I had altered fstab to include lazytime and relatime which is pretty dumb. So I have altered it to the below.

UUID=facb8acb-8d5d-4d91-8630-31a781a95d44 / ext4 rw,lazytime,data=ordered 0 1

If anyone spots a flaw in the fstab entry please do tell.

 

 

:breakfast:

  • Like 2

Share this post


Link to post
Share on other sites
securitybreach

Well glancing over https://lwn.net/Articles/621046/, it seems to be just a convenience and to stay POSIX compliant but not really required.

Relatime works well enough for most systems, but there are still those who would like better atime tracking without paying the performance penalty for it. Some users also dislike the fact that relatime, for all its value, causes the system to not be fully compliant with the POSIX specification.

 

From the horses mouth it seems that there may be benefits other than just POSIX compliance.

 

https://lwn.net/Articles/620086/

 

Enabling lazytime and disabling the default realtime will result in fewer extra disk writes,

 

 

n.b.: because of the many wins of this mode, we may want to enable lazytime updates by default in the future.

 

I realised that I had altered fstab to include lazytime and relatime which is pretty dumb. So I have altered it to the below.

UUID=facb8acb-8d5d-4d91-8630-31a781a95d44 / ext4 rw,lazytime,data=ordered 0 1

If anyone spots a flaw in the fstab entry please do tell.

 

 

:breakfast:

 

Thanks, I will check it out then.

Share this post


Link to post
Share on other sites
sunrat

I just use noatime.

 

On a side note, lazytime reminds me of a funny:

"What are you doing tomorrow?"

"Nothing"

"But that's what you did today."

"I didn't finish."

:D

  • Like 3

Share this post


Link to post
Share on other sites
raymac46

I think you are right about PCI based SSDs not needing I/O schedulers. This scheduler ruleset is strictly for SATA based drives.

Share this post


Link to post
Share on other sites
abarbarian

I think you are right about PCI based SSDs not needing I/O schedulers. This scheduler ruleset is strictly for SATA based drives.

 

$ cat /sys/block/nvme0n1/queue/scheduler
[none] mq-deadline kyber bfq 

$ cat /sys/block/sd?/queue/scheduler
noop deadline [cfq]
noop deadline [cfq]
noop deadline [cfq]
noop deadline [cfq] 

 

It is the default on Arch and Arch looks to use cfq for ssd's and hdd's as a default. :breakfast:

Share this post


Link to post
Share on other sites
abarbarian

For anyone with a nvme drive here are some neat links regarding the nvme-cli tool.  As an early adopter I bought a Samsung SP591 which was the first nvme Samsung brought out. This was an OME product as they were using it as a test drive to refine firmware and controllers until they brought a main line product to market. So a lot of the toole in the nvme-cli do not work for me. The main ones do though and this is one of the very useful ones.

Put brain in gear befor pressing enter15:48:03-->Thu Jun 04-->~
-->sudo nvme smart-log /dev/nvme0 | grep "^temperature"
temperature                             : 31 C

So my nvme is not overheating, thats cool 😂

 

Open Source NVMe™ Management Utility – NVMe Command Line Interface (NVMe-CLI)

 

https://www.mankier.com/package/nvme-cli

 

A Quick Tour of NVM Express (NVMe)(SP591)

 

NVME Tip's and Tricks Intel

 

😎

  • Like 1
  • Agree 1

Share this post


Link to post
Share on other sites
Hedon James
On 8/14/2018 at 8:42 AM, sunrat said:

On a side note, lazytime reminds me of a funny:

"What are you doing tomorrow?"

"Nothing"

"But that's what you did today."

"I didn't finish."

:D

 

I stole this from someone, somewhere....can't remember who or when....but it's become one of my own:

 

My wife will sometimes ask "what are your plans for this weekend?"

And I'll reply "nothing"

And she'll say "oh, in that case, maybe you/we can (fill in the blank of whatever activity/event she has in mind)"

And I'll clarify "I think you misunderstood me.  When I said I was doing "nothing", that didn't mean I had an open slot of time to be filled.  It meant that "nothing" is the thing that I'm doing.  Let's do that another time, when I am looking for something to do."

Which then leads into the conversation you mentioned.  She'll usually say "you did that last weekend", or something similar.

And I'll reply "still haven't finished yet".

 

After 18 years together, you'd think she knows me better.  It doesn't happen often, but it does happen.  She still asks and still doesn't think it's funny.

  • Haha 1

Share this post


Link to post
Share on other sites
securitybreach
8 hours ago, abarbarian said:

For anyone with a nvme drive here are some neat links regarding the nvme-cli tool.  As an early adopter I bought a Samsung SP591 which was the first nvme Samsung brought out. This was an OME product as they were using it as a test drive to refine firmware and controllers until they brought a main line product to market. So a lot of the toole in the nvme-cli do not work for me. The main ones do though and this is one of the very useful ones.


Put brain in gear befor pressing enter15:48:03-->Thu Jun 04-->~
-->sudo nvme smart-log /dev/nvme0 | grep "^temperature"
temperature                             : 31 C

So my nvme is not overheating, thats cool 😂

 

Open Source NVMe™ Management Utility – NVMe Command Line Interface (NVMe-CLI)

 

https://www.mankier.com/package/nvme-cli

 

A Quick Tour of NVM Express (NVMe)(SP591)

 

NVME Tip's and Tricks Intel

 

😎

 

 

Pretty cool, thanks. I just checked my nvme and it is 32C so all good too.

Share this post


Link to post
Share on other sites
sunrat

inxi can show drive temps too. My SATA SSD here shows 30°C, HDDs are somewhat warmer:

 

root@siduction-brain2:~# inxi -Dx
Drives:    Local Storage: total: 1.92 TiB used: 1013.00 GiB (51.4%)
           ID-1: /dev/sda vendor: OCZ model: VERTEX2 3.5 size: 107.13 GiB temp: 30 C
           ID-2: /dev/sdb vendor: Western Digital model: WD1001FALS-00J7B1 size: 931.51 GiB temp: 42 C
           ID-3: /dev/sdc vendor: Western Digital model: WD1001FALS-00J7B1 size: 931.51 GiB temp: 40 C

 

Share this post


Link to post
Share on other sites
securitybreach

I wonder why it only shows the temp for your main drive:

 

Quote

Cerberus :: ~ » inxi -Dx

Drives:    Local Storage: total: 22.99 TiB used: 13.62 TiB (59.3%)
           ID-1: /dev/nvme0n1 vendor: Samsung model: MZVKW1T0HMLH-000H1 size: 953.87 GiB temp: 32 C
           ID-2: /dev/sda vendor: Western Digital model: WD20EARS-00MVWB0 size: 1.82 TiB
           ID-3: /dev/sdb vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB
           ID-4: /dev/sdc vendor: Seagate model: ST10000VN0004-1ZD101 size: 9.10 TiB
           ID-5: /dev/sdd vendor: Western Digital model: WD80EFAX-68KNBN0 size: 7.28 TiB
           ID-6: /dev/sde vendor: Western Digital model: WD20EADS-00R6B0 size: 1.82 TiB
           ID-7: /dev/sdf vendor: Western Digital model: WD20EARX-00PASB0 size: 1.82 TiB

 

Share this post


Link to post
Share on other sites
sunrat
54 minutes ago, securitybreach said:

I wonder why it only shows the temp for your main drive:

 

You ned to run it as root to get temp data. Shows all of mine. I wonder why it shows your main drive temp if you didn't run it as root? 🤔🙂

Share this post


Link to post
Share on other sites
securitybreach
11 minutes ago, sunrat said:

 

You ned to run it as root to get temp data. Shows all of mine. I wonder why it shows your main drive temp if you didn't run it as root? 🤔🙂

 

 

Nope:

 

Quote

Cerberus :: ~ » sudo inxi -Dx
[sudo] password for comhack: 
Drives:    Local Storage: total: 22.99 TiB used: 13.54 TiB (58.9%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: MZVKW1T0HMLH-000H1 size: 953.87 GiB temp: 32 C 
           ID-2: /dev/sda vendor: Western Digital model: WD20EARS-00MVWB0 size: 1.82 TiB 
           ID-3: /dev/sdb vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB 
           ID-4: /dev/sdc vendor: Seagate model: ST10000VN0004-1ZD101 size: 9.10 TiB 
           ID-5: /dev/sdd vendor: Western Digital model: WD80EFAX-68KNBN0 size: 7.28 TiB 
           ID-6: /dev/sde vendor: Western Digital model: WD20EADS-00R6B0 size: 1.82 TiB 
           ID-7: /dev/sdf vendor: Western Digital model: WD20EARX-00PASB0 size: 1.82 TiB 

 

Same with root user as well.

Share this post


Link to post
Share on other sites
sunrat

Can you get temp with any other utility apart from smartctl? inxi uses hddtemp and/or lm-sensors.

Share this post


Link to post
Share on other sites
securitybreach
1 hour ago, sunrat said:

Can you get temp with any other utility apart from smartctl? inxi uses hddtemp and/or lm-sensors.

 

 

Yup, no problem with hddtemp:

 

Quote

╭─root@Cerberus /home/comhack ‹master*›
╰─# hddtemp /dev/sd*                                                                                                                                                1 ↵
/dev/sda: WDC WD20EARS-00MVWB0: 35°C
/dev/sda1: WDC WD20EARS-00MVWB0: 35°C
WARNING: Drive /dev/sdb doesn't seem to have a temperature sensor.
WARNING: This doesn't mean it hasn't got one.
WARNING: If you are sure it has one, please contact me (hddtemp@guzu.net).
WARNING: See --help, --debug and --drivebase options.
/dev/sdb: Samsung SSD 850 EVO 250G B              @:  no sensor
WARNING: Drive /dev/sdb1 doesn't seem to have a temperature sensor.
WARNING: This doesn't mean it hasn't got one.
WARNING: If you are sure it has one, please contact me (hddtemp@guzu.net).
WARNING: See --help, --debug and --drivebase options.
/dev/sdb1: Samsung SSD 850 EVO 250G B              @:  no sensor
/dev/sdc: ST10000VN0004-1ZD101: drive is sleeping
/dev/sdc1: ST10000VN0004-1ZD101: drive is sleeping
/dev/sdd: WDC WD80EFAX-68KNBN0: 44°C
/dev/sdd1: WDC WD80EFAX-68KNBN0: 44°C
/dev/sde: WDC WD20EADS-00R6B0: 34°C
/dev/sde1: WDC WD20EADS-00R6B0: 34°C
/dev/sdf: WDC WD20EARX-00PASB0: 32°C
/dev/sdf1: WDC WD20EARX-00PASB0: 33°C
/dev/sdf2: WDC WD20EARX-00PASB0: 33°C

 

Share this post


Link to post
Share on other sites
securitybreach

Oddly enough, I think it was because the hddtemp app not installed:

 

Quote

╭─root@Cerberus /home/comhack ‹master*›
╰─# inxi -Dx        
Drives:    Local Storage: total: 22.99 TiB used: 13.54 TiB (58.9%)
           ID-1: /dev/nvme0n1 vendor: Samsung model: MZVKW1T0HMLH-000H1 size: 953.87 GiB temp: 31 C
           ID-2: /dev/sda vendor: Western Digital model: WD20EARS-00MVWB0 size: 1.82 TiB temp: 35 C
           ID-3: /dev/sdb vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB
           ID-4: /dev/sdc vendor: Seagate model: ST10000VN0004-1ZD101 size: 9.10 TiB
           ID-5: /dev/sdd vendor: Western Digital model: WD80EFAX-68KNBN0 size: 7.28 TiB temp: 44 C
           ID-6: /dev/sde vendor: Western Digital model: WD20EADS-00R6B0 size: 1.82 TiB temp: 34 C
           ID-7: /dev/sdf vendor: Western Digital model: WD20EARX-00PASB0 size: 1.82 TiB temp: 33 C

 

  • Agree 1

Share this post


Link to post
Share on other sites
abarbarian
Posted (edited)
6 hours ago, sunrat said:

 

You ned to run it as root to get temp data. Shows all of mine. I wonder why it shows your main drive temp if you didn't run it as root? 🤔🙂

 

Here is another puzzle for you,

 

As a user main drive plus one secondary show temps the 860 Evo does not,

 

 Put brain in gear befor pressing enter08:56:04-->Fri Jun 05-->~
-->inxi -Dx
Drives:
  Local Storage: total: 937.12 GiB used: 108.09 GiB (11.5%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVPV256HDGL-00000 
  size: 238.47 GiB temp: 29 C 
  ID-2: /dev/sda vendor: Crucial model: CT250MX200SSD1 size: 232.89 GiB 
  temp: 34 C 
  ID-3: /dev/sdb vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB 

As root the same occurs,

 

 Put brain in gear befor pressing enter08:56:46-->Fri Jun 05-->~
-->sudo inxi -Dx
Drives:
  Local Storage: total: 937.12 GiB used: 108.08 GiB (11.5%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVPV256HDGL-00000 
  size: 238.47 GiB temp: 29 C 
  ID-2: /dev/sda vendor: Crucial model: CT250MX200SSD1 size: 232.89 GiB 
  temp: 34 C 
  ID-3: /dev/sdb vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB 

However after some magic hacking,

 

 Put brain in gear befor pressing enter09:25:22-->Fri Jun 05-->~
-->sudo inxi -Dx
Drives:
  Local Storage: total: 937.12 GiB used: 108.13 GiB (11.5%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVPV256HDGL-00000 
  size: 238.47 GiB temp: 29 C 
  ID-2: /dev/sda vendor: Crucial model: CT250MX200SSD1 size: 232.89 GiB 
  temp: 33 C 
  ID-3: /dev/sdb vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB 
  temp: 29 C 

Who's a clever boy then :hysterical:

 

Solution https://www.reddit.com/r/unRAID/comments/9rnp82/howto_get_ssd_temp_monitoring_working_with_hddtemp/

Edited by abarbarian

Share this post


Link to post
Share on other sites
sunrat
21 minutes ago, abarbarian said:

However after some magic hacking,

 

Who's a clever boy then :hysterical:

 

Solution https://www.reddit.com/r/unRAID/comments/9rnp82/howto_get_ssd_temp_monitoring_working_with_hddtemp/

 

Nice sleuthing abarbarian! I award you a virtual scratch behind the ears. :D

I had a look at that hddtemp.db file. None of my drives are listed but hddtemp returns temps for all the drives on this system anyway. 🤔

  • Thanks 1

Share this post


Link to post
Share on other sites
abarbarian

Meanwhile back on track with the nvme-cli tool,

 

These two commands are worth a run,

 Put brain in gear befor pressing enter10:08:18-->Fri Jun 05-->~
-->sudo nvme smart-log /dev/nvme0
Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning                        : 0
temperature                             : 30 C
available_spare                         : 100%
available_spare_threshold               : 10%
percentage_used                         : 4%
endurance group critical warning summary: 0
data_units_read                         : 10,306,686
data_units_written                      : 12,509,946
host_read_commands                      : 126,096,306
host_write_commands                     : 287,355,479
controller_busy_time                    : 2,404
power_cycles                            : 1,167
power_on_hours                          : 23,739
unsafe_shutdowns                        : 485
media_errors                            : 0
num_err_log_entries                     : 481
Warning Temperature Time                : 0
Critical Composite Temperature Time     : 0
Thermal Management T1 Trans Count       : 0
Thermal Management T2 Trans Count       : 0
Thermal Management T1 Total Time        : 0
Thermal Management T2 Total Time        : 0
 Put brain in gear befor pressing enter10:05:27-->Fri Jun 05-->~
-->sudo nvme id-ctrl -H /dev/nvme0
NVME Identify Controller:
vid       : 0x144d
ssvid     : 0x144d
sn        : S1XWNYAG908281      
mn        : SAMSUNG MZVPV256HDGL-00000              
fr        : BXW7300Q
rab       : 2
ieee      : 002538
cmic      : 0
  [3:3] : 0     ANA not supported
  [2:2] : 0     PCI
  [1:1] : 0     Single Controller
  [0:0] : 0     Single Port
There is tons more output,,,,,

 

It may be worth while updating the firmware mine, gained from the second command, is

 

fr        : BXW7300Q

Further information regarding this can be found here,

 

https://www.overclock.net/forum/355-ssd/1551060-official-samsung-sm951-owners-club-140.html

 

Samsung SM951 NVMe Firmware Version BXW75H0Q

 

I am still investigating whether to update my firmware. I know there is a newer version available but I need more information before I decide to act or not.

 

😎

Share this post


Link to post
Share on other sites
abarbarian

An here is some very interesting reading, the story of a cold hearted serial killer with all the gory details. I spotted this story when it first started but never followed it up to its conclusion.

 

Introducing the SSD Endurance Experiment
 

Quote

 

SSDs are pretty awesome. They’re fast enough to provide a palpable improvement in overall system responsiveness and affordable enough that even budget rigs can get in on the action. Without moving parts, SSDs also tolerate rough handling much better than mechanical drives, making them particularly appealing for mobile devices. That’s a pretty good all-around combination.

Despite the perks, SSDs have a dirty little secret. Their flash memory may be inherently robust, but it’s also fundamentally weak. Writing data erodes the nano-scale structure of the individual memory cells, imposing a ceiling on drive life that can be measured in terabytes. Solid-state drives are living on borrowed time. The question is: how much?

Drive makers typically characterize lifespans in total bytes written. Their estimates usually range from 20-40GB per day for the length of the three- or five-year warranty. However, based on user accounts all over the web, those figures are fairly conservative. They don’t tell us what happens to SSDs as they approach the end of the road, either.

 


 

 

The SSD Endurance Experiment: They’re all dead

Quote

I never thought this whole tech journalism gig would turn me into a mass murderer. Yet here I am, with the blood of six SSDs on my hands, and that’s not even the half of it. You see, these were not crimes of passion or rage, nor were they products of accident. More than 18 months ago, I vowed to push all six drives to their bitter ends. I didn’t do so in the name of god or country or even self-defense, either. I did it just to watch them die.

Technically, I’m also a torturer—or at least an enhanced interrogator. Instead of offering a quick and painless death, I slowly squeezed out every last drop of life with a relentless stream of writes far more demanding than anything the SSDs would face in a typical PC. To make matters worse, I exploited their suffering by chronicling the entire process online.

Today, that story draws to a close with the final chapter in the SSD Endurance Experiment. The last two survivors met their doom on the road to 2.5PB, joining four fallen comrades who expired earlier. It’s time to honor the dead and reflect on what we’ve learned from all the carnage.

 

Seems like a ssd even a cheap one would out last an average computer user.

 

Here is a more modern test done in Denmark.

 

https://www.nordichardware.se/test/storage/vi-testar-livslaengden-pa-ssd-enheter-med-tlc-minne-foelj-vart-loepande-ssd-doedartest.html

 

tlc_test_end_1.jpg

 

What I find amazing from both tests is the amount of data transfered and years in use these ssd's are capable of. :w00tx100:

  • Like 1
  • Agree 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...