* [gentoo-user] SSD performance tweaking @ 2012-08-22 21:46 Mark Knecht 2012-08-22 22:58 ` Paul Hartman ` (2 more replies) 0 siblings, 3 replies; 28+ messages in thread From: Mark Knecht @ 2012-08-22 21:46 UTC (permalink / raw To: Gentoo User Hi, Yesterday I got a new, but rather low-end, PCIe-2 SATA-3 6Gb/S adapter card and a reportedly high performance 128GB SSD drive. (Links below) Other than my swap getting messed up because it didn't use labels (who knew about swaplabel but didn't tell me? ;-) ) the adapter and drive are in the machine and working fine. Unfortunately the performance isn't what I might have hoped for. Both hdparm & bonnie++ are reporting numbers in the 200MB/S range rather then the 400-500MB/S range that I might have hoped for. The machine is PCIx-2 based according to its specs. I'm currently just using a single large partition & ext3. I didn't do anything special in fdisk so the partition might not be aligned as best it could be. I don't know. I'm wondering what sort of experience folks have had trying to get performance numbers anywhere close to these specs? Thanks, Mark http://www.amazon.com/gp/product/B002VEWBGO/ref=oh_details_o01_s00_i00 http://www.amazon.com/gp/product/B007R1FH3K/ref=oh_details_o01_s00_i02 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-22 21:46 [gentoo-user] SSD performance tweaking Mark Knecht @ 2012-08-22 22:58 ` Paul Hartman 2012-08-22 23:24 ` Dale 2012-08-23 15:55 ` Mark Knecht 2012-08-23 8:14 ` Volker Armin Hemmann 2012-08-23 10:15 ` Alex Schuster 2 siblings, 2 replies; 28+ messages in thread From: Paul Hartman @ 2012-08-22 22:58 UTC (permalink / raw To: gentoo-user On Wed, Aug 22, 2012 at 4:46 PM, Mark Knecht <markknecht@gmail.com> wrote: > Hi, > Yesterday I got a new, but rather low-end, PCIe-2 SATA-3 6Gb/S > adapter card and a reportedly high performance 128GB SSD drive. (Links > below) Other than my swap getting messed up because it didn't use > labels (who knew about swaplabel but didn't tell me? ;-) ) the "mkswap -L name /dev/sdX" :) > adapter and drive are in the machine and working fine. Unfortunately > the performance isn't what I might have hoped for. Both hdparm & > bonnie++ are reporting numbers in the 200MB/S range rather then the > 400-500MB/S range that I might have hoped for. The machine is PCIx-2 > based according to its specs. > > I'm currently just using a single large partition & ext3. I didn't > do anything special in fdisk so the partition might not be aligned as > best it could be. I don't know. > > I'm wondering what sort of experience folks have had trying to get > performance numbers anywhere close to these specs? Because it is a PCIe x1 slot card, that is the bottleneck. Based on all I have read, your speeds are normal and you should consider it to be the fastest speeds you'll see. If you had bought two SSDs and used them in a RAID configuration, the speed would actually get worse. I ran into the same thing a while back, my motherboard actually has SATA3 on-board, but it is not the primary controller (that one is SATA2) and it's basically a permanently-installed PCIe controller as far as speeds are concerned. Because of added latency, the on-board primary SATA2 is actually faster than the SATA3 when multiple drives are attached... but it's still faster than a HDD anyway. I think the only way we'lll see 500MB/sec on that SSD is to buy a motherboard which has a SATA3 controller as its primary on-board drive controller and plug it in to that. Look on the bright side, someday when we upgrade our motherboards, it'll be like we got a free SSD upgrade for our troubles. :) ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-22 22:58 ` Paul Hartman @ 2012-08-22 23:24 ` Dale 2012-08-23 4:05 ` Mark Knecht 2012-08-23 15:55 ` Mark Knecht 1 sibling, 1 reply; 28+ messages in thread From: Dale @ 2012-08-22 23:24 UTC (permalink / raw To: gentoo-user Paul Hartman wrote: > On Wed, Aug 22, 2012 at 4:46 PM, Mark Knecht <markknecht@gmail.com> wrote: >> Hi, >> Yesterday I got a new, but rather low-end, PCIe-2 SATA-3 6Gb/S >> adapter card and a reportedly high performance 128GB SSD drive. (Links >> below) Other than my swap getting messed up because it didn't use >> labels (who knew about swaplabel but didn't tell me? ;-) ) the > "mkswap -L name /dev/sdX" :) > >> adapter and drive are in the machine and working fine. Unfortunately >> the performance isn't what I might have hoped for. Both hdparm & >> bonnie++ are reporting numbers in the 200MB/S range rather then the >> 400-500MB/S range that I might have hoped for. The machine is PCIx-2 >> based according to its specs. >> >> I'm currently just using a single large partition & ext3. I didn't >> do anything special in fdisk so the partition might not be aligned as >> best it could be. I don't know. >> >> I'm wondering what sort of experience folks have had trying to get >> performance numbers anywhere close to these specs? > Because it is a PCIe x1 slot card, that is the bottleneck. Based on > all I have read, your speeds are normal and you should consider it to > be the fastest speeds you'll see. If you had bought two SSDs and used > them in a RAID configuration, the speed would actually get worse. > > I ran into the same thing a while back, my motherboard actually has > SATA3 on-board, but it is not the primary controller (that one is > SATA2) and it's basically a permanently-installed PCIe controller as > far as speeds are concerned. Because of added latency, the on-board > primary SATA2 is actually faster than the SATA3 when multiple drives > are attached... but it's still faster than a HDD anyway. > > I think the only way we'lll see 500MB/sec on that SSD is to buy a > motherboard which has a SATA3 controller as its primary on-board drive > controller and plug it in to that. > > Look on the bright side, someday when we upgrade our motherboards, > it'll be like we got a free SSD upgrade for our troubles. :) > > I was thinking the same thing when I read the OP's post. I have a older IDE based machine, about 10 years old, and bought a SATA drive and card. The performance was less than claimed but it was because the bus speed was the bottle neck. When I built my new rig, which is SATA based, the drive was quite a bit faster and I get the speeds I should get. The only reason I bought that drive and the card was because I knew I was going to be upgrading and would have SATA on the mobo. OP, when you get a mobo with SATA built in, you should get better, most likely much better, performance. Why is it that all puters seem to have a bottle and a neck in them? lol Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words! ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-22 23:24 ` Dale @ 2012-08-23 4:05 ` Mark Knecht 2012-08-23 12:55 ` J. Roeleveld 0 siblings, 1 reply; 28+ messages in thread From: Mark Knecht @ 2012-08-23 4:05 UTC (permalink / raw To: gentoo-user From Kindle so short... Paul. Thanks. I'll double check tomorrow but the specs online said the slots were pci express 2.0. The card is a one lane card but the box says it can do 533M/S but boxes do lie sometimes. I'll keep investigating and post back any new info. Thanks, Mark ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-23 4:05 ` Mark Knecht @ 2012-08-23 12:55 ` J. Roeleveld 0 siblings, 0 replies; 28+ messages in thread From: J. Roeleveld @ 2012-08-23 12:55 UTC (permalink / raw To: gentoo-user Mark, On Thu, August 23, 2012 6:05 am, Mark Knecht wrote: > From Kindle so short... > > Paul. Thanks. I'll double check tomorrow but the specs online said the > slots were pci express 2.0. The card is a one lane card but the box > says it can do 533M/S but boxes do lie sometimes. The "2.0" part is the version. Not the speed. For PCI-e it's usually denoted as 1x, 4x, 8x and 16x. The numbers specify the amount of PCI-express lanes used for the port. More lanes = more bandwidth. As others have already pointed out, it's a single-lane card. Which means you can only get the max for a single PCI-express lane. On a side-note, does anyone know of a way to merge multiple PCI-expres 1x ports together without having to completely rewire the mainboard and "patch" the BIOS? My skillset, unfortunately, doesn't include that... -- Joost ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-22 22:58 ` Paul Hartman 2012-08-22 23:24 ` Dale @ 2012-08-23 15:55 ` Mark Knecht 2012-08-23 18:57 ` Mark Knecht 1 sibling, 1 reply; 28+ messages in thread From: Mark Knecht @ 2012-08-23 15:55 UTC (permalink / raw To: gentoo-user On Wed, Aug 22, 2012 at 3:58 PM, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote: <SNIP> > > I think the only way we'lll see 500MB/sec on that SSD is to buy a > motherboard which has a SATA3 controller as its primary on-board drive > controller and plug it in to that. > > Look on the bright side, someday when we upgrade our motherboards, > it'll be like we got a free SSD upgrade for our troubles. :) > Support for your POV Paul: http://techgage.com/article/battle_of_the_sata_30_controllers/ My controller is also a Marvell and the machine is X58-based so results are likely to be similar. I'm likely fighting a losing battle here, but I'll keep fighting for awhile longer... Cheers, Mark ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-23 15:55 ` Mark Knecht @ 2012-08-23 18:57 ` Mark Knecht 2012-08-23 19:22 ` Neil Bothwick 0 siblings, 1 reply; 28+ messages in thread From: Mark Knecht @ 2012-08-23 18:57 UTC (permalink / raw To: gentoo-user On Thu, Aug 23, 2012 at 8:55 AM, Mark Knecht <markknecht@gmail.com> wrote: > On Wed, Aug 22, 2012 at 3:58 PM, Paul Hartman > <paul.hartman+gentoo@gmail.com> wrote: > <SNIP> >> >> I think the only way we'lll see 500MB/sec on that SSD is to buy a >> motherboard which has a SATA3 controller as its primary on-board drive >> controller and plug it in to that. >> >> Look on the bright side, someday when we upgrade our motherboards, >> it'll be like we got a free SSD upgrade for our troubles. :) >> > > Support for your POV Paul: > > http://techgage.com/article/battle_of_the_sata_30_controllers/ > > My controller is also a Marvell and the machine is X58-based so > results are likely to be similar. > > I'm likely fighting a losing battle here, but I'll keep fighting for > awhile longer... > > Cheers, > Mark One additional thought: This limitation is likely just a byproduct of using a 1 lane controller. If one was willing to spend a (fairly large) bit more one could get a 16 lane SATA3 controller and would likely do much better in terms of throughput... ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-23 18:57 ` Mark Knecht @ 2012-08-23 19:22 ` Neil Bothwick 2012-08-23 19:30 ` Michael Mol 2012-08-23 19:34 ` Mark Knecht 0 siblings, 2 replies; 28+ messages in thread From: Neil Bothwick @ 2012-08-23 19:22 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 517 bytes --] On Thu, 23 Aug 2012 11:57:25 -0700, Mark Knecht wrote: > This limitation is likely just a byproduct of using a 1 lane > controller. If one was willing to spend a (fairly large) bit more one > could get a 16 lane SATA3 controller and would likely do much better > in terms of throughput... If you want real performance from SSD, you ditch SATA altogether and use a drive on a dedicated card. Of course, you're talking real money now. -- Neil Bothwick OPERATOR ERROR: Nyah, Nyah, Nyah, Nyah, Nyah! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-23 19:22 ` Neil Bothwick @ 2012-08-23 19:30 ` Michael Mol 2012-08-23 20:38 ` Mark Knecht 2012-08-23 19:34 ` Mark Knecht 1 sibling, 1 reply; 28+ messages in thread From: Michael Mol @ 2012-08-23 19:30 UTC (permalink / raw To: gentoo-user On Thu, Aug 23, 2012 at 3:22 PM, Neil Bothwick <neil@digimed.co.uk> wrote: > On Thu, 23 Aug 2012 11:57:25 -0700, Mark Knecht wrote: > >> This limitation is likely just a byproduct of using a 1 lane >> controller. If one was willing to spend a (fairly large) bit more one >> could get a 16 lane SATA3 controller and would likely do much better >> in terms of throughput... > > If you want real performance from SSD, you ditch SATA altogether and use > a drive on a dedicated card. Of course, you're talking real money now. Um. I'm pretty sure he's already getting 'real' performance from that SSD, even a "mere" 200MB/s runs circles around my best set of platters at home. -- :wq ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-23 19:30 ` Michael Mol @ 2012-08-23 20:38 ` Mark Knecht 2012-08-23 20:50 ` Michael Mol 0 siblings, 1 reply; 28+ messages in thread From: Mark Knecht @ 2012-08-23 20:38 UTC (permalink / raw To: gentoo-user On Thu, Aug 23, 2012 at 12:30 PM, Michael Mol <mikemol@gmail.com> wrote: > On Thu, Aug 23, 2012 at 3:22 PM, Neil Bothwick <neil@digimed.co.uk> wrote: <SNIP> >> If you want real performance from SSD, you ditch SATA altogether and use >> a drive on a dedicated card. Of course, you're talking real money now. > > Um. I'm pretty sure he's already getting 'real' performance from that > SSD, even a "mere" 200MB/s runs circles around my best set of platters > at home. > > -- > :wq > Real performance being the combination of drive and controller. This particular drive was spec'ed out at 500MB/S which is consistent with what the drive did in that link I pointed at earlier this morning. I do think now that 200MB/S is about the most I'm going to get from a 1 lane PCIe type adapter. I suspect that the biggest reason the link you pointed me toward at NewEgg is spec'ed at 1GB/S is due to it being a 4 lane card? Anyway, thanks for the pointer. Cheers, Mark ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-23 20:38 ` Mark Knecht @ 2012-08-23 20:50 ` Michael Mol 0 siblings, 0 replies; 28+ messages in thread From: Michael Mol @ 2012-08-23 20:50 UTC (permalink / raw To: gentoo-user On Thu, Aug 23, 2012 at 4:38 PM, Mark Knecht <markknecht@gmail.com> wrote: > On Thu, Aug 23, 2012 at 12:30 PM, Michael Mol <mikemol@gmail.com> wrote: >> On Thu, Aug 23, 2012 at 3:22 PM, Neil Bothwick <neil@digimed.co.uk> wrote: > <SNIP> >>> If you want real performance from SSD, you ditch SATA altogether and use >>> a drive on a dedicated card. Of course, you're talking real money now. >> >> Um. I'm pretty sure he's already getting 'real' performance from that >> SSD, even a "mere" 200MB/s runs circles around my best set of platters >> at home. > > Real performance being the combination of drive and controller. This > particular drive was spec'ed out at 500MB/S which is consistent with > what the drive did in that link I pointed at earlier this morning. > > I do think now that 200MB/S is about the most I'm going to get from a > 1 lane PCIe type adapter. I suspect that the biggest reason the link > you pointed me toward at NewEgg is spec'ed at 1GB/S is due to it being > a 4 lane card? > > Anyway, thanks for the pointer. I linked to a category of products; Internal SSDs which directly connect via PCIe. Currently 27 listings in that category. Lots of neat stuff. As for systemic performance...I'm certain your controller being only one PCIe lane is a major limiting factor. Beyond that, there are a lot of factors which weigh into SSD performance...which at least a few people in here (such as Neil) can tell you about. I only know things like SLC is often faster than MLC, that the on-drive controller's properties can have a major impact, and that SSDs are mostly awesome due to low latency. -- :wq ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-23 19:22 ` Neil Bothwick 2012-08-23 19:30 ` Michael Mol @ 2012-08-23 19:34 ` Mark Knecht 2012-08-23 19:43 ` Michael Mol 1 sibling, 1 reply; 28+ messages in thread From: Mark Knecht @ 2012-08-23 19:34 UTC (permalink / raw To: gentoo-user On Thu, Aug 23, 2012 at 12:22 PM, Neil Bothwick <neil@digimed.co.uk> wrote: > On Thu, 23 Aug 2012 11:57:25 -0700, Mark Knecht wrote: > >> This limitation is likely just a byproduct of using a 1 lane >> controller. If one was willing to spend a (fairly large) bit more one >> could get a 16 lane SATA3 controller and would likely do much better >> in terms of throughput... > > If you want real performance from SSD, you ditch SATA altogether and use > a drive on a dedicated card. Of course, you're talking real money now. > > > -- > Neil Bothwick > > OPERATOR ERROR: Nyah, Nyah, Nyah, Nyah, Nyah! Can you supply a link to such a solution? Just curiosity. I'm sure I don't have the money... ;-) - Mark ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-23 19:34 ` Mark Knecht @ 2012-08-23 19:43 ` Michael Mol 2012-08-23 21:37 ` Neil Bothwick 0 siblings, 1 reply; 28+ messages in thread From: Michael Mol @ 2012-08-23 19:43 UTC (permalink / raw To: gentoo-user On Thu, Aug 23, 2012 at 3:34 PM, Mark Knecht <markknecht@gmail.com> wrote: > On Thu, Aug 23, 2012 at 12:22 PM, Neil Bothwick <neil@digimed.co.uk> wrote: >> On Thu, 23 Aug 2012 11:57:25 -0700, Mark Knecht wrote: >> >>> This limitation is likely just a byproduct of using a 1 lane >>> controller. If one was willing to spend a (fairly large) bit more one >>> could get a 16 lane SATA3 controller and would likely do much better >>> in terms of throughput... >> >> If you want real performance from SSD, you ditch SATA altogether and use >> a drive on a dedicated card. Of course, you're talking real money now. >> >> >> -- >> Neil Bothwick >> >> OPERATOR ERROR: Nyah, Nyah, Nyah, Nyah, Nyah! > > Can you supply a link to such a solution? Just curiosity. I'm sure I > don't have the money... ;-) > > - Mark > http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&N=100008120+600038468&QksAutoSuggestion=&ShowDeactivatedMark=False&Configurator=&IsNodeId=1&Subcategory=636&description=&hisInDesc=&Ntk=&CFG=&SpeTabStoreType=&AdvancedSearch=1&srchInDesc= Long URLs are long, but short URLs are unreliable. Still: http://bit.ly/Pfa54T -- :wq ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-23 19:43 ` Michael Mol @ 2012-08-23 21:37 ` Neil Bothwick 0 siblings, 0 replies; 28+ messages in thread From: Neil Bothwick @ 2012-08-23 21:37 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 635 bytes --] On Thu, 23 Aug 2012 15:43:05 -0400, Michael Mol wrote: > > Can you supply a link to such a solution? Just curiosity. I'm sure I > > don't have the money... ;-) > http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&N=100008120+600038468&QksAutoSuggestion=&ShowDeactivatedMark=False&Configurator=&IsNodeId=1&Subcategory=636&description=&hisInDesc=&Ntk=&CFG=&SpeTabStoreType=&AdvancedSearch=1&srchInDesc= > > Long URLs are long, but short URLs are unreliable. Still: > > http://bit.ly/Pfa54T They've come down in price since I last looked. -- Neil Bothwick Power corrupts. Absolute power is kind of neat. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-22 21:46 [gentoo-user] SSD performance tweaking Mark Knecht 2012-08-22 22:58 ` Paul Hartman @ 2012-08-23 8:14 ` Volker Armin Hemmann 2012-08-23 10:15 ` Alex Schuster 2 siblings, 0 replies; 28+ messages in thread From: Volker Armin Hemmann @ 2012-08-23 8:14 UTC (permalink / raw To: gentoo-user; +Cc: Mark Knecht Am Mittwoch, 22. August 2012, 14:46:40 schrieb Mark Knecht: > Hi, > Yesterday I got a new, but rather low-end, PCIe-2 SATA-3 6Gb/S > adapter card and a reportedly high performance 128GB SSD drive. (Links > below) Other than my swap getting messed up because it didn't use > labels (who knew about swaplabel but didn't tell me? ;-) ) the > adapter and drive are in the machine and working fine. Unfortunately > the performance isn't what I might have hoped for. Both hdparm & > bonnie++ are reporting numbers in the 200MB/S range rather then the > 400-500MB/S range that I might have hoped for. The machine is PCIx-2 > based according to its specs. certainly not. PCIX is something you don't have. PCIe2 - yes > > I'm currently just using a single large partition & ext3. I didn't > do anything special in fdisk so the partition might not be aligned as > best it could be. I don't know. that alone can more than half your performance. Btw, why ext3? 4 and trim is your friend with a ssd. Your performance is fine. It is a single slot adapter, so the theoretical max is 300mb/s. Now substract some for overhead and some for misalignment and 200mb/s aren't bad at all. -- #163933 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-22 21:46 [gentoo-user] SSD performance tweaking Mark Knecht 2012-08-22 22:58 ` Paul Hartman 2012-08-23 8:14 ` Volker Armin Hemmann @ 2012-08-23 10:15 ` Alex Schuster 2012-08-24 9:25 ` Frank Steinmetzger 2 siblings, 1 reply; 28+ messages in thread From: Alex Schuster @ 2012-08-23 10:15 UTC (permalink / raw To: gentoo-user Mark Knecht writes: > I'm currently just using a single large partition & ext3. I didn't > do anything special in fdisk so the partition might not be aligned as > best it could be. I don't know. See if the partition's starting block is 63 as it used to be in the past. In this case the alignment is wrong, as SSDs have 4K (or even 8K) sectors consisting of 8 (or 16) 512 byte blocks. The starting block should be divisible by 8 (or 16) because of the large sector size, if not, a file system sector spans over two drive sectors, and both heed to be accessed when reading a file system sector. The size of an erasable block of SSDs is even larger, usually 512K, it would be best to align to that, too. A partition offset of 512K or 1M would avoid this. Wonko ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-23 10:15 ` Alex Schuster @ 2012-08-24 9:25 ` Frank Steinmetzger 2012-08-25 22:22 ` Volker Armin Hemmann 2012-08-26 11:41 ` Alex Schuster 0 siblings, 2 replies; 28+ messages in thread From: Frank Steinmetzger @ 2012-08-24 9:25 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 826 bytes --] On Thu, Aug 23, 2012 at 12:15:20PM +0200, Alex Schuster wrote: > Mark Knecht writes: > > > I'm currently just using a single large partition & ext3. I didn't > > do anything special in fdisk so the partition might not be aligned as > > best it could be. I don't know. > > […] > The size of an erasable block of SSDs is even larger, usually 512K, it > would be best to align to that, too. A partition offset of 512K or 1M > would avoid this. Unless the filesystem knows this and starts bigger files at those 512 k boundaries (so really only one erase cycle is needed for files <=512 k), isn't this fairly superfluous? -- Gruß | Greetings | Qapla' Please do not share anything from, with or about me with any Facebook service. The advantage of RSS jokes is that you always know the newest one. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-24 9:25 ` Frank Steinmetzger @ 2012-08-25 22:22 ` Volker Armin Hemmann 2012-08-26 2:04 ` Frank Steinmetzger 2012-08-26 11:41 ` Alex Schuster 1 sibling, 1 reply; 28+ messages in thread From: Volker Armin Hemmann @ 2012-08-25 22:22 UTC (permalink / raw To: gentoo-user; +Cc: Frank Steinmetzger Am Freitag, 24. August 2012, 11:25:48 schrieb Frank Steinmetzger: > On Thu, Aug 23, 2012 at 12:15:20PM +0200, Alex Schuster wrote: > > Mark Knecht writes: > > > I'm currently just using a single large partition & ext3. I didn't > > > > > > do anything special in fdisk so the partition might not be aligned as > > > best it could be. I don't know. > > > > […] > > The size of an erasable block of SSDs is even larger, usually 512K, it > > would be best to align to that, too. A partition offset of 512K or 1M > > would avoid this. > > Unless the filesystem knows this and starts bigger files at those 512 k > boundaries (so really only one erase cycle is needed for files <=512 k), > isn't this fairly superfluous? no, if you misalign, a lot of 4k blocks might span into two erase blocks. Which is bad. If you align correctly, you will never cross them unnecessary, sparing your SSD some unnecessary writes and improving overall performance. -- #163933 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-25 22:22 ` Volker Armin Hemmann @ 2012-08-26 2:04 ` Frank Steinmetzger 2012-08-26 12:54 ` Allan Gottlieb 0 siblings, 1 reply; 28+ messages in thread From: Frank Steinmetzger @ 2012-08-26 2:04 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1017 bytes --] On Sun, Aug 26, 2012 at 12:22:47AM +0200, Volker Armin Hemmann wrote: > > > The size of an erasable block of SSDs is even larger, usually 512K, it > > > would be best to align to that, too. A partition offset of 512K or 1M > > > would avoid this. > > > > Unless the filesystem knows this and starts bigger files at those 512 k > > boundaries (so really only one erase cycle is needed for files <=512 k), > > isn't this fairly superfluous? > > no, if you misalign, a lot of 4k blocks might span into two erase blocks. > Which is bad. If you align correctly, you will never cross them unnecessary, > sparing your SSD some unnecessary writes and improving overall performance. I don’t quite follow. If you align to 4k, then you are also aligned to 512k, because 512 % 4 = 0. -- Gruß | Greetings | Qapla' Please do not share anything from, with or about me with any Facebook service. The duration of a minute is relative. It depends on the side of the toilet door you are standing on. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-26 2:04 ` Frank Steinmetzger @ 2012-08-26 12:54 ` Allan Gottlieb 0 siblings, 0 replies; 28+ messages in thread From: Allan Gottlieb @ 2012-08-26 12:54 UTC (permalink / raw To: gentoo-user On Sat, Aug 25 2012, Frank Steinmetzger wrote: > On Sun, Aug 26, 2012 at 12:22:47AM +0200, Volker Armin Hemmann wrote: > >> > > The size of an erasable block of SSDs is even larger, usually 512K, it >> > > would be best to align to that, too. A partition offset of 512K or 1M >> > > would avoid this. >> > >> > Unless the filesystem knows this and starts bigger files at those 512 k >> > boundaries (so really only one erase cycle is needed for files <=512 k), >> > isn't this fairly superfluous? >> >> no, if you misalign, a lot of 4k blocks might span into two erase blocks. >> Which is bad. If you align correctly, you will never cross them unnecessary, >> sparing your SSD some unnecessary writes and improving overall performance. > > I don’t quite follow. If you align to 4k, then you are also aligned to 512k, > because 512 % 4 = 0. Backwards. Consider starting at 8K. This is a multiple of 4K but is not a multiple of 512K. If you align to 512k than you are also aligned to 4k because 512 % 4 = 0. allan ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-24 9:25 ` Frank Steinmetzger 2012-08-25 22:22 ` Volker Armin Hemmann @ 2012-08-26 11:41 ` Alex Schuster 2012-08-26 11:53 ` Volker Armin Hemmann 2012-08-26 20:49 ` Neil Bothwick 1 sibling, 2 replies; 28+ messages in thread From: Alex Schuster @ 2012-08-26 11:41 UTC (permalink / raw To: gentoo-user Frank Steinmetzger writes: > On Thu, Aug 23, 2012 at 12:15:20PM +0200, Alex Schuster wrote: >> The size of an erasable block of SSDs is even larger, usually 512K, it >> would be best to align to that, too. A partition offset of 512K or 1M >> would avoid this. > > Unless the filesystem knows this and starts bigger files at those 512 k > boundaries (so really only one erase cycle is needed for files <=512 k), > isn't this fairly superfluous? Yes, I think it is. When you search for SSD alignment, you read about this alignment all the time, even on the German Wikipedia, and many resources say that this can have a big impact on performance. But I could not find a real explanation at all. Besides that, it's not so easy to do the alignment, at least when using LVM. I read that LVM adds 192K header information, so even if you align the partition start to an erasable block size of 512K, the actual content is not aligned. See [*] for information how to overcome this. That is, if you believe the alignment to erasable blocks is important, personally I do not know what to think now. It wouldn't hurt, so why not apply it, but it seems like snake oil to me now. Wonko http://tytso.livejournal.com/2009/02/20/ ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-26 11:41 ` Alex Schuster @ 2012-08-26 11:53 ` Volker Armin Hemmann 2012-08-26 12:49 ` Alex Schuster 2012-08-26 20:49 ` Neil Bothwick 1 sibling, 1 reply; 28+ messages in thread From: Volker Armin Hemmann @ 2012-08-26 11:53 UTC (permalink / raw To: gentoo-user; +Cc: Alex Schuster Am Sonntag, 26. August 2012, 13:41:09 schrieb Alex Schuster: > Frank Steinmetzger writes: > > On Thu, Aug 23, 2012 at 12:15:20PM +0200, Alex Schuster wrote: > >> The size of an erasable block of SSDs is even larger, usually 512K, it > >> would be best to align to that, too. A partition offset of 512K or 1M > >> would avoid this. > > > > Unless the filesystem knows this and starts bigger files at those 512 k > > boundaries (so really only one erase cycle is needed for files <=512 k), > > isn't this fairly superfluous? > > Yes, I think it is. When you search for SSD alignment, you read about > this alignment all the time, even on the German Wikipedia, and many > resources say that this can have a big impact on performance. But I > could not find a real explanation at all. > > Besides that, it's not so easy to do the alignment, at least when using > LVM. I read that LVM adds 192K header information, so even if you align > the partition start to an erasable block size of 512K, the actual > content is not aligned. See [*] for information how to overcome this. > That is, if you believe the alignment to erasable blocks is important, > personally I do not know what to think now. It wouldn't hurt, so why not > apply it, but it seems like snake oil to me now. > > Wonko > > http://tytso.livejournal.com/2009/02/20/ because erasing is slow. You can not overwrite data on a ssd. you have to erase first, then reprogramm. Also, erasing shortens lifetime. -- #163933 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-26 11:53 ` Volker Armin Hemmann @ 2012-08-26 12:49 ` Alex Schuster 2012-08-26 14:21 ` Volker Armin Hemmann 0 siblings, 1 reply; 28+ messages in thread From: Alex Schuster @ 2012-08-26 12:49 UTC (permalink / raw To: gentoo-user Volker Armin Hemmann writes: > Am Sonntag, 26. August 2012, 13:41:09 schrieb Alex Schuster: >> Frank Steinmetzger writes: >>> Unless the filesystem knows this and starts bigger files at those 512 k >>> boundaries (so really only one erase cycle is needed for files <=512 k), >>> isn't this fairly superfluous? >> >> Yes, I think it is. When you search for SSD alignment, you read about >> this alignment all the time, even on the German Wikipedia, and many >> resources say that this can have a big impact on performance. But I >> could not find a real explanation at all. >> >> Besides that, it's not so easy to do the alignment, at least when using >> LVM. I read that LVM adds 192K header information, so even if you align >> the partition start to an erasable block size of 512K, the actual >> content is not aligned. See [*] for information how to overcome this. >> That is, if you believe the alignment to erasable blocks is important, >> personally I do not know what to think now. It wouldn't hurt, so why not >> apply it, but it seems like snake oil to me now. >> >> Wonko >> >> http://tytso.livejournal.com/2009/02/20/ > > because erasing is slow. You can not overwrite data on a ssd. you have to > erase first, then reprogramm. Also, erasing shortens lifetime. Yes, I know that. But why exactly does it help to align a partition to the erasable block size? I don't get it. Why isn't it sufficient to align to the usual 4K block size, so that a block never spans over two erasable blocks? Wonko ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-26 12:49 ` Alex Schuster @ 2012-08-26 14:21 ` Volker Armin Hemmann 2012-08-26 16:14 ` Alex Schuster 0 siblings, 1 reply; 28+ messages in thread From: Volker Armin Hemmann @ 2012-08-26 14:21 UTC (permalink / raw To: gentoo-user; +Cc: Alex Schuster Am Sonntag, 26. August 2012, 14:49:08 schrieb Alex Schuster: > Volker Armin Hemmann writes: > > Am Sonntag, 26. August 2012, 13:41:09 schrieb Alex Schuster: > >> Frank Steinmetzger writes: > >>> Unless the filesystem knows this and starts bigger files at those 512 k > >>> boundaries (so really only one erase cycle is needed for files <=512 k), > >>> isn't this fairly superfluous? > >> > >> Yes, I think it is. When you search for SSD alignment, you read about > >> this alignment all the time, even on the German Wikipedia, and many > >> resources say that this can have a big impact on performance. But I > >> could not find a real explanation at all. > >> > >> Besides that, it's not so easy to do the alignment, at least when using > >> LVM. I read that LVM adds 192K header information, so even if you align > >> the partition start to an erasable block size of 512K, the actual > >> content is not aligned. See [*] for information how to overcome this. > >> That is, if you believe the alignment to erasable blocks is important, > >> personally I do not know what to think now. It wouldn't hurt, so why not > >> apply it, but it seems like snake oil to me now. > >> > >> Wonko > >> > >> http://tytso.livejournal.com/2009/02/20/ > > > > because erasing is slow. You can not overwrite data on a ssd. you have to > > erase first, then reprogramm. Also, erasing shortens lifetime. > > Yes, I know that. But why exactly does it help to align a partition to > the erasable block size? I don't get it. Why isn't it sufficient to > align to the usual 4K block size, so that a block never spans over two > erasable blocks? well, for one, there are lots of ssd which have 8k pages. Not 4k. -- #163933 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-26 14:21 ` Volker Armin Hemmann @ 2012-08-26 16:14 ` Alex Schuster 2012-08-26 16:35 ` Volker Armin Hemmann 2012-08-27 15:58 ` Paul Hartman 0 siblings, 2 replies; 28+ messages in thread From: Alex Schuster @ 2012-08-26 16:14 UTC (permalink / raw To: gentoo-user Am 26.08.2012 16:21, schrieb Volker Armin Hemmann: > Am Sonntag, 26. August 2012, 14:49:08 schrieb Alex Schuster: >> Volker Armin Hemmann writes: >>> Am Sonntag, 26. August 2012, 13:41:09 schrieb Alex Schuster: >> Yes, I know that. But why exactly does it help to align a partition to >> the erasable block size? I don't get it. Why isn't it sufficient to >> align to the usual 4K block size, so that a block never spans over two >> erasable blocks? > > well, for one, there are lots of ssd which have 8k pages. Not 4k. Whatever. Then align to 8K instead. But what does this have to do with the erasable page size? Wonko ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-26 16:14 ` Alex Schuster @ 2012-08-26 16:35 ` Volker Armin Hemmann 2012-08-27 15:58 ` Paul Hartman 1 sibling, 0 replies; 28+ messages in thread From: Volker Armin Hemmann @ 2012-08-26 16:35 UTC (permalink / raw To: gentoo-user; +Cc: Alex Schuster Am Sonntag, 26. August 2012, 18:14:51 schrieb Alex Schuster: > Am 26.08.2012 16:21, schrieb Volker Armin Hemmann: > > Am Sonntag, 26. August 2012, 14:49:08 schrieb Alex Schuster: > >> Volker Armin Hemmann writes: > >>> Am Sonntag, 26. August 2012, 13:41:09 schrieb Alex Schuster: > >> Yes, I know that. But why exactly does it help to align a partition to > >> the erasable block size? I don't get it. Why isn't it sufficient to > >> align to the usual 4K block size, so that a block never spans over two > >> erasable blocks? > > > > well, for one, there are lots of ssd which have 8k pages. Not 4k. > > Whatever. Then align to 8K instead. But what does this have to do with > the erasable page size? > erasable BLOCK size is the imporant think. PAGE size (4 or 8K) not so much. Because every write comes down to ERASE-WRITE. So you want to align to ERASE BLOCKS and not so much pages. -- #163933 ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-26 16:14 ` Alex Schuster 2012-08-26 16:35 ` Volker Armin Hemmann @ 2012-08-27 15:58 ` Paul Hartman 1 sibling, 0 replies; 28+ messages in thread From: Paul Hartman @ 2012-08-27 15:58 UTC (permalink / raw To: gentoo-user On Sun, Aug 26, 2012 at 11:14 AM, Alex Schuster <wonko@wonkology.org> wrote: > Whatever. Then align to 8K instead. But what does this have to do with the > erasable page size? Short answer: Any page written to a block already containing data, the whole block must be erased. This is the "erase block size" people talk about. Block size is always divisible by page size. So if you align to the erase block size, you will always be okay. Long answer: NAND flash cells do not operate like a normal HDD storage, they can only be written to when they are empty. Empty meaning null, devoid of data, unallocated, not just "filled with zeroes" or "ignored by filesystem". So, any time you want to write to a block that already contains data, it must be erased and re-written by the drive controller. On most current-generation SSD the block size is 512k and contains 128 pages (4k each page). In older/slower SSD, or other kind of flash devices like CompactFlash or SD cards, often the erase block is larger, usually 4M or sometimes even up to 16M. (Definitely check the specs for your specific model of SSD to find the correct values.) SSD can write at page-size chunks of data, which is very fast, but only in an empty block. So if the block has data, that data must be relocated or erased and rewritten. TRIM feature tells the SSD that these pages are not used anymore, and allows it to do better garbage collection and combine pages/deallocate those unused blocks. Next time you write to one of those blocks, it will be very fast because erase already happened at TRIM time and these unused blocks are available for writing. This is why SSD without TRIM feature become slower once they have filled up. The drive controller has no knowledge of your filesystem, erase overhead is added to every write once the internal NAND free space is used up. So instead of writing a 4k page now it's potentially erasing 512k data then writing 512k data. 256 times more data touched for the same 4k write! (For a case where you have no TRIM support the only possible way to improve performance once a full drive worth of data has been written is to backup, perform ATA Secure Erase, which will clear the SSD allocation metadata, then restore your backup.) Now imagine if the alignment is not correct for both page size and erase block size, then when you write data it could overlap, causing two blocks to be erased and written instead of only one. In the example from the previous paragraph you can see now how the performance degrades even worse, as well as causing extra erases and writes which will potentially reduce the lifetime of your drive. Additional complexity is added by any further layers, filesystem block size, filesystem alignment (I'm looking at you, FAT32), LVM, RAID stripe size, etc... A good article giving more information about the subject is in the English version of Wikipedia: https://en.wikipedia.org/wiki/Write_amplification (disclaimer: all above info is AFAIK, please correct me if I got any facts or advice wrong) ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-user] SSD performance tweaking 2012-08-26 11:41 ` Alex Schuster 2012-08-26 11:53 ` Volker Armin Hemmann @ 2012-08-26 20:49 ` Neil Bothwick 1 sibling, 0 replies; 28+ messages in thread From: Neil Bothwick @ 2012-08-26 20:49 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 796 bytes --] On Sun, 26 Aug 2012 13:41:09 +0200, Alex Schuster wrote: > Besides that, it's not so easy to do the alignment, at least when using > LVM. I read that LVM adds 192K header information, so even if you align > the partition start to an erasable block size of 512K, the actual > content is not aligned. See [*] for information how to overcome this. > That is, if you believe the alignment to erasable blocks is important, > personally I do not know what to think now. It wouldn't hurt, so why > not apply it, but it seems like snake oil to me now. > > Wonko > > http://tytso.livejournal.com/2009/02/20/ I think that may be out of date. I read that but then found somewhere that LVM now uses MiB alignment. -- Neil Bothwick When there's a will, I want to be in it. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2012-08-27 16:00 UTC | newest] Thread overview: 28+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-08-22 21:46 [gentoo-user] SSD performance tweaking Mark Knecht 2012-08-22 22:58 ` Paul Hartman 2012-08-22 23:24 ` Dale 2012-08-23 4:05 ` Mark Knecht 2012-08-23 12:55 ` J. Roeleveld 2012-08-23 15:55 ` Mark Knecht 2012-08-23 18:57 ` Mark Knecht 2012-08-23 19:22 ` Neil Bothwick 2012-08-23 19:30 ` Michael Mol 2012-08-23 20:38 ` Mark Knecht 2012-08-23 20:50 ` Michael Mol 2012-08-23 19:34 ` Mark Knecht 2012-08-23 19:43 ` Michael Mol 2012-08-23 21:37 ` Neil Bothwick 2012-08-23 8:14 ` Volker Armin Hemmann 2012-08-23 10:15 ` Alex Schuster 2012-08-24 9:25 ` Frank Steinmetzger 2012-08-25 22:22 ` Volker Armin Hemmann 2012-08-26 2:04 ` Frank Steinmetzger 2012-08-26 12:54 ` Allan Gottlieb 2012-08-26 11:41 ` Alex Schuster 2012-08-26 11:53 ` Volker Armin Hemmann 2012-08-26 12:49 ` Alex Schuster 2012-08-26 14:21 ` Volker Armin Hemmann 2012-08-26 16:14 ` Alex Schuster 2012-08-26 16:35 ` Volker Armin Hemmann 2012-08-27 15:58 ` Paul Hartman 2012-08-26 20:49 ` Neil Bothwick
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox