LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-14-2016, 11:23 PM   #1
Jackpot
LQ Newbie
 
Registered: Jul 2016
Location: Bumblefuck
Distribution: Windows7 Ubuntu14 KaliRolling
Posts: 26

Rep: Reputation: Disabled
Preparing SSD for Linux installation


Whats up guys....I recently picked up an SSD for my new laptop and was wondering what to do when preparing it for new installation of linux? I know that I should limit the read/write as much as possible so was seeing if anyone has any experience with them and what should be done.

What I got so far is to update firmware, use EXT4, deff kill the swap, reduce time stamps, and move /tmp on the RAM? Also, is it better to install everything on a single partition or break it down a little?

Any help would be great
 
Old 11-15-2016, 12:19 AM   #2
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,828

Rep: Reputation: 256Reputation: 256Reputation: 256
You just do it like with a HDD. After you have the operating system installed you can update the firmware, but that is usually not necessary. Only update the firmware if you know why you are doing it.
 
Old 11-15-2016, 12:53 AM   #3
crazy-yiuf
Member
 
Registered: Nov 2015
Distribution: Debian Sid
Posts: 103

Rep: Reputation: 48
I've heard that SSDs are degrading a lot slower than they predicted, as far as I know most people don't worry too much about limiting the writes. My current one has lasted four years just fine with pretty heavy use.

If you want to squeeze out every last write, though, here are some tips:

- I'd guess the most important thing for the average user is to disable browser caching. For Chromium I think the way to do this is to launch it with the --disk-cache-dir=null option.
- It also couldn't hurt to add noatime to the drive's fstab entry.
- As for swap, I never need it, but you might if you're doing a lot of fancy video games or movie editing or something. A better option than totally nixing it might be to adjust your swapiness, so it uses it as infrequently as possible. I'm not sure if all distros do swappiness the same way, so you should google it for yours.
- Assuming systemd, check your /etc/systemd/journald.conf file and set Storage=volatile, or none.
- Your filesystem keeps tracks of its lifetime writes. You can check with, for example:
dumpe2fs /dev/sda4 | grep "write"
Mine shows over a terabyte for the currently installed OSes, and there have been three or four others that I've clobbered.

I'm not sure how much use /tmp actually sees for the average user, I'd guess not all that much. Upgrading frequently increases the writes a lot though, I'd limit it to monthly upgrades.

How many partitions you use shouldn't directly effect anything. I only use about 8 gigs per Linux, and I like to have three or four Linuxes, so my 120 gig hard drive has four partitions with OSes, twenty gigs each, and a 40 gig data partition that they all mount, for music and such. Having multiple partitions per OS tends to be more trouble that it's worth, for me anyways.

Edit: Note some interesting math here: 1 tb / 120 gb = 8.33 writes per byte. SSDs distribute writes evenly across the drive. If I remember correctly, they last for 100,000 writes or more. So unless you're running a server or something, you should be fine.

Last edited by crazy-yiuf; 11-15-2016 at 12:58 AM.
 
Old 11-15-2016, 08:49 AM   #4
BW-userx
Senior Member
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Void Linux / Slackware 14.2
Posts: 2,054

Rep: Reputation: Disabled
you can also set up your system within fstab or by a cron job to trim or do something called "discard" with your sdd to keep it 'fresh.'

which is up to you to do either or not at all. It seems everyone has their own take on which is better, trim or discard.

I use trim via cron

Code:
userx@voided1.what~>> ls /etc/cron.weekly
trim

userx@voided1.what~>> cat /etc/cron.weekly/trim
#!/bin/sh
LOG=/var/log/trim.log
echo "*** $(date -R) (root)***" >> $LOG
fstrim -v / >> $LOG
echo "*** $(date -R)-(data) ***" >> $LOG
fstrim -v /media/data >> $LOG
Log looks like this
Code:
userx@voided1.what~>> cat /var/log/trim.log
*** Thu, 03 Nov 2016 07:05:01 -0500 (root)***
/: 22 GiB (23576133632 bytes) trimmed
*** Thu, 03 Nov 2016 07:05:02 -0500-(data) ***
/media/data: 179.4 GiB (192636121088 bytes) trimmed
*** Thu, 10 Nov 2016 06:13:01 -0600 (root)***
/: 19.2 GiB (20584620032 bytes) trimmed
*** Thu, 10 Nov 2016 06:13:02 -0600-(data) ***
/media/data: 170.2 GiB (182745985024 bytes) trimmed
as far as breaking it down.
I separate root / and /home period, for the purpose of ease to re-install the system without worry of loss of user data.

as far as swap I just added a swap file on my sdd, and keep it there that I turn on only when needed.

it is a faster swap being sdd only started up if and when needed, which is not very often.

the rest I keep the entire OS on /
/home is on a hybrid 750GB HDD 7200rpm

Last edited by BW-userx; 11-15-2016 at 09:00 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to use a SSD for installation of 2 Linuxes ? droid.c3p0 Linux - Newbie 4 09-10-2016 12:35 PM
Install Linux in Toshiba u940 series with 32gb ssd and 750gb hdd I would like to have boot code in ssd only cvkchary Linux - Laptop and Netbook 4 08-31-2016 05:26 PM
Preparing for Glibc installation yougene Slackware 14 12-02-2005 04:54 PM
RPM Installation - Preparing, then exit CeleronXL Linux - Software 2 10-06-2003 08:35 PM


All times are GMT -5. The time now is 06:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration