On 12/16/2013 10:12 PM, Stephen Powell wrote:
> On Mon, 16 Dec 2013 08:13:16 -0600, Stan Hoeppner wrote:
>>
>> Cool.  Make sure you partition the SSD so that your first, and all,
>> partitions start on a 4KB boundary.  Many guides are available for your
>> favorite partitioning tool.  Linux does all IO in 4KB pages including
>> filesystem and swap.  If you don't align to 4KB you may get excessive
>> erase cycles on the SSD, lowering performance, and cell life.  Most
>> folks seem to start the first SSD partition at sector 2048, which falls
>> immediately after the first 1MB of the device.  1,048,576/4,096=256.  So
>> your first partition will start at 4KB "page 257", if you will.  If you
>> create multiple partitions, make sure the size of each is evenly
>> divisible by 4096 bytes, or they won't be aligned.
> 
> That's good to know.  But I really don't have much control over this
> when I partition using the Debian installer.
...

Then boot a suitable live CD/DVD first and partition the SSD manually
with parted.  E.g.

# parted
(parted) unit s
(parted) mkpart primary 2048 206847
(parted) set 1 boot on
(parted) mkpart primary linux-swap 206848 2303999
(parted) set 2 swap on
(parted) mkpart primary 2304000 212019199
(parted) quit

This should give you a 100 MB partition for /boot, a 1 GB partition for
swap, and a 100 GB partition for the root filesystem and everything
else.  All should be 1 MB aligned if I did my math and
"off-by-one-starting-from-zero" correctly.  With /boot and swap toggled
on, the installer should use these automatically.  You should only need
to tell it which filesystem to format with, and to stick the root
filesystem and everything else on the 100GB partition.

Using the above you will have some unallocated free space at the end of
the device.  This is GOOD to have with an SSD.  The controller will
automatically use these unallocated cells for garbage collection and
wear leveling.  This will further extend the life of all cells of the drive.

...
> As you can see, something, somewhere, has done a number on me.  The only
> boundary requirement is that the starting sector be a multiple of 8 to make
> 4096-byte boundaries.  So why start the first partition at sector number
> 2048?  
...

The issue isn't simply with 4KB sector alignment, but also the erase
block size of the SSD.  Some use 128KB, some 512KB, some 1MB.  But they
don't tend to publish this information.  By aligning to 1MB and making
all partitions divisible by 1MB, you guarantee you're aligned to the
erase block size.  I won't go into any more detail on this as it's been
thoroughly covered by others.  Google "erase block".

-- 
Stan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/52b00a19.7060...@hardwarefreak.com

Reply via email to