Re: BBU still needed with SSD? - Mailing list pgsql-performance

From Greg Smith
Subject Re: BBU still needed with SSD?
Date
Msg-id 4E2594D7.7000001@2ndquadrant.com
Whole thread Raw
In response to Re: BBU still needed with SSD?  (Yeb Havinga <yebhavinga@gmail.com>)
Responses Re: BBU still needed with SSD?  (Klaus Ita <klaus@worstofall.com>)
List pgsql-performance
Yeb Havinga wrote:
> So for the Intels it's probably also lifetime writes in GB but you'd
> have to check with an Intel smart values reader to be absolutely sure.

With my 320 series drive, the LBA units are pretty clearly 32MB each.
Watch this:

root@toy:/ssd/data# smartctl --version
smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build)
...

root@toy:/ssd/data# du -skh pg_xlog/
4.2G    pg_xlog/

root@toy:/ssd/data# smartctl -a /dev/sdg1 | grep LBAs
241 Total_LBAs_Written      0x0032   100   100   000    Old_age
Always       -       18128
242 Total_LBAs_Read         0x0032   100   100   000    Old_age
Always       -       10375

root@toy:/ssd/data# cat pg_xlog/* > /dev/null

root@toy:/ssd/data# smartctl -a /dev/sdg1 | grep LBAs
241 Total_LBAs_Written      0x0032   100   100   000    Old_age
Always       -       18128
242 Total_LBAs_Read         0x0032   100   100   000    Old_age
Always       -       10508

That's an increase of 133 after reading 4.2GB of data, which means makes
each LBA turn out to be 32MB in size.  Let's try to confirm that by
doing a write:

root@toy:/ssd/gsmith# smartctl -a /dev/sdg1 | grep LBAs
241 Total_LBAs_Written      0x0032   100   100   000    Old_age
Always       -       18159
242 Total_LBAs_Read         0x0032   100   100   000    Old_age
Always       -       10508
root@toy:/ssd/gsmith# dd if=/dev/zero of=test_file.0 bs=32M count=25 && sync
25+0 records in
25+0 records out
838860800 bytes (839 MB) copied, 5.95257 s, 141 MB/s
root@toy:/ssd/gsmith# smartctl -a /dev/sdg1 | grep LBAs
241 Total_LBAs_Written      0x0032   100   100   000    Old_age
Always       -       18184
242 Total_LBAs_Read         0x0032   100   100   000    Old_age
Always       -       10508

18184 - 18159 = 25; exactly the count I used in 32MB blocks.

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD



pgsql-performance by date:

Previous
From: Yeb Havinga
Date:
Subject: Re: BBU still needed with SSD?
Next
From: Robert Haas
Date:
Subject: Re: hstore - Implementation and performance issues around its operators