topic title: Setting up ssd
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#1
I bought myself a 120 GB Samsung 850 EVO SSD. I formatted it to ext4 and installed antiX-15-beta1 on it just to test it out. Grub to root.

Works great, very fast boot to jwm no rox desktop (10 secs).

Now, I'm wondering the best way to use this SSD.

Should I rsync/cp my existing work/antiX build partition to the SSD device? (It takes up c20GB)
Should I creat multiple partitions on the SSD eg for frugal installs?
Is ext4 the best format, or should I use btrfs? (On the work partition I already use btrfs)
Should I install grub to SSD MBR?
Should I use gpt partition table?

Thanks in advance for any advice.
Posts: 325
male
Joined: 04 Nov 2011
#2

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://news.siduction.org/2012/01/ssd-partitioning-partition-alignment-optimal-configuration-settings-and-performance-testing/"
linktext was:"http://news.siduction.org/2012/01/ssd-p ... e-testing/"
====================================


-ext4
-MBR
-grub2

much to read, anti.
Posts: 765
rust collector
Joined: 27 Dec 2011
#3
Imo, do what you want, just enable trim.
On ext4, you add discard to the line in fstab, I am not sure how it works on btrfs, it might do it by itself?

Leave a bit of space on it, so it can replace broken areas with fresh ones. (I believe samsung has it built in, and the ssd is really 128, with 8 set to be used for that. It is called overprovisioning, if I remember right)
Posts: 850
fatmac
Joined: 26 Jul 2012
#4
Align it to 64 as the start of partitioning, use discard &/or noatime, to keep down uneccessary writes to disk,enjoy your new 'speed'. __{{emoticon}}__
male
Posts: 325
male
Joined: 04 Nov 2011
#5
fatmac wrote:Align it to 64 as the start of partitioning...
What does that mean? __{{emoticon}}__
We are here with Linux!
Either I do not understand English at this piece of advice ...

The correct alignment for ssd starts with 1MiB!
gparted does this automatically.
rokytnji
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#6
I set up my 180gig as GPT. I use XFS file system. But Ext 4 will suffice. I am not as skilled as others.
No swap for me on mine. I can live without sleep or hibernate.

You are going to get addicted to the speed. Frugal installs will spoil you.
Play on and see what tickles your fancy is all I can say.

Edit: I wrote what I did a while back when I optimized My cheapo POS phison ssd drives
so they would not die the quick death.

Ha. Yeah, it is still in the wiki

limiting-writes-to-ssd-on-eeepc-t2389.html
Posts: 850
fatmac
Joined: 26 Jul 2012
#7
male wrote:
fatmac wrote:Align it to 64 as the start of partitioning...
What does that mean? __{{emoticon}}__
We are here with Linux!
Either I do not understand English at this piece of advice ...

The correct alignment for ssd starts with 1MiB!
gparted does this automatically.
Because of the way that writes are done, it was suggested that the first partition starts with the 64th segment. Can't remember where I read it, but if it isn't aligned it has to write to 2 different blocks, which is inefficient. So I just start partitioning on 64.

Edit: I also forgot to actually say that I do not have a swap partition on SSD
Posts: 325
male
Joined: 04 Nov 2011
#8
@fatmac,

this is wrong!
Here is an older article on the topic"alignment":

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://www.thomas-krenn.com/en/wiki/Partition_Alignment"
linktext was:"https://www.thomas-krenn.com/en/wiki/Pa ... _Alignment"
====================================
Posts: 850
fatmac
Joined: 26 Jul 2012
#9
I stand corrected. __{{emoticon}}__
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#10
anticapitalista wrote:Should I creat multiple partitions on the SSD eg for frugal installs?
You shouldn't need extra partitions even for multiple frugal installs.
Is ext4 the best format, or should I use btrfs? (On the work partition I already use btrfs)
They are both good. Btrfs has some very cool advanced features,
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.linux.com/learn/tutorials/767683-how-to-create-and-manage-btrfs-snapshots-and-rollbacks-on-linux-part-2"
linktext was:"such as"real" snapshots."
====================================
I'm very happy with ext4 because it just works even across power failures.
Should I install grub to SSD MBR?
Should I use gpt partition table?
I used gpt and used syslinux as the boot loader. I just left space at the end that I can easily partition when I need it. Not having to deal with logical and primary partitions makes life easier (at least in my head). The instructions for installing syslinux are slightly different. I usually use a separate boot partition which holds the kernel and initramfs for each system I boot into.
use discard &/or noatime, to keep down uneccessary writes to disk,enjoy your new 'speed'. __{{emoticon}}__
The default option is now"relatime" which provides more information than"noatime" with hardly any added expense. IMO you are almost always better off with the default setting of"relatime".

BTW: if you look at
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://techreport.com/review/27436/the-ssd-endurance-experiment-two-freaking-petabytes"
linktext was:"The SSD Endurance Experiment"
====================================
and similar test, you will see that most commercial grade SSDs have great write-longevity, usually much better than advertised.
Posts: 173
DeepDayze
Joined: 09 Sep 2011
#11
I'm looking to get the Evo myself for my Lenovo SL510 so I'm interested in how to best set up AntiX on this speedy device.
Posts: 609
dark-D
Joined: 02 Jun 2008
#12
male wrote:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://news.siduction.org/2012/01/ssd-partitioning-partition-alignment-optimal-configuration-settings-and-performance-testing/"
linktext was:"http://news.siduction.org/2012/01/ssd-p ... e-testing/"
====================================
this article is a follow-up:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://news.siduction.org/2014/10/revisting-an-article-on-how-to-set-up-solid-state-disks-with-linux/"
linktext was:"http://news.siduction.org/2014/10/revis ... ith-linux/"
====================================
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#13
Recent versions of gparted and parted both deal with partition alignment correctly and automatically. In addition, that article's suggestion to use"noatime" is outdated. The kernel default of"relatime" has almost the same performance benefit as noatime but it also gives you some access time information. It records the time of the *first* read after a write.

None of this should be surprising. The kernel provides a reasonable default that does not cripple performance while at the same time letting you know the first time a file has been accessed after writing. You are not going to significantly shorten the life of an ssd by using"relatime". The standard tools (parted and gparted) have caught up and are now doing the right thing alignment-wise by default.

OTOH, the suggestion to use a cron job to run trim is spot on. I run the following script every 12 hours:

Code: Select all

#!/bin/bash

LOG=/var/log/trim.log
echo"*** $(date -R) ***" >> $LOG
fstrim --all --verbose >> $LOG
I think the article's suggestion that you can cause premature failure in a ssd by too much testing is ridiculous unless your tests involve spending months on end doing nothing but writing to your ssd. They reference the same The SSD Endurance Experiment I linked to but maybe the significance of the results did not sink in.
Posts: 325
male
Joined: 04 Nov 2011
#14
dark-D wrote:this article is a follow-up:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://news.siduction.org/2014/10/revis"
linktext was:"http://news.siduction.org/2014/10/revis"
====================================
... ith-linux/
Yep, thank you! __{{emoticon}}__
Posts: 604
thriftee
Joined: 27 Feb 2009
#15
Because my system has Windows on it still, the Windows needs to be on the primary drive or it won't boot. So therefore, the SSD drive needed to be the secondary drive, and the system boots from the MBR off the primary drive into grub. The way its setup, I have backup duplicates of my linux partitions on the primary drive, and the active ones, and room for one test OS on the SSD. Swap takes up the rest of the SSD, and most test linux OS's go on the primary drive.

Booting to Slacko 5.7 is about 10 seconds, which is pretty good for an 8 yr old laptop. I haven't ever timed it booting to antiX from SSD.