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
siawacsh
Level 3
Level 3
Posts: 160
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Solid state drive optimization

Post by siawacsh » Thu Sep 10, 2015 10:38 am

Hi, I recently installed Mint 17.2 on a new Kingston Hyper X Savage solid state drive (240 gigs) and heard that I must optimize it if I am to avail of it's full benefits. I still have my western digital 250 disk drive with 17.0 Quiana on it. Snce my personal data will be on my disk drive I dedicated the whole SSD to / with ex4 partition. I started with the tutorials presented by the first link. However, once I went through all the steps presented therein my system would not boot. I would get a black screen with a load of messages which I was not able to log.

https://sites.google.com/site/easylinuxtipsproject/ssd

Then I read through this tutorial which seems to allow my system more stability.

http://community.linuxmint.com/tutorial/view/1366

Basically I edited fstab with noatime

According to the Mint tutorial I don't need a swap partition as long as I kept the swap on my disk drive. But in accordance with the first link I also created 10% unallocated space on the SSD.

The Mint tutorial suggests I do not need to mess with the scheduler as long as these two commands give the required output

siawacsh@siawacsh-sager ~ $ sudo cat /sys/block/sdb/queue/rotational
0

siawacsh@siawacsh-sager ~ $ sudo cat /sys/block/sdb/queue/scheduler
noop [deadline] cfq

noop is supposed to be better for a system with two drives.

I then set Firefox browser cache to zero.

Finally, I disabled hibernation

sudo mv -v /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla /

My system worked this way for two days before it crashed again this morning. I would not boot but this time with a simpler black screen. The error message was

"an error occurred while mounting /proc/bus/usb"

I had to reinstall 17.2. I have a fresh machine.

Any feedback on the above, especially the meaning of the above crash would be appreciated.

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 » Thu Sep 10, 2015 11:10 am

siawacsh wrote:I had to reinstall 17.2. I have a fresh machine.
Leave it at that and just enjoy.
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 » Thu Sep 10, 2015 12:25 pm

This is a strange error, which I don't think is related to any SSD optimizations that I describe on my website:
"an error occurred while mounting /proc/bus/usb"

Is your SSD running on the latest firmware for it?
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 10, 2015 1:14 pm

Considering the drive is new I am assuming it should be using the latest firmware. I did not see anything to that effect on the Kindgston website. But I will contact them and see. BTW, if I clean up the / partition of my disk drive I will lose the swap. Do you think that will impact my system. negatively?

siawach

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 » Thu Sep 10, 2015 1:32 pm

Please generate an overview of your system like this:
- Launch a terminal window (this is how to launch a terminal window);
- make the terminal window full screen, to avoid chopped lines;
- copy/paste this command into the terminal:

Code: Select all

inxi -Fxz
(if you type: the letter F is a capital letter)

Press Enter.

Copy/paste the output in your next message.
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.

Ron-N
Level 2
Level 2
Posts: 96
Joined: Fri Aug 28, 2015 1:52 am
Contact:

Re: Solid state drive optimization

Post by Ron-N » Thu Sep 10, 2015 3:10 pm

Interesting topic since i'm very interested in fine-tuning my SSD drive.

Looked at that google website and looked at other websites and i did spotted a difference: that google website suggest not to put discard in the fstab file while other sites suggest to put discard in the fstab line, both the Mint Community link as well the how-to-geek site and many more. IMHO this works confussing for users who are having a SSD drive in their system for the first time. What do the need to do? Discard in fstab yes or no?

Could this maybe be the source of the topic starters system failure?
Hybrid laptop hardware specifications:
Intel Core i7-4710HQ*Kingston 16 GB RAM*Intel integr. GPU/NVidia GeForce GTX860M*Qualcomm Atheros Killer E2200/Intel Wireless 3160*128 GiB SSD/1 TB HDD*

Linux Mint 17.2 Xfce/kernel version: 3.19.0-28

ralphy
Level 1
Level 1
Posts: 23
Joined: Sun Aug 09, 2015 7:06 pm
Contact:

Re: Solid state drive optimization

Post by ralphy » Thu Sep 10, 2015 3:52 pm

noatime advantages and disadvantages has its arguments both ways so I will not get into it. I simply leave fstab configuration alone whenever possible. Those changes (with a small mistake) is probably what made the system un-bootable. There are other things you can do to optimize your SSD drive. I tend to go the easy way...

1- SSDs have long life expectancy nowadays so files and folders time stamps shouldn't be considered a detrimental factor. (Meaning I don't mess with fstab myself for SSD optimization - take it for what it is).
2- Linux Mint has (out of the box) a weekly cron to trim SSD drives. Not sure how you use the system but to run out of disk space before the next trim command is executed you really have to pass some GB worth of data through the drive on daily basis. The again, you can move the cronjob from weekly to daily execution if needed.
3- The very few things I do for my SSD installs (you do your own research on these but I consider them 'safe' and suitable for me).

Code: Select all

$ sudo apt-get install vim
Install preload

Code: Select all

$ sudo apt-get install preload
Make preload track more processes (uses more resources in the system but then again I don't like free RAM sitting idle doing nothing - cache and preload as much as possible into RAM)

Code: Select all

sudo vi /etc/preload.conf
#minsize = 2000000
minsize = 1000000

Code: Select all

sudo service preload restart

Scheduler: noop (you changed this already so you know how to do it)

Edit /etc/sysctl.conf

Code: Select all

sudo vi /etc/sysctl.conf
...
# add at the bottom of the file
vm.dirty_writeback_centisecs=6000
vm.swappiness=10
vm.vfs_cache_pressure=50

Code: Select all

sudo sysctl -p
or even better, reboot.

Note that applying these changes to your system will make it use more resources (specifically RAM). User case may vary so do your own research.

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 11, 2015 4:03 pm

Here you are Pjotr,
Pjotr wrote:Please generate an overview of your system like this:
- Launch a terminal window (this is how to launch a terminal window);
- make the terminal window full screen, to avoid chopped lines;
- copy/paste this command into the terminal:

Code: Select all

inxi -Fxz
(if you type: the letter F is a capital letter)

Press Enter.

Copy/paste the output in your next message.
=============================================================================================================

Code: Select all

siawacsh@siawacsh-sager ~ $ inxi -Fxz
System:    Host: siawacsh-sager Kernel: 3.16.0-38-generic x86_64 (64 bit, gcc: 4.8.2) 
           Desktop: Cinnamon 2.6.13  Distro: Linux Mint 17.2 Rafaela
Machine:   System: CLEVO product: D900F version: A0
           Mobo: CLEVO model: D900F version: 1.0 Bios: Phoenix version: 6.00 date: 05/20/2010
CPU:       Quad core Intel Core i7 CPU 920 (-HT-MCP-) cache: 8192 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 21332.8 
           Clock Speeds: 1: 1596.00 MHz 2: 1596.00 MHz 3: 1596.00 MHz 4: 1596.00 MHz 5: 1596.00 MHz 6: 1596.00 MHz 7: 1596.00 MHz 8: 1995.00 MHz
Graphics:  Card: NVIDIA G92M [GeForce GTX 280M] bus-ID: 03:00.0 
           X.Org: 1.15.1 drivers: nvidia (unloaded: fbdev,vesa,nouveau) Resolution: 1920x1200@61.7hz 
           GLX Renderer: GeForce GTX 280M/PCIe/SSE2 GLX Version: 3.3.0 NVIDIA 340.76 Direct Rendering: Yes
Audio:     Card-1: Intel 82801JI (ICH10 Family) HD Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0 
           Card-2: C-Media Audio Adapter (Planet UP-100 Genius G-Talk) driver: USB Audio usb-ID: 002-007 
           Card-3: Logitech driver: USB Audio usb-ID: 006-002 
           Sound: Advanced Linux Sound Architecture ver: k3.16.0-38-generic
Network:   Card-1: Intel Ultimate N WiFi Link 5300 driver: iwlwifi ver: in-tree: bus-ID: 07:00.0
           IF: wlan0 state: down mac: <filter>
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller 
           driver: r8169 ver: 2.3LK-NAPI port: 4000 bus-ID: 06:00.0
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 490.1GB (27.5% used) 1: id: /dev/sda model: WDC_WD2500BEVT size: 250.1GB 
           2: id: /dev/sdb model: KINGSTON_SHSS37A size: 240.1GB 
Partition: ID: / size: 197G used: 17G (9%) fs: ext4 ID: swap-1 size: 6.43GB used: 0.00GB (0%) fs: swap 
RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors:   System Temperatures: cpu: 49.8C mobo: N/A gpu: 0.0:58C 
           Fan Speeds (in rpm): cpu: N/A 
Info:      Processes: 237 Uptime: 4:24 Memory: 2196.7/5960.1MB Runlevel: 2 Gcc sys: 4.8.4 
           Client: Shell (bash 4.3.11) inxi: 1.9.17 
siawacsh@siawacsh-sager ~ $

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 11, 2015 4:12 pm

Hello Ralph, I specifically purchased the SSD for virtualization. I am using a good few widoz apps such as photoshop, illustrator and assortment of lesser known apps. I just do not want abandon Linux. I have six gigs of ram and split memory allocation between Virtualbox and native Mint. I really do not want to tax the memory any more than I have to.

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 11, 2015 4:24 pm

In the BIOS, is the SSD on top of the boot priority list *for HDD's*?
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 » Fri Sep 11, 2015 7:40 pm

Yes, the BIOS has the SSD as the first boot device.

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 » Sat Sep 12, 2015 3:55 pm

My mint 17.2 crashed again after only two days, with the exact same error message

Code: Select all

an error occurred while mounting /proc/bus/usb"

To be fair, I have two dead USB ports. But cannot see why Mint cannot work with the remaining two working ports. OR why dead ports would destabilize the whole system. I cleaned up my old disk drive and reinstalled Mint 17.2 on that. What I am going to do now is to work with 17.2 on my old disk drive for the next ten days or so. If the system remains stable for that duration, I know the SSD optimization was causing the problem. If this also crashes with the same message, then I know to look elsewhere.

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 » Sat Sep 12, 2015 4:02 pm

siawacsh wrote:To be fair, I have two dead USB ports.
That sounds bad.... Have you already done a visual inspection of your motherboard (if at all possible on your laptop)? Check for bulging elco's, like on the picture below (click on it to enlarge it):
Image

Elco's (condensators) should have a flat head, not a bulging head. Note that on the picture, of the five big elco's, only one is still intact.
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 Sep 12, 2015 4:54 pm

No I have not looked at the motherboard. If I am correct, you seem to be saying my motherboard is faulty. Fortunately, on this particular laptop (sager NP 9280) there is a separate USB board that slots into the motherboard. In fact, one USB board is on it's way to me right now. So I have to come back to my earlier conclusion.That is, if my current system working with the mechanical disk remains stable, my suspicions come back to the SSD optimization.

The pictures you posted are very intriguing. How do you think those capacitors bulge out like that? Is it heat?

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 » Sat Sep 12, 2015 4:58 pm

siawacsh wrote:there is a separate USB board that slots into the motherboard. In fact, one USB board is on it's way to me right now.
That's good.... I'm curious as to what effect that'll have on the current error.
The pictures you posted are very intriguing. How do you think those capacitors bulge out like that? Is it heat?
It's a picture of one of my own motherboards, now safely retired to the chemical waste dump..... The cause is chemical rot, unrelated to heat.
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.

Ron-N
Level 2
Level 2
Posts: 96
Joined: Fri Aug 28, 2015 1:52 am
Contact:

Re: Solid state drive optimization

Post by Ron-N » Sat Sep 12, 2015 7:01 pm

Forget the motherboard suggestion. Take a look at these links first before replacing expensive hardware for nothing:
https://ubuntugenius.wordpress.com/2010 ... -to-lucid/
http://ubuntuforums.org/showthread.php? ... ost9212523
http://www.linuxforums.org/forum/ubuntu ... -04-a.html

By the looks of these 3 posts, it seems to be an fstab issue and not a motheroard issue. Just a hint pjotr, search the internet first before jumping to baseless conclusions pushing other users towards the wrong direction.

Ah yes, here the link for google:
https://www.google.nl/search?q=an+error ... 2&ie=UTF-8


@ Siawacsh:
can you post the output of this terminal command:

Code: Select all

cat /etc/fstab
Since every solution points out to a wrong line in the fstab and not to hardware...
Hybrid laptop hardware specifications:
Intel Core i7-4710HQ*Kingston 16 GB RAM*Intel integr. GPU/NVidia GeForce GTX860M*Qualcomm Atheros Killer E2200/Intel Wireless 3160*128 GiB SSD/1 TB HDD*

Linux Mint 17.2 Xfce/kernel version: 3.19.0-28

ZakGordon
Level 4
Level 4
Posts: 356
Joined: Thu Feb 12, 2015 11:07 am

Re: Solid state drive optimization

Post by ZakGordon » Sun Sep 13, 2015 3:13 am

@ Ron-N,

steady on there chap! I am no Linux expert (but pretty good on the Windows platform) but odd BSOD's/blackscreens are often pretty hard to track down and Pjtor was just thinking out loud, siawacsh already had a new USB board on-route (i guess due to the faulty ones) before Pjtor gave his advice. I have no advice like your own good suggestions, but just found the tone of your last post a little over the top and hope we can all help find a solution for siawacsh. Hopefully it is as 'easy' as just a software issue, and not a more expensive hardware one.
Laptop overheating issues? Check links below:
TLP
itsfoss guide
If none of the above fixes the issue, moving from Cinnamon to XFCE will give around -5 to -10 degrees C improvements.

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 » Wed Sep 16, 2015 9:10 pm

Well, I am still using my disk drive with default settings and have experienced no problems. Especially none of that USB error. So my gut feeling is tending towards what Ron-N is suggesting as in FSTAB.

Ron-N, if I was to output the FSTAB settings it would be only for the current disk drive and NOT the solid state.

My disk drive is sda and the solid state is sdb and the root partition of sdb is on sdb1

Code: Select all


siawacsh@siawacsh-sager ~ $     cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=d07155fe-e6d8-4756-93d2-fe1db2ab3812 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda6 during installation
UUID=6b5e05c2-f17d-49ad-8eea-33961a1bb7d3 /home           ext4    defaults        0       2
# swap was on /dev/sda5 during installation
UUID=de9dd3d6-196c-4477-af08-3e2a3dea2b4a none            swap    sw              0       0
siawacsh@siawacsh-sager ~ $ 



I do remember pjotr instructions suggested placing "noatime" against my sdb1 as in

Code: Select all

UUID=d07155fe-e6d8-4756-93d2-fe1db2ab3812 /               ext4 noatime   errors=remount-ro 0       1
I now see Mint is suggesting each none swap partition must have noatime AND discard.

http://community.linuxmint.com/tutorial/view/1366

Code: Select all

/       ext4 defaults,noatime,discard 0    1


I recently read this article which suggests the best file system for solid state drives is xfs NOT ext4

https://www.linux.com/learn/tutorials/8 ... stallation

I know pjotr heart is in the right place. But at the same time it's been a lot of hassle reinstalling my OS. I also feel, beside disabling hibernation, there is a good chance the other steps presented on google site is probably unnecessary. But I am no expert.

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 17, 2015 12:07 pm

Here is the fstab output of my solid state drive

Code: Select all


siawacsh@siawacsh-sager /media/siawacsh/62e02e0d-184f-40a0-a0a4-b32f830eca8d/etc $ sudo cat fstab
[sudo] password for siawacsh: 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=62e02e0d-184f-40a0-a0a4-b32f830eca8d /               ext4    noatime errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=de9dd3d6-196c-4477-af08-3e2a3dea2b4a none            swap    sw              0       0
none /proc/bus/usb usbfs devgid=125,devmode=664 0 0
siawacsh@siawacsh-sager /media/siawacsh/62e02e0d-184f-40a0-a0a4-b32f830eca8d/etc $ 




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 20, 2015 10:40 am

I don't know why the header of this thread is showing [SOLVED] when it is NOT. I am still searching around for a definitive tutorial on how to optimize my SSD without loss of stability.

I have rebuilt my system with XFS
disabled hibernation.
and edited fstab thus

Code: Select all


# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=25c71371-e8d8-4650-b33b-d9823c21a876 /               xfs     defaults ,noatime,  discard 0    1        
# swap was on /dev/sda5 during installation
UUID=de9dd3d6-196c-4477-af08-3e2a3dea2b4a none            swap    sw              0       0

please let me know if you see something wrong. This is a fresh install so it will take a while to see if this works or not.

Post Reply

Return to “Newbie Questions”