Jump to content


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

ssd benchtest speed linux nvme

  • Please log in to reply
38 replies to this topic

#26 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,942 posts

Posted 12 August 2018 - 08:29 PM

View PostV.T. Eric Layton, on 12 August 2018 - 08:25 PM, said:

Ah... many things I have to learn, I s'pose. If I remember correctly, there are already some SSD threads around here that explain a lot of it. :)

Just follow this as it covers TRIM and such: https://wiki.archlin...lid_state_drive
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#27 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,633 posts

Posted 13 August 2018 - 04:41 AM

View PostV.T. Eric Layton, on 12 August 2018 - 08:25 PM, said:

Ah... many things I have to learn, I s'pose. If I remember correctly, there are already some SSD threads around here that explain a lot of it. :)

I had forgotten that you need to do some background reading before you installed and migrated to a ssd. I found the following articles very helpful as starter information when I made the transition as they contain clear and step by step information which was very helpful to a novice user like myself. They are well worth the ten or so minutes they need to read them.

http://www.linux-mag...uning-Your-SSD

http://www.linux-mag...ting-to-an-SSD

Re-reading the above made me realise that I had missed out on getting clued up on the "lazytime" mount option so I am off to investigate. I may very well not need it as Arch can utilise a systemd unit for trim which runs at default once a week and I have already set this up.
I also have not set up several of the optimisations for ssd's so I'll be investigating them as well. I think I have set up my Windows to run properly on a ssd but I will check that out also just to be sure.

Solid state drives make everything run faster and more smoothly, but you can squeeze out even more performance with some practical optimization steps.

all of the above links are a tad old but almost all the information is still relevant.

I started this thread as a bit of fun however whilst it has been fun it has also led to discovery of more useful information. You can just pop a ssd in your pc and do a basic set up and run with it quite happily or you can scratch that geeky itch and fine tune it to gain every last little bit of advantage from it.

I also think I have solved the mystery of why my nvme drive was posting slower write results than other folks ssd's. My drive was almost full which will have some impact. I also leave my pc on 24/7 as I run Boinc for the WCG which results in a load of reads and writes 24/7 this will also have an impact. I have set up the systemd unit to run at the default weekly time so it may be beneficial for me to set this to run more frequently.

Happy speeding folks and don't burn out that old grey cell :harhar:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#28 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,633 posts

Posted 13 August 2018 - 07:25 AM

View Postsecuritybreach, on 12 August 2018 - 08:29 PM, said:

View PostV.T. Eric Layton, on 12 August 2018 - 08:25 PM, said:

Ah... many things I have to learn, I s'pose. If I remember correctly, there are already some SSD threads around here that explain a lot of it. :)

Just follow this as it covers TRIM and such: https://wiki.archlin...lid_state_drive

I may be wrong here but I do not think Eric's Slackware uses systemd so he will not be able to use the service.timer for trim. He should be able to set up a cron job with fstrim. It seems this is a much better way than utilising the "discard" option in fstab.
I have just made some changes to my fstab,

#/dev/nvme0n1p4 LABEL=ArchRoot
UUID=facb8acb-8d5d-4d91-8630-31a781a95d44	/			 ext4		  rw,relatime,lazytime,data=ordered	0 1

I added the "lazytime" option after extensive reading on the subject. My trim is done via systemd. An I think I am going to change from UUID to part-UUID later on after I have had a much needed cup of tea.

If anyone spots faults with my fstab entry do let me know. :breakfast:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#29 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,942 posts

Posted 13 August 2018 - 07:36 AM

Looks good to me but I have never heard of or used the "lazytime" option....
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#30 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,633 posts

Posted 13 August 2018 - 12:22 PM

View Postsecuritybreach, on 13 August 2018 - 07:36 AM, said:

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:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#31 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,942 posts

Posted 13 August 2018 - 12:52 PM

View Postabarbarian, on 13 August 2018 - 12:22 PM, said:

View Postsecuritybreach, on 13 August 2018 - 07:36 AM, said:

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.

Quote

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.

Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#32 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,517 posts

Posted 13 August 2018 - 01:09 PM

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

I have a tee shirt that says this...

Posted Image

#33 OFFLINE   raymac46

raymac46

    Discussion Deity

  • Forum MVP
  • 3,838 posts

Posted 13 August 2018 - 05:44 PM

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"


Posted Image

Registered Linux User 445659

#34 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,633 posts

Posted 14 August 2018 - 06:08 AM

View Postraymac46, on 13 August 2018 - 05:44 PM, said:

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.

Quote

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:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#35 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,633 posts

Posted 14 August 2018 - 06:16 AM

View Postsecuritybreach, on 13 August 2018 - 12:52 PM, said:



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

Quote

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/

Quote

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


Quote

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.

Quote

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:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#36 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,942 posts

Posted 14 August 2018 - 06:38 AM

View Postabarbarian, on 14 August 2018 - 06:16 AM, said:

View Postsecuritybreach, on 13 August 2018 - 12:52 PM, said:

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

Quote

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/

Quote

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


Quote

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.

Quote

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.
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#37 OFFLINE   sunrat

sunrat

    Thread Kahuna

  • Forum Moderators
  • 5,692 posts

Posted 14 August 2018 - 08:42 AM

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
registered Linux user number 324659  ||    The importance of Reading The *Fine* Manual! :D
Posted ImagePosted ImagePosted ImagePosted Image
For the things we have to learn before we can do them, we learn by doing them.

#38 OFFLINE   raymac46

raymac46

    Discussion Deity

  • Forum MVP
  • 3,838 posts

Posted 14 August 2018 - 08:44 AM

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

Registered Linux User 445659

#39 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,633 posts

Posted 16 August 2018 - 03:32 AM

View Postraymac46, on 14 August 2018 - 08:44 AM, said:

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:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image





Also tagged with one or more of these keywords: ssd, benchtest, speed, linux, nvme

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users