SSD tweaks needed on Linux Mint 17?

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jsplicer

SSD tweaks needed on Linux Mint 17?

Post by jsplicer »

I upgraded my system from 16 to 17. My original 16 install had my / on my SSD drive meaning my OS only, I had /Home and /Swap on a HDD drive. The install went fine all my home files and more importantly all my settings are still there, LM17 is running fine.

My question is I can't remember if I have to still make any changes as to Trim or any of the other settings made in the past for SSD drives to the new install? Do I have to edit my /etc/fstab file or has there been changes in 17 where that is no longer nessesaary to get optimal performance from an SSD drive.

I'm trying to be as independently as possible so as not to bother the board with questions, but for the life of me I can NOT remember what to do with the SSD drive as far as optimising performance. LM16 worked so well that it has been a long time since I had to do anything with the SSD drive, 17 is working fine as well great job by all who worked on it.

Thanks for any sugestions.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: SSD tweaks needed on Linux Mint 17?

Post by xenopeek »

I think you'll have to redo those tweaks. To enable trim edit /etc/fstab and add "discard" to the mount options for partitions on your SSD. By default now partitions are mounted with relatime option, so you don't need to add that option. If you have full disk encryption there are a few extra steps to enable trim. You'll need to add allow-discards to the cryptdevice option in /etc/default/grub.

I don't know if /tmp is mounted as tmpfs (in memory) on Linux Mint 17 install, so check output of the `mount` command and see if /tmp is mentioned there as a tmpfs. Else add a line for that to /etc/fstab.

You'll also want to use deadline scheduler for your SSD, while you likely want to continue to use the cfq scheduler for your HDD. You can achieve that by adding these lines to /etc/udev/rules.d/60-schedulers.rules:

Code: Select all

ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="cfq"
Reboot to activate all/any above changes. Run `sudo update-grub` if you change /etc/default/grub.

Review tips also on https://wiki.archlinux.org/index.php/SS ... erformance.
Image
Mute Ant

Re: SSD tweaks needed on Linux Mint 17?

Post by Mute Ant »

''so as not to bother the board with questions'' Why not? If your question stops fifty other people thrashing around.
o Accept that you will never know whether SSD tweaks did anything useful, and neither does anyone else.
o SSD firmware is closed source and possibly :roll: includes bugs; the kill-all-your-data kind of bug.
o Writing and reading data is what an SSD is designed for.
So I confine my preservation tactics to internal housekeeping...
o swap in zram or no swap at all
o noatime mount option for SSD partitions
o move unwanted files to /var/tmp or the Trash instead of deleting them
o Do a spring clean when I get disk-space warnings--delete all the Trash and write a giant 'filler' file to zero the unused blocks. It's easy and uncontroversial, and probably useless on encrypted partitions, but I never use those...

Code: Select all

cd ; cat /dev/zero >> filler ; > filler
o Accept that I will never know whether this did anything useful.
jsplicer

Re: SSD tweaks needed on Linux Mint 17?

Post by jsplicer »

This is what I got from the mount comand: mount

Code: Select all

/dev/sdb1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda1 on /home type ext4 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
So judging from this readout do I need to add to the fstab file?

Also there is no file in /etc/udev/rules.d/60-schedulers.rules should I create one?
jsplicer

Re: SSD tweaks needed on Linux Mint 17?

Post by jsplicer »

Heres my new 'mount' output after adding discard:

Code: Select all

/dev/sdb1 on / type ext4 (rw,discard,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda1 on /home type ext4 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
sdb is my SDD drive

I also created using sudo gedit a file under the directory of /etc/udev/rules.d called 60-schedulers-rules and copy and pasted your code, rebooted and all is working. I am guessing that I may or may not have to add something for tmpfs but I'll wait for your response to let me know if I need to or not.

Thanks again for all your help xenopeek
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: SSD tweaks needed on Linux Mint 17?

Post by xenopeek »

Looks good, but yeah you'll have to add the entry for tmpfs if you want that.

Add this line to your /etc/fstab:

Code: Select all

none /tmp tmpfs nodev,nosuid,mode=1777 0 0
Then remove the files currently on /tmp (else they will permanently suck up disk space):

Code: Select all

sudo rm -rf /tmp/*
Finally, you can activate it with this:

Code: Select all

sudo mount -a
mount command output to check all is now fine, can be a bit unreadable. Run it like this for better readability:

Code: Select all

mount | column -t
Image
jsplicer

Re: SSD tweaks needed on Linux Mint 17?

Post by jsplicer »

xenopeek, I hate to be a pain but will I have to move a tmpfs directory to my HDD drive or is one not nessesary at all for the OS to operate?

In other words in my fstab file it has sdb1 ext4 discard,errors=remount -ro 0 1 Am I correct to assume that I would need to add a line under that of your code for no tmpfs?

Because the next drive listed in fstab is my HDD drive with
/home and /swap; /home has: /dev/sda1 ext4 defaults 0 2
swap has: /dev/sda3 none swap sw 0 0

Should I be adding tmpfs under one of these partitions or is it not needed at all?
PatH57

Re: SSD tweaks needed on Linux Mint 17?

Post by PatH57 »

Hi,

It's not well-documented, but have a look at this, the contents of your /etc/cron.weekly/fstrim: (ubuntu14.04 and Mint17)

#!/bin/sh
# call fstrim-all to trim all mounted file systems which support it
set -e

# This only runs on Intel and Samsung SSDs by default, as some SSDs with faulty
# firmware may encounter data loss problems when running fstrim under high I/O
# load (e. g. https://launchpad.net/bugs/1259829). You can append the
# --no-model-check option here to disable the vendor check and run fstrim on
# all SSD drives.
exec fstrim-all

If you have a Samsung or Intel brand SSD, it's already there, and runs on a schedule, otherwise (and if you're sure your drive is capable), you have to add the --no-model-check flag to this.
jsplicer

Re: SSD tweaks needed on Linux Mint 17?

Post by jsplicer »

Thank you Pat for that info. Yes I have the Samsung 120 GiB drive, so I don't have to do anything? If thats the case than I can put my fstab file back to its original form without the discard option, right?
tommyb.

Re: SSD tweaks needed on Linux Mint 17?

Post by tommyb. »

I just installed LM17 Mate 32bit on an older SSD. fstrim doesnt work, i guess it doesnt. Can you explain steps necessary (commands) to keep this SSD at optimum condition please? It s also encrypted (LUKS).

Thsnk you!

Model: STT_FPM16GRSE (0905085)
Last edited by tommyb. on Mon Jul 28, 2014 2:42 pm, edited 1 time in total.
PatH57

Re: SSD tweaks needed on Linux Mint 17?

Post by PatH57 »

send the make and model of the drive and we will see what can be done.
tommyb.

Re: SSD tweaks needed on Linux Mint 17?

Post by tommyb. »

Model STT_FPM16GRSE (0905085)

I did follow the tweaks from the "SSD Howto" here (xenopeek), but since it doesnt seem to support trim and it is encrypted i doubt that what i could do, really will help :)
Last edited by tommyb. on Mon Jul 28, 2014 5:11 pm, edited 1 time in total.
PatH57

Re: SSD tweaks needed on Linux Mint 17?

Post by PatH57 »

that's amini pci SATA (notebook thing)
don't touch it :wink:
tommyb.

Re: SSD tweaks needed on Linux Mint 17?

Post by tommyb. »

Yes, mini pcie ssd. Dont touch it? I did install it hehehhe and the tweaks are done as see above. Noticed no diifferenc in speed. Processor is also slow :(
PatH57

Re: SSD tweaks needed on Linux Mint 17?

Post by PatH57 »

not even asking what the PC is? ok tell us :mrgreen:
tommyb.

Re: SSD tweaks needed on Linux Mint 17?

Post by tommyb. »

??? Asus eeepc 900a
PatH57

Re: SSD tweaks needed on Linux Mint 17?

Post by PatH57 »

with winXP :lol: May 2008
Ask Asus if they recommend win8 for it? Just joking :lol:
rbmorse

Re: SSD tweaks needed on Linux Mint 17?

Post by rbmorse »

tommyb. wrote:Yes, mini pcie ssd. Dont touch it? I did install it hehehhe and the tweaks are done as see above. Noticed no diifferenc in speed. Processor is also slow :(
Probably one of those things designed to support Intel's "Smart Response Technology" or something like that, where a small SSD works as cache for a larger conventional storage device. Never worked very well in real life IMO, and frankly, l'm not sure Linux ever supported it. If your system can see it as discrete storage you win, but I'm not surprised the tweaks didn't do anything.
tommyb.

Re: SSD tweaks needed on Linux Mint 17?

Post by tommyb. »

Sorry, y' all wrong. This thing came with Xandros Linux version Asus on an 8gb ssd. Worked very well, except no more updates from Asus atter a while. I installed an 16gb ssd for more space and speed. Yes, XP can run too, but i loved Ubuntu s 10.10 on it (no more updates). Hardware is fantastic for hacking, BT3 worked beautifully to enter WLANs and other things. (and still does) LOL

Unfortunately Linux Mint has become heavier and heavier too, yes there is XCFE (i dont like), Lubuntu (bug ridden) and other no gui OSs ...but im a mouse pusher, so i know where to click, but have a hard time remembering the commands when not used for a while :oops:
PatH57

Re: SSD tweaks needed on Linux Mint 17?

Post by PatH57 »

stay with kali (new BT) works great for me and light enough except updating the exploit database (500MB)
Locked

Return to “Beginner Questions”