SSD Tweaks

5 posts
by bumblebizzle » Fri Jul 27, 2012 6:41 am
There were a couple of tweaks I'd use on my Asus EeePC to tweak the SSD speed and extend it's life. Will these same tweaks work on the Raspberry Pi?

fstab: "/ ext4 discard,noatime,nodirtime"

... there's no hard disk controller so should I use 'discard'

IO Scheduler: "cat /sys/block/sdX/queue/scheduler"

... couldn't find which scheduler is being used ... is it even necessary?

Thanks for any suggestions :)
User avatar
Posts: 4
Joined: Wed Jul 18, 2012 4:34 am
Location: Vancouver, BC
by AndrewS » Fri Jul 27, 2012 11:15 am
discard - no idea if it will help
noatime - sure :)
nodiratime - viewtopic.php?p=132419#p132419 says it's not needed

Regarding the scheduler - again I have no idea if it'll make any difference, but on the RPi you can see the current setting with
Code: Select all
cat /sys/block/mmcblk0/queue/scheduler

Much more info in this thread viewtopic.php?f=29&t=11767 (and the other threads it links to).
User avatar
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by vmp32k » Fri Jul 27, 2012 3:20 pm
A quick google'ing about discard yields:
with “discard” on, deleting a big bunch of small files is 64 times slower on my SSD. For those ~40 seconds any I/O is really slow

I would leave it off. Besides, I'm not sure if a SD-card qualifies as a full-blown SSD with Trim support. ;)
Posts: 14
Joined: Fri Jul 27, 2012 3:05 pm
by bumblebizzle » Fri Jul 27, 2012 5:41 pm
Cool! Thanks for the feedback. Leaving /etc/fstab in its original form. I just got my Pi yesterday and had a whole 30 minutes to play with it before running off to work. Tinkering/surfing/posting with the little beast now. 8-)

IO Scheduler:

cat /sys/block/mmcblk0/queue/scheduler = deadline ... changed it to noop via echo noop > /sys/block/mmcblk0/queue/scheduler ... will see how things go. :geek:
User avatar
Posts: 4
Joined: Wed Jul 18, 2012 4:34 am
Location: Vancouver, BC
by tomjerry » Fri Feb 28, 2014 7:05 am
Hibernate and suspend sometimes don’t work depends on the hardware you have for your system. Sometimes they make your system crash and unstable. Plus hibernation will put a lot of writes to your SSD which will shorten your SSD life.

To disable hibernation
Code: Select all
# nano /usr/share/polkit-1/actions/org.freedesktop.upower.policy

Look for
Code: Select all

Change from “yes” to “no”, there are two, one for hibernation, and another one for suspend. If you have to disable them both, make sure to replace them both from yes to no.
Code: Select all

There are more tweaks and optimize SSD from
Posts: 7
Joined: Sat Oct 05, 2013 7:33 pm