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

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...