Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Samsung 840 250G alignment
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
atzorvas
n00b
n00b


Joined: 28 Jun 2013
Posts: 1
Location: Greece

PostPosted: Fri Jun 28, 2013 7:23 pm    Post subject: Samsung 840 250G alignment Reply with quote

So, i have bought a new Samsung 840 non-pro 250G, as reported here:

Quote:

Series 840 250 GB (non-pro):
NAND erase block size: 1536kb
NAND page size: 8kb
So 1536/8 = 192 pages per block.


so the following command as proposed to http://wiki.gentoo.org/wiki/SSD
Code:
fdisk -S 32 -H 32 /dev/sda
will mis-align the disk

could someone help me with the right values?
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2424
Location: Germany

PostPosted: Sat Jun 29, 2013 12:25 pm    Post subject: Reply with quote

Don't use `fdisk` unless you absolutely have to.

`parted` is a much better choice, if you tell it to `unit mib` you can't go wrong - it will give you MiB-aligned partitions which is fine for any HDD/SSD.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3601
Location: USA

PostPosted: Tue Jul 30, 2013 2:35 pm    Post subject: Reply with quote

Ok, this is actually kind of weird.

I've never seen NAND erase blocks of fractional MB, 1536 is 1.5MiB. This means that you have to go 3MiB to keep erase blocks aligned, but really, if you get page size alignment right, this isn't that great a deal. This isn't as bad as getting page alignment wrong, this will cause a lot of extra writes.

Getting erase blocks misaligned will also cause premature writes but it won't happen as often and on good disks, garbage collection will happen in the background anyway.

So if you want, make sure your MB boundaries are on 3MiB boundaries, but it's not that big a deal. Just don't align by sector (512B) - that will kill performance if you're off by 1. Off by 0.5 MiB or 1MiB, you won't notice.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum