LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   issues to consider before putting Linux on an SSD laptop (https://www.linuxquestions.org/questions/linux-hardware-18/issues-to-consider-before-putting-linux-on-an-ssd-laptop-4175440909/)

centguy 12-10-2012 10:53 PM

issues to consider before putting Linux on an SSD laptop
 
I found slimmer laptops with pure SSD are getting more and more popular these days.

I have just learned to put a LiveCD OS on a thumbdrive using UNetbootin so that I can
handle a laptop without a DVD reader. I was quite excited that I can boot up an old
computer from
a thumbdrive yesterday!

Since this is rather new to me, I am curious what I should learn to make sure that
SSD does not wear out quickly since there is a limited memory write number of 100k to 1M.

Thanks!

TobiSGD 12-10-2012 11:14 PM

On modern SSDs the wearout isn't really a factor anymore. The SSD in my laptop reports (in there for around 2 years, powered on for 7290 hours now) reports that I have written 79084 32MB-blocks to it (about 2471 GB) to it and that it still has 98% of its lifetime remaining.

centguy 12-10-2012 11:55 PM

Thanks. I was reading the reports on the internet that worry me.

So now I shall be more concerned with which laptop to buy as well as if the graphic driver is supported ? My experience is that graphic driver
support is the number one problem for me for new laptops. I am not into very cutting edge distributions too. That's the reason
I am going to try out my LiveCD on the thumbdrive before I commit to a new laptop.

BTW, can you show me how to get those numbers you quoted in your post ? Thanks.

centguy 12-11-2012 01:07 AM

If I understand it correctly, I am not supposed to create a swap partition under SSD since that will easily wear out the SSD without TRIM support ?

TobiSGD 12-11-2012 07:00 AM

Quote:

Originally Posted by centguy (Post 4846712)
Thanks. I was reading the reports on the internet that worry me.

And for older SSDs those reports are true indeed. On modern generations this simply isn't an issue anymore.

Quote:

So now I shall be more concerned with which laptop to buy as well as if the graphic driver is supported ? My experience is that graphic driver
support is the number one problem for me for new laptops.
Exactly, that is, sadly, nowadays the number one concern when buying a new laptop. If you are not into gaming I would try to get a system with Intel video chip without additional chips from AMD/Nvidia. Keep in mind that this advice is valid for laptops, but not for netbooks with Atom CPU.

Quote:

I am not into very cutting edge distributions too. That's the reason
I am going to try out my LiveCD on the thumbdrive before I commit to a new laptop.
Very reasonable, you should of course test the hardware with the distro you want to use in the version you want to use.

Quote:

BTW, can you show me how to get those numbers you quoted in your post ?
Of course. Most distros come with a handy little tool that can readout the SMART (Self-Monitoring, Analysis, and Reporting Technology) data from harddisks, smartctl. If you run as root the command
Code:

smartctl -a /dev/sda
it will print out the available data for the first disk in the system.

Quote:

If I understand it correctly, I am not supposed to create a swap partition under SSD since that will easily wear out the SSD without TRIM support ?
All modern SSDs support TRIM and the kernel does support TRIM on swap file-systems since version 2.6.32 I think, so running swap on a SSD is not a problem. I do it that way on my laptop (which has only one drive anyways, so where else should I put it?) and this significantly speeds up the wake-up from hibernation on that machine.

centguy 12-11-2012 07:52 AM

TobiSGD: Thanks again!!

For me or others like me who are new to SSD stuff, can I confirm my understanding as follows ?

Let consider two "popular" methods of a Linux installation on a SSD:

Installation A: put Linux in the internal SSD via the route of "Live USB persistence mode" where this method involves storing ISO for LiveCD-type booting but
store all other persistent changes in another partition.

Installation B: put Linux using the conventional Linux installation (DVD installation and choose SSD as the installation target),
but enable TRIM with ext4 to prolong the lifetime of SSD (... may be redundant too with modern SSDs ?).

Now can I rule out Installation A as it is just too difficult (at least two partitions are needed), ancient, and seems unnecessary with modern SSDs ?

Is the conventional method of Installation B suitable for a Linux Distribution, say CentOS 6.3 with linux kernel 2.6.32 (sorry I have asked a very distro-specific question,
but then I do not intend to shop around for other distros and CentOS works great for me so far)?


If I am clear on this I will get one of those shiny laptops !

Thanks again!

TobiSGD 12-11-2012 12:46 PM

Quote:

Originally Posted by centguy (Post 4846973)
Installation A: put Linux in the internal SSD via the route of "Live USB persistence mode" where this method involves storing ISO for LiveCD-type booting but
store all other persistent changes in another partition.

While this is possible i wouldn't really consider that as an option. Would be much easier to go for installation B and use a data-partition on a separate disk to store things that do not benefit from the speed of the SSD, like video and audio files or your holiday pictures.


Quote:

Installation B: put Linux using the conventional Linux installation (DVD installation and choose SSD as the installation target),
but enable TRIM with ext4 to prolong the lifetime of SSD (... may be redundant too with modern SSDs ?).
That is the way to go. For clarification, the main purpose for TRIM is to keep the speed of the SSD constant which telling the disk which sectors aren't used anymore. Of course this will also help the anti-wearout algorithm, but that is more a side-effect. Modern SSDs have an automatic garbage collection algorithm, but I don't know if it is capable to do its job with ext4 filesystems. I prefer not activate TRIM on my SSDs and do that manually from time to time (with the fstrim command), but I think this is a matter of taste.

Quote:

Is the conventional method of Installation B suitable for a Linux Distribution, say CentOS 6.3 with linux kernel 2.6.32 (sorry I have asked a very distro-specific question,
but then I do not intend to shop around for other distros and CentOS works great for me so far)?
CentOS 6.3 may lack drivers for newer laptops, especially in the video-part, but also for network devices. So a manual installation of drivers (if possible) may be necessary.

wpeckham 12-11-2012 12:48 PM

Confusion
 
Option A is not really complicated, and does not require multiple partitions. I have dropped multiple LIVE-CD/LIVE-USB PERSISTANT instances of TinyCore, MicroCore, and DSL onto a partition that already held either another Linux install, FreeDOS, or ReactOS and had them all work just fine. (Had to tune up grub though. That took a few minutes.) The extra data I wanted to persist between sessions was saved to a different location on the same partition. If dealing with partitions is complex for you, then this is actually one way to run multiple distributions without bothering about that.



Option B is nice, but you do want to check the file systems as they mount (or as they are defined) to suppress atime (cuts down on extra writes) and use delayed allocation. There are other EXT4 options that pertain. The point being to reduce the kinds of activity that impact performance and encourage the OS to use extra writes to storage. You want both extended life and to maintain speed on those SSD devices.


Bottom line, if you have newer hardware it should be designed to handle normal load for a normal lifespan. You need to take extra steps and care if you want more performance and more life from the same hardware, or similar behavior from older hardware. (Being of Celtic decent, I want everything to last longer than I will! As it should!)

jefro 12-11-2012 03:25 PM

Well, no on can assure you that some device will work as projected over time. If you are concerned then get more ram to avoid swap. Use a conventional hard drive for swap or even a flash drive for swap.

In real world, I assume the ssd will be outdated by the time it fails. I have some expensive usb flash drives that are basically useless since they are now so small. I also have a lot of dead flash drives that should have lasted longer. I would just install a modern distro to the ssd just as if it were a hard drive myself. I'd expect it to break at some point or be outdated near that same time. Right now I have to cash to replace it on a whim but not everyone can. If you get lucky it will be around for a much longer time.

centguy 12-11-2012 08:04 PM

Okay. Points taken. Thanks.

I don't mind doing fstrim from time to time.


Now, as a hands-on person, I did a test on an existing system:

Quote:

[root@centos61-hp ~]# fstrim /media/EXT3-DATAD1
fstrim: /media/EXT3-DATAD1: FITRIM ioctl failed: Inappropriate ioctl for device
What is causing it ? Is it because /media/EXT3-DATAD1 is formatted as ext3?

TobiSGD 12-11-2012 08:42 PM

ext3 does not support TRIM, simply as that. TRIM also only works on devices that support the ATA TRIM command, normal harddisks don't.

centguy 12-11-2012 11:36 PM

Thanks. I marked this thread as solved for posterity.

jefro 12-12-2012 10:17 PM

Thanks for the update.


All times are GMT -5. The time now is 10:48 AM.