Solid state drive optimization

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
User avatar
Pjotr
Level 21
Level 21
Posts: 13861
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Solid state drive optimization

Post by Pjotr » Sun Sep 20, 2015 10:46 am

Why XFS as filesystem, instead of the very reliable default EXT4? Since you classify yourself as "newbie", by posting in the Newbie Questions section, I don't think it's a good idea for you to start experimenting with alternative filesystems just yet.

Furthermore, I for one certainly wouldn't add "discard" to fstab.... Why? Are you so low in disk space on the SSD?

Otherwise, it's unnecessarily taxing for the operating system and the SSD, to perform TRIM instantly on *every* single file deletion (which is what "discard" in fstab does).

Finally, there should be no spaces between the options, only comma's. For example:

Code: Select all

noatime,errors=remount-ro
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Solid state drive optimization

Post by siawacsh » Thu Sep 24, 2015 12:47 pm

so far so good. The only outstanding thing I am noticing is occasional time lag between keyboard strokes and cursor response. Can anyone think of why this is happening ONLY since the optimization process.?

siawacsh

siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Solid state drive optimization

Post by siawacsh » Fri Sep 25, 2015 4:40 pm

Hi, since the optimization I am noticing a certain time lag between my keyboard stroke to reach the cursor. It is as if I am running out of memory or CPU is working too hard. Can any one help me with some trouble shooting steps to figure out what could be going on? This symptom happens on client and cloud based applications.

Siawacsh

User avatar
Pjotr
Level 21
Level 21
Posts: 13861
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Solid state drive optimization

Post by Pjotr » Fri Sep 25, 2015 5:17 pm

siawacsh wrote:Hi, since the optimization I am noticing a certain time lag between my keyboard stroke to reach the cursor. It is as if I am running out of memory or CPU is working too hard. Can any one help me with some trouble shooting steps to figure out what could be going on? This symptom happens on client and cloud based applications.

Siawacsh
It's highly unlikely that there's any connection at all, between optimizing your SSD and the symptoms you describe. Provided that you executed those optimizations correctly, that is. For example: in one of your previous messages, I saw some errors in your handling of fstab parameters (as I've already explained to you: some erroneous spaces in the fstab lines).

So it's either that, or something quite unrelated. What kind of keyboard are you using?
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Solid state drive optimization

Post by siawacsh » Sun Sep 27, 2015 7:59 pm

Hello, I did not notice this thread had expanded into two pages, otherwise I would have replied sooner. In answer to some of your questions. Discard is indicated in the official Mint tutorials and several others links listed below. If you remember the first time I had problems booting it was right after I had gone through your tutorials which included the scheduler and setting ONLY noatime into FSTAB. And yes, I have corrected the spaces in FSTAB and will make sure to keep it that way. As regards discard here is what I see on the community tutorials.

Code: Select all

http://community.linuxmint.com/tutorial/view/1366
I am noticing that each tutorial seems to edit FSTAB differently. For example, the mint community places noatime before discard. Whereas the following youtube tutorials does it the other way round. I am going to use the latter because this is the same guy who provided the solutions to nvidia problems. His is reliable.

Code: Select all

/ ext4 discard,noatime,commit=600,errors=remount-ro 0 1


Youtube tutorial in question

Code: Select all

https://youtu.be/IA47VhWlj

Code: Select all

http://www.howtogeek.com/62761/how-to-tweak-your-ssd-in-ubuntu-for-better-performance/
But overall there does not seem to be any consistency to the tutorials offered on the web, leaving me with the painful task of trail and error. II must have reinstalled Mint three times in the past ten days since I fitted the SSD.

Today I tried to set the scheduler to noop but after updating grub the system removed my SSD from the grub menu. All I could see on the grub menu was the Mint 17.2 installed on the disk drive which I am had to revert back to.

Now I realize the official Mint tutorials say if this command returns zero

Code: Select all

cat /sys/block/sdX/queue/rotational
And this command returns deadline

Code: Select all

cat /sys/block/sdX/queue/scheduler
Then there is no need to mess with the scheduler or grub

So on my next install, I am going to go back to using ext4 file system.

Here is the tutorial which persuaded me to use the XFS file system. But i am going to revert back to ext4.

Code: Select all

https://www.linux.com/learn/tutorials/837181-linux-distribution-upgrade-or-fresh-installation

User avatar
Pjotr
Level 21
Level 21
Posts: 13861
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Solid state drive optimization

Post by Pjotr » Tue Sep 29, 2015 4:15 am

OK, I think I've discovered the cause of the keyboard lag.... It's probably the video driver for your video card.

Yesterday, I suddenly noticed a keyboard lag as well. Just after an update for the nvidia-340 driver for my GeForce 210 video card (note that you have the same driver version and an almost identical video card).

In my case, a downgrade to the legacy nvidia-304 driver solved it (reboot after installing it).

By the way: my keyboard is a simple keyboard connected by USB cable to my PC.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Solid state drive optimization

Post by siawacsh » Tue Sep 29, 2015 10:12 am

Thanks Pjotr, I will try the keyboard fix after reinstalling the OS tomorrow.

Can I assume you now agree with the links I sent, especially the FSTAB discard tutorials including need or lack thereof to mess with scheduler in Mint 17.2?

Siawacsh

User avatar
Pjotr
Level 21
Level 21
Posts: 13861
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Solid state drive optimization

Post by Pjotr » Tue Sep 29, 2015 12:27 pm

siawacsh wrote:Thanks Pjotr, I will try the keyboard fix after reinstalling the OS tomorrow.

Can I assume you now agree with the links I sent, especially the FSTAB discard tutorials including need or lack thereof to mess with scheduler in Mint 17.2?

Siawacsh
My recommendation is, to apply the SSD tweaks in the how-to on my website....
https://sites.google.com/site/easylinuxtipsproject/ssd

In my opinion, "discard" in fstab is not a good solution. Because it forces your system to apply TRIM after each and every single file deletion. That causes unnecessary system load.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

Mute Ant
Level 14
Level 14
Posts: 5135
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: Solid state drive optimization

Post by Mute Ant » Tue Sep 29, 2015 6:10 pm

@siawacsh
Sorry to turn up late for the party...both of these look bad...
UUID=62e02e0d-184f-40a0-a0a4-b32f830eca8d / ext4 noatime errors=remount-ro 0 1
UUID=25c71371-e8d8-4650-b33b-d9823c21a876 / xfs defaults ,noatime, discard 0 1
...exactly 6 fields separated by white-space says the manual. That is field 4 has commas between options and no spaces after commas...
UUID=62e02e0d-184f-40a0-a0a4-b32f830eca8d / ext4 noatime,errors=remount-ro 0 1
UUID=25c71371-e8d8-4650-b33b-d9823c21a876 / xfs defaults,noatime,discard 0 1
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".

User avatar
Pjotr
Level 21
Level 21
Posts: 13861
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Solid state drive optimization

Post by Pjotr » Tue Sep 29, 2015 6:18 pm

Mute Ant wrote:@siawacsh
Sorry to turn up late for the party...both of these look bad...
UUID=62e02e0d-184f-40a0-a0a4-b32f830eca8d / ext4 noatime errors=remount-ro 0 1
UUID=25c71371-e8d8-4650-b33b-d9823c21a876 / xfs defaults ,noatime, discard 0 1
...exactly 6 fields separated by white-space says the manual. That is field 4 has commas between options and no spaces after commas...
UUID=62e02e0d-184f-40a0-a0a4-b32f830eca8d / ext4 noatime,errors=remount-ro 0 1
UUID=25c71371-e8d8-4650-b33b-d9823c21a876 / xfs defaults,noatime,discard 0 1
Yes, that's what I pointed out earlier in this thread as well:
http://forums.linuxmint.com/viewtopic.p ... 0#p1068774

....But the OP states that he has corrected that. :)
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Solid state drive optimization

Post by siawacsh » Tue Sep 29, 2015 8:48 pm

OK that makes it two people advising I do away with discard. But I still would appreciate if you guys can point me to an authoritative documentation that would back that up. Please do not take this the wrong way, but out of all the reading I have done these past few days your the only two people who suggest I can remove discard from FSTAB.

siawach

siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Solid state drive optimization

Post by siawacsh » Fri Oct 02, 2015 10:28 pm

OK PJOTR, you cannot back your thesis on discard. I am still willing to give your optimization tutorials another try even though I have tried it once before. I re-read it with fresh eyes and I think it is worth another try.

Regarding what your say about the nvidia drivers, yes, I have been using 340 since Mint 15. So I am guessing there is a bug with Mint 17.2 using nvida-340. Otherwise there is no reason why I should not use the recommended driver. Are you using 304-update or 304 standard.?

Do let me know as I want reinstall the OS tomorrow.

Cheers
siawacsh

niowluka
Level 5
Level 5
Posts: 730
Joined: Tue May 27, 2014 6:28 pm
Location: Krakow, Poland

Re: Solid state drive optimization

Post by niowluka » Sat Oct 03, 2015 3:27 am

siawacsh wrote:But I still would appreciate if you guys can point me to an authoritative documentation that would back that up. Please do not take this the wrong way, but out of all the reading I have done these past few days your the only two people who suggest I can remove discard from FSTAB.
Make that 3:
https://wiki.archlinux.org/index.php/SS ... mount_flag
The gist of it it's that:
a) you already have periodic trim enabled in Mint, so you don't need a continuous one on top of that
b) it causes problems on some SSDs
siawacsh wrote:OK PJOTR, you cannot back your thesis on discard. I am still willing to give your optimization tutorials another try even though I have tried it once before. I re-read it with fresh eyes and I think it is worth another try.
I am not sure why you are so desperate to follow it through, despite the fact it's giving you trouble, and is completely not necessary, but good luck anyway.
Mint 17 Openbox (MATE) 64bit | Linux 4.1.6 (Vanilla)

Gigabyte GA-880GA-UD3H | AMD Phenom II X4 965 3.4Ghz | G.Skill 8GB DDR3-1600 RipjawsX, F3-12800CL8D-8GBXM | MSI R7 260X 2048 MB GDDR5 OC

User avatar
Pjotr
Level 21
Level 21
Posts: 13861
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Solid state drive optimization

Post by Pjotr » Sat Oct 03, 2015 3:44 am

siawacsh wrote:Are you using 304-update or 304 standard.?
Standard.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Solid state drive optimization

Post by siawacsh » Sat Oct 03, 2015 5:05 pm

Thank you all. I have a bit more confidence to go ahead with that now. I will let you know how I get on.

BTW is it advisable to add my disk drive to FSTAB. My idea is so that when I click on recent files on the menu tab it can remember the files I accessed last time used.

siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Solid state drive optimization

Post by siawacsh » Sat Oct 03, 2015 8:22 pm

OK, I reinstalled and configured FSTAB accordingly without discard. So far so good. I also disabled hibernate. However, I cannot disable suspend even though I set power management to never suspend when inactive. Never turn off screen when inactive. I only have suspend on when lid is closed.

But when I leave it inactive for more than ten minutes it still goes into suspend.

Would appreciate some ideas please.

BTW, what negative impact would setting the firefox cache management to zero would have? Does that mean streaming would become unstable?

Siawacsh

User avatar
Pjotr
Level 21
Level 21
Posts: 13861
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Solid state drive optimization

Post by Pjotr » Sun Oct 04, 2015 5:22 am

siawacsh wrote:what negative impact would setting the firefox cache management to zero would have? Does that mean streaming would become unstable?
Not on my machines. Anyway: that's an easy one to try for yourself....
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Solid state drive optimization

Post by siawacsh » Sun Oct 04, 2015 9:01 am

Thanks pjotr, can also comment on suspend? I don't understand why I cannot disable it. As mentioned I have already set power management to never. But it still goes into suspend after ten minutes of inactivity.

Siawacsh

User avatar
Pjotr
Level 21
Level 21
Posts: 13861
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Solid state drive optimization

Post by Pjotr » Sun Oct 04, 2015 9:14 am

siawacsh wrote:Thanks pjotr, can also comment on suspend? I don't understand why I cannot disable it. As mentioned I have already set power management to never. But it still goes into suspend after ten minutes of inactivity.

Siawacsh
Why would you want to disable "ordinary" suspend (suspend-to-ram) as well? Unlike hibernation (suspend-to-disk) it has no impact at all on your SSD.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Solid state drive optimization

Post by siawacsh » Sun Oct 04, 2015 9:53 am

I disable it because it is annoying having to login each time I go for a coffee. Anyway, I have found the fix in screen saver. Thank you for your support and patience. Also thank you to niowluka for the informative article. Hopefully this would make for a stable platform.

BTW Pjotr, I see on your site you have some tutorials on HP printers. I have been going back and forth over a period of several months with Canonical Launchpad to solve my problems with a HP laserjet 1018. I have almost given up and am seriously considering a Samsung Xpress M2825ND which the manufacturer guarantees with linux support. I already have an open thread on this forum which does not include my interaction with Launchpad support. Here is a link to the conversation.

https://answers.launchpad.net/hplip/+question/268436

Post Reply

Return to “Newbie Questions”