LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-22-2015, 05:56 AM   #1
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 258

Rep: Reputation: 37
Solid State Drive (SSD) questions


This is about the modern SSDs, and all the addressing technology to manage "wear levelling", and whether any of it involves built-in software that might rely on an external (Windows?) driver.

There may be similar features in regular USB memory sticks. I have come across some with strange partitions, and I sometimes wonder if any volumes are hidden, even if all they do is manage avoiding intensive re-writes to the same locations.

There are already some good Linux hints to prolong the life of flash memory, such as using the "noatime"option in fstab to avoid unnecessary recording of the time of each write.

Some modern SSDs claim "guaranteed 10-year life".
The question is, can we use a SSD with Linux like any other drive? Erase all, re-partition, overwrite boot sector, whatever, without any presumed "driver assist" from the operating system?
 
Old 08-22-2015, 06:30 AM   #2
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
I think that just using discard would be ok with modern ssd to not to worry about their life. Life time of SSD is expected to be longer than HHD's one and also is more measureble.
In linux you just have to be careful about logs, some very verbose logging may affect very bad your SSD life
 
2 members found this post helpful.
Old 08-22-2015, 08:11 AM   #3
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Apart from noatime there shouldn't be anything else to worry about. SSDs are meant as drop-in replacements for spinning rust drives and any wear-levelling and the like are done on-device by firmware.
There seems to be some debate about whether to use the "discard" option in fstab as it apparently slows down some operations so some recommend scheduling fstrim or running it manually instead.
I've a couple of OCZ ZZDs in my desktop and OCZ even produce Linux software (32 and 64 bit) to update the firmware and check the health of the devices.
I have to admit I'm of the mind that one should just use things and, if they don't work, they're not fit for purpose. I'd not have bought SSDs if it meant messing around with file system parameters and the like to prevent early death. The only concession I have made is to mount /tmp and /var/tmp on tmpfs but that is more due to having far too much RAM than fear of wearing out the SSD.
 
1 members found this post helpful.
Old 08-22-2015, 08:18 AM   #4
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Don't bother with noatime -- relatime is the default and that is quite sufficient.

Modern production SSDs need no special treatment and may even outlast their spinning rust cousins.
http://techreport.com/review/27909/t...heyre-all-dead

You can add "discard" to the options in fstab (apart from for FAT filesystems) to allow TRIM but this may slow the disk down.

I prefer to use `fstrim` periodically (via a systemd-timer).

AFAIK, wear-levelling is a carried out by the drive and is independent of the operating system.

EDIT: Sorry 273, I've just repeated everything you said...

Last edited by Head_on_a_Stick; 08-22-2015 at 08:20 AM.
 
1 members found this post helpful.
Old 08-22-2015, 08:23 AM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I should also mention I use noatime on all disks just because I don't have anything that needs atime so it's a waste of time -- the fact it cuts down on SSD wear is just a happy side effect. Can't argue against relatime just not using it because I don't need it.
 
2 members found this post helpful.
Old 08-22-2015, 08:24 AM   #6
ugjka
Member
 
Registered: May 2015
Location: Latvia
Distribution: Arch, Centos
Posts: 368
Blog Entries: 5

Rep: Reputation: 264Reputation: 264Reputation: 264
How much does the discard option slow down the drive?
 
Old 08-22-2015, 08:34 AM   #7
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by ugjka View Post
How much does the discard option slow down the drive?
https://patrick-nagel.net/blog/archives/337
 
1 members found this post helpful.
Old 08-22-2015, 08:55 AM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

Some members in this thread may find this Slackware members forum thread useful; http://www.linuxquestions.org/questi...an-ssd-925789/
Be aware this thread is three years old and some data should be updated via manufactures information for a current 'SSD'.

Hope this helps.
Have fun & enjoy!

Last edited by onebuck; 08-22-2015 at 08:57 AM. Reason: typo
 
1 members found this post helpful.
Old 08-25-2015, 03:36 AM   #9
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 258

Original Poster
Rep: Reputation: 37
My thanks to all of you.

Clearly one can use the drives easily enough, but some of the speed advantages can be significantly impaired unless one configures a system to avoid them.

The most expansive explanations are in the link provided by Head_on_a_Stick, for which much thanks.
https://patrick-nagel.net/blog/archives/337.

The available hardware has a great variety of clever features to get around the write limitations of flash memory, including having special blocks having much more robust performance (beyond 100,000 writes), and internal strategies move data to new blocks. The technology is changing all the time, and it is hard to keep up with it. The stuff seems complicated simply because it really is (complicated)!

When one has 8GB or 16GB, or even, in the case of one PC I use, 32GB of RAM, the need to write to non-volatile storage sync is perhaps driven by need to ensure safety if power is lost, or the computer hangs when working RAMFS or TMPFS type operation. We all love RAM speed when the entire OS is loaded into RAMFS, and I suppose the the cherished ideal would be truly non-volatile RAM big enough to do all.
 
Old 08-25-2015, 02:11 PM   #10
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
The link regarding discard may, or may not, be out of date:
https://kparal.wordpress.com/2013/05...intel-525-ssd/
From the above it's not clear to me whether they understand sync and have taken it into account though.
 
Old 08-27-2015, 02:30 AM   #11
nomko
Member
 
Registered: Feb 2011
Location: The Netherlands
Distribution: Linux Mint 17.2
Posts: 115

Rep: Reputation: 21
@ GTrax:
here some usefull tips: https://sites.google.com/site/easyti...-states-drives
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PiDrive A Low Power Raspberry Pi mSATA Solid State Disk (SSD) onebuck Linux - Embedded & Single-board computer 1 07-22-2015 03:00 PM
SSD (Solid State Drive) support under Linux? jcllings Linux - Hardware 3 08-08-2011 07:51 PM
Best way to wipe solid state drive jrdioko Linux - Software 6 05-15-2011 05:20 PM
Best io-scheduler for Solid State Drive? brentleary Linux - Kernel 2 03-25-2009 01:33 AM
FTL and file system to be used for Solid State Device(SSD) AbhijitK Linux - Embedded & Single-board computer 1 01-17-2009 09:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration