FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-03-2012, 11:49 AM
Nick Lidakis
 
Default Current SSD setup recommendations for laptop with Debian

I've decided to replace the failing hard disk on my Debian Thinpad with an
SSD. As I use the laptop in a harsh mobile environment, I decided to get and
SSD. This one:
http://www.newegg.com/Product/Product.aspx?Item=N82E16820167122

Then, I decided to Google SSD in relation to formatting, partitions and
Debian/Linux. Seems there's a lot of old information; people saying some
techniques for SSD setup are plain wrong; arguments about enabling TRIM;
laptop setup vs SSD and HDD setup; etc., etc.

The Debian SSD wiki (http://wiki.debian.org/SSDoptimization) leaves out
"An important aspect in optimizing SSD performance is the file system and
partition layout. Ths wiki page does not cover these issues."

So, it's 2012 and I'm a heavy Firefox user on Thinkpad with 3gigs of RAM.
I'd like to install via a new install cd. What are the current
recommendations? Do I have to do an "alignment"? Does the Debian net install
have the tools necessary to do this or is SSD an option and things happen
automagically? Which file system is recommended for and SSD in a laptop.
fstab options? Anything else before I do my install?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120703114917.GA5803@phobos
 
Old 07-03-2012, 09:19 PM
GeraldC
 
Default Current SSD setup recommendations for laptop with Debian

On Tuesday, July 03, 2012 09:49:17 PM Nick Lidakis wrote:
> I've decided to replace the failing hard disk on my Debian Thinpad with an
> SSD. As I use the laptop in a harsh mobile environment, I decided to get
> and SSD. This one:
> http://www.newegg.com/Product/Product.aspx?Item=N82E16820167122
>
> Then, I decided to Google SSD in relation to formatting, partitions and
> Debian/Linux. Seems there's a lot of old information; people saying some
> techniques for SSD setup are plain wrong; arguments about enabling TRIM;
> laptop setup vs SSD and HDD setup; etc., etc.
>
> The Debian SSD wiki (http://wiki.debian.org/SSDoptimization) leaves out
> "An important aspect in optimizing SSD performance is the file system and
> partition layout. Ths wiki page does not cover these issues."
>
> So, it's 2012 and I'm a heavy Firefox user on Thinkpad with 3gigs of RAM.
> I'd like to install via a new install cd. What are the current
> recommendations? Do I have to do an "alignment"? Does the Debian net
> install have the tools necessary to do this or is SSD an option and things
> happen automagically? Which file system is recommended for and SSD in a
> laptop. fstab options? Anything else before I do my install?
Hi,
I am using the 'Corsair' 60GB SSD and it works fine with PCLinuxOS 32 or 64
bit.
This drive does has built in TRIM, but I understand the all modern SSD's all
have TRIM built in, and work very well.
Gerald


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201207040719.45655.gcsgcatling@bigpond.com">http://lists.debian.org/201207040719.45655.gcsgcatling@bigpond.com
 
Old 07-03-2012, 11:32 PM
Stan Hoeppner
 
Default Current SSD setup recommendations for laptop with Debian

On 7/3/2012 6:49 AM, Nick Lidakis wrote:
> I've decided to replace the failing hard disk on my Debian Thinpad with an
> SSD. As I use the laptop in a harsh mobile environment, I decided to get and
> SSD. This one:
> http://www.newegg.com/Product/Product.aspx?Item=N82E16820167122
>
> Then, I decided to Google SSD in relation to formatting, partitions and
> Debian/Linux. Seems there's a lot of old information; people saying some
> techniques for SSD setup are plain wrong; arguments about enabling TRIM;
> laptop setup vs SSD and HDD setup; etc., etc.
>
> The Debian SSD wiki (http://wiki.debian.org/SSDoptimization) leaves out
> "An important aspect in optimizing SSD performance is the file system and
> partition layout. Ths wiki page does not cover these issues."
>
> So, it's 2012 and I'm a heavy Firefox user on Thinkpad with 3gigs of RAM.
> I'd like to install via a new install cd. What are the current
> recommendations? Do I have to do an "alignment"? Does the Debian net install
> have the tools necessary to do this or is SSD an option and things happen
> automagically? Which file system is recommended for and SSD in a laptop.
> fstab options? Anything else before I do my install?

There are two kinds of desktop (vs server) users in the world:

1. Those who actually use their desk/lap/top for productive work
2. Those who attempt to tweak the machine to theoretical "perfection"

If you fall into camp #1 you'll simply use the SSD as you would any
rotating disk and you'll be happy. If you fall into camp #2, well,
you'll continue wasting massive amounts of time trying to figure out how
to "perfectly" setup your SSD.

In the end, for your desktop FireFox use case, you'll notice zero
performance or other difference after burning all the time in case #2.

I've been using a low end Corsair 40GB SSD in my XP desktop for about a
year. XP doesn't support TRIM. The difference between the SSD and the
previous Seagate 7.2K drive is what you'd expect, about 50 times faster
random access, 3 second vs 12 second boot time, double the streaming
read, and about 20% faster streaming write, apps launch instantly, cache
FF content allows pages to load nearly instantly, etc.

Thus my advice is to simply use it like you would a rotating disk,
format as usual, install as usual, and enjoy the added performance
without all the angst and second guessing yourself as to whether you did
it "perfectly".

--
Stan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FF3811D.10409@hardwarefreak.com">http://lists.debian.org/4FF3811D.10409@hardwarefreak.com
 
Old 07-04-2012, 03:22 AM
T o n g
 
Default Current SSD setup recommendations for laptop with Debian

On Tue, 03 Jul 2012 18:32:45 -0500, Stan Hoeppner wrote:

> If you fall into camp #2, well,
> you'll continue wasting massive amounts of time trying to figure out how
> to "perfectly" setup your SSD.

That's kind of harsh. IMHO, the OP was only trying to understand this
"entirely new beast" through reading, and found many outdated info and
get confused.

On the other hand, I found your replied info very helpful.

Thanks

--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/jt0csr$tvi$2@dough.gmane.org
 
Old 07-04-2012, 06:03 AM
Stan Hoeppner
 
Default Current SSD setup recommendations for laptop with Debian

On 7/3/2012 10:22 PM, T o n g wrote:
> On Tue, 03 Jul 2012 18:32:45 -0500, Stan Hoeppner wrote:
>
>> If you fall into camp #2, well,
>> you'll continue wasting massive amounts of time trying to figure out how
>> to "perfectly" setup your SSD.
>
> That's kind of harsh.

Look around. The world isn't coated with sugar.

> On the other hand, I found your replied info very helpful.

People often need to be presented with a healthy dose of realism--what
you call "harsh".

Once the OP asked about "alignment" I knew he needed a dose. This
refers to "erase block alignment". I'll not bother to explain it here
as many articles have been written on the subject. I will simply state
that attempting to achieve it is a massive waste of time, and only hard
core tweakers bother with it. The same goes for using TRIM.

Why is it a waste of time? Because manufacturers don't publish their
erase block size, for one, nor a whole host of other internal parameters
that dictate the functioning of the device. Add the fact that some
controllers (e.g. Indilinx vs SandForce) behave differently in the way
they stripe, or don't stripe, data across the individual flash chips in
the device.

To do "alignment" correctly one must know how many flash chips are in
the device and how the controller stripes writes, of what size, to each
chip. With an 8 chip SSD, one controller may have a shared bus for each
set of two chips, striping to 4 chips simultaneously. Another
controller may have 8 buses, striping all 8 simultaneously. A very fast
SSD may have 16 chips and 16 buses. No manufacturer makes this type of
data available to the customer. Thus you have to read reviews of your
SSD device at places like Anandtech, to do proper alignment.

Again, at the end of the day, the OP in this thread will notice ZERO
performance difference whether he wastes his time on things like erase
block alignment and TRIM, which is another can of worms. Real time TRIM
or batch TRIM? The XFS devs recommend batch TRIM with a cron job,
because real time TRIM kills performance, with the current Linux
implementation of real time TRIM support. So we've come full circle.

Camp #1 or camp #2?

My original "harsh" response got the point across with about 1000 less
characters. Replace harsh with "direct" or "no bullshit".

--
Stan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FF3DCB6.6000508@hardwarefreak.com">http://lists.debian.org/4FF3DCB6.6000508@hardwarefreak.com
 
Old 07-04-2012, 09:15 PM
Nick Lidakis
 
Default Current SSD setup recommendations for laptop with Debian

On Wed, Jul 04, 2012 at 01:03:34AM -0500, Stan Hoeppner wrote:
> People often need to be presented with a healthy dose of realism--what
> you call "harsh".
>

> Once the OP asked about "alignment" I knew he needed a dose...

I don't need a "dose", thank you. All my questions are valid and you did
a piss poor job of answering them. I did what was required before I posted to the
list: I Googled for 2 days; found a lot of conflicting information; found
information that might be outdated considering the changes in SSD flash and
controllers.

I'm not a tweaker; I need to get work done on my laptop. Also, I need the
drive to perform reliably for as long as possible. My data is important to me
and I try to use my computer hardware for as long as possible --not
subscribing to the idea of disposable consumerism that is prevalent today.

> Again, at the end of the day, the OP in this thread will notice ZERO
> performance difference whether he wastes his time on things like erase
> block alignment and TRIM, which is another can of worms. Real time TRIM
> or batch TRIM? The XFS devs recommend batch TRIM with a cron job,
> because real time TRIM kills performance, with the current Linux
> implementation of real time TRIM support. So we've come full circle.

>From what I Googled:

TRIM support is included in the latest kernels and
hdparm utility. Are you telling me that the kernel kernel devs included
useless code that I should not bother with?

"Alignment" was mentioned in several "Debian" websites including the SSD
wiki. It was valid for me to ask.



> Camp #1 or camp #2?
> My original "harsh" response got the point across with about 1000 less
> characters. Replace harsh with "direct" or "no bullshit".

Stan, you gave me rant because you assumed my computer case has lots of blue
LEDs. You can try again or just don't bother.

Nick


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120704211541.GA19850@phobos
 
Old 07-04-2012, 10:42 PM
green
 
Default Current SSD setup recommendations for laptop with Debian

Nick Lidakis wrote at 2012-07-04 16:15 -0500:
> I'm not a tweaker; I need to get work done on my laptop. Also, I need the
> drive to perform reliably for as long as possible. My data is important to me
> and I try to use my computer hardware for as long as possible --not
> subscribing to the idea of disposable consumerism that is prevalent today.

This is precisely why I have purchased a Crucial m4 and researched alignment,
TRIM, etc. I would like to see the particular build I am working on last for
10+ years, as previous systems have, as a production workstation.

With my limited understanding of wear-leveling, TRIM especially seems (to me)
to be important for long-term reliability (provide the controller with true
'free space' to work with). Anyone, feel free to enlighten me.

Unfortunately it is difficult to find current and concise information about
SSD, TRIM, and alignment. What I have learned follows.

Use a current kernel: either wheezy or squeeze-backports (≥2.6.33?). For
encryption, use at least cryptsetup v1.4. I do not have information about
LVM.

Use gdisk (GPT partition table) if possible; it automatically aligns (start
of) partitions at 1MB ("sector alignment" = 2048).

If you need encryption:
`cryptsetup luksFormat --align-payload=2048 /dev/sda1`

Create ext4 partition with:
`mkfs.ext4 -b -4096 -E stride=128,stripe_width=128 /dev/sda1`

If using encryption, add discard option to `/etc/crypttab`.

Add discard option to `/etc/fstab` *or* set up a fstrim cron job.

Test with `fstrim` in the util-linux package and/or see
<http://blog.alexanderkoch.net/2011/testing-trim-with-luks-on-lvm/>.

If you are doing a new squeeze install, you probably want to set up the
partitions and filesystems yourself before the install (or using the alt-f2
console, before the 'partition disks' step), then select 'keep existing data'
(use the empty filesystem). If you are doing encryption, perhaps create the
encrypted partition with the installer, then backup, re-format, and restore
the encrypted partitions using eg. grml.

Note that this setup has so far only been tested in a virtual machine and is
waiting for actual implementation.

Hope this helps.
 
Old 07-05-2012, 03:14 AM
Henrique de Moraes Holschuh
 
Default Current SSD setup recommendations for laptop with Debian

On Wed, 04 Jul 2012, Nick Lidakis wrote:
> > Once the OP asked about "alignment" I knew he needed a dose...
>
> I don't need a "dose", thank you. All my questions are valid and you did

Indeed, you don't need any dose of reality, and your questions are
valid. Any proper sysadmin knows of alignment, it is indeed important
and not just on SSDs.

Almost all of the relevant tools on Debian Wheezy (including the Wheezy
installer) automatically align partitions to 1MiB boundaries, which takes
care of almost every HDD and SSD block and erase-block alignment
requirements. USB "pendrives" are a different matter, and almost all of
those really want filesystems with heavy write access patterns that look
like the one for FAT filesystems.

LVM in Wheezy also knows to not botch AF (4KiB) alignment, but it might
not get erase-block alignment right should the erase-block be too large.
On good SSDs, it will not be too large and it will do the right thing
out of the box.

mdadm in Wheezy also does the right thing on most cases. When in doubt,
metadata format 1.0 preserves the host partition or device alignment, but it
has a severe drawback: on some RAID levels, component devices might looks
like a valid filesystem, so you risk the component device [as opposed to the
md raid device] getting mounted by mistake in some failure scenarios and
rescue-attempt scenarios.

> I'm not a tweaker; I need to get work done on my laptop. Also, I need the
> drive to perform reliably for as long as possible. My data is important to me
> and I try to use my computer hardware for as long as possible --not
> subscribing to the idea of disposable consumerism that is prevalent today.

The choice of SSD will be really important, then. Get one with a _lot_
of spare area for defect management and background defragmentation, and
with firmware known to be of high quality at cleaning after itself when
left idle. The type of flash memory will also matter a lot, the
simplest type of MLC will die much sooner than any alternatives (but it
will be a lot cheaper, enough that it might make more sense to replace
the drive sooner than to get one that will last longer).

> TRIM support is included in the latest kernels and
> hdparm utility. Are you telling me that the kernel kernel devs included
> useless code that I should not bother with?

You will have to test, to see if the combination of your storage stack
and a particular SSD does well at online TRIM. Batch TRIM sort of
"always works well enough". Online TRIM requires one to drain the
request queue even if the SSD does it fast, so on a drive with lots of
spare area (or unused area) it is likely to not be the best choice for
performance.

BTW: Some SSD controllers depend on being able to compress data to work
well. Do not get a drive based on those controllers if you are going to use
any OS-level encryption.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120705031451.GA31209@khazad-dum.debian.net">http://lists.debian.org/20120705031451.GA31209@khazad-dum.debian.net
 
Old 07-05-2012, 06:02 AM
Stan Hoeppner
 
Default Current SSD setup recommendations for laptop with Debian

On 7/4/2012 4:15 PM, Nick Lidakis wrote:

> Stan, you gave me rant because you assumed my computer case has lots of blue
> LEDs. You can try again or just don't bother.

I gave you all of the information you need. Do you feel you are missing
necessary information?

--
Stan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FF52E07.6080202@hardwarefreak.com">http://lists.debian.org/4FF52E07.6080202@hardwarefreak.com
 
Old 07-05-2012, 07:40 AM
Stan Hoeppner
 
Default Current SSD setup recommendations for laptop with Debian

On 7/4/2012 5:42 PM, green wrote:
> Nick Lidakis wrote at 2012-07-04 16:15 -0500:
>> I'm not a tweaker; I need to get work done on my laptop. Also, I need the
>> drive to perform reliably for as long as possible. My data is important to me
>> and I try to use my computer hardware for as long as possible --not
>> subscribing to the idea of disposable consumerism that is prevalent today.

Whether you subscribe to it or not, consumerism is thrust upon you, all
of us, and there's little/nothing we can do about it.

> This is precisely why I have purchased a Crucial m4 and researched alignment,
> TRIM, etc. I would like to see the particular build I am working on last for
> 10+ years, as previous systems have, as a production workstation.

You won't get anywhere near 10 years from that Crucial SSD. And it very
likely won't fail due to worn out cells. Odds are much greater that a
capacitor, resistor, or voltage regulator in the power supply section
will fail much sooner. These discreet components cost fractions of a
cent to a few tens of cents each. Flash chips cost a few dollars to
tens of dollars each. What do you guess the design lifetime of a $0.005
resistor or capacitor is? Far less than 10 years. And there are dozens
of them on an SSD PCB, in both the power section and on the bus lines to
each flash chip to correct signal skew.

Takeaway: one need be far more concerned with discrete component
longevity than flash cell life. How does one select a make/model of SSD
that *will* last 10 years? You can't. Recall 'consumerism' from above.
Electronics companies don't make SSDs to last this long. If they did
they'd go out of business from lack of sales.

> With my limited understanding of wear-leveling, TRIM especially seems (to me)
> to be important for long-term reliability (provide the controller with true
> 'free space' to work with). Anyone, feel free to enlighten me.

TRIM has a performance effect but does far less for minimizing write
amplification and maximizing cell life than firmware wear leveling does.
The additional performance gained from TRIM varies widely from one SSD
to another, and is dependent on the type of TRIM used (realtime vs
batch) and the write patterns of the applications and filesystem. For
the OP's laptop use scenario, it won't make a lick of difference.

> Use gdisk (GPT partition table) if possible; it automatically aligns (start
> of) partitions at 1MB ("sector alignment" = 2048).

Again, not critical for normal desktop applications, and it depends on
the erase block size of the SSD, which typically isn't available.

> Create ext4 partition with:

EXT4 is a filesystem, not a partition.

> `mkfs.ext4 -b -4096 -E stride=128,stripe_width=128 /dev/sda1`

And using stride and stripe_width is precisely the kind of useless
nonsense I previously described. Some SSDs may benefit from this,
others may suffer horribly, or will require different parms for
"optimal" performance. This is squarely in "tweaker" land.

> Add discard option to `/etc/fstab` *or* set up a fstrim cron job.

Best to do it via cron, if at all, as the the realtime option currently
has a greater latency than simply letting the filesystem/SSD do an
overwrite.

> Test with `fstrim` in the util-linux package and/or see
> <http://blog.alexanderkoch.net/2011/testing-trim-with-luks-on-lvm/>.
>
> If you are doing a new squeeze install, you probably want to set up the
> partitions and filesystems yourself before the install (or using the alt-f2
> console, before the 'partition disks' step), then select 'keep existing data'
> (use the empty filesystem). If you are doing encryption, perhaps create the
> encrypted partition with the installer, then backup, re-format, and restore
> the encrypted partitions using eg. grml.

Can you quantify the added performance Nick will see in day to day
desktop/laptop application use if he jumps through these hoops, vs doing
a standard install? I didn't think so.

But it all looks good on 'paper', don't it?

> Hope this helps.

Given Nick's use case, you've simply muddied the water. Nick came here
to, presumably, get a clear view, which I attempted to give him. Now
the tweakers have arrived to confuse him again...

--
Stan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FF54509.6030403@hardwarefreak.com">http://lists.debian.org/4FF54509.6030403@hardwarefreak.com
 

Thread Tools




All times are GMT. The time now is 11:21 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org