Re: BBU still needed with SSD?

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Yeb Havinga <yebhavinga(at)gmail(dot)com>
Cc: Florian Weimer <fweimer(at)bfk(dot)de>, Andy <angelflow(at)yahoo(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: BBU still needed with SSD?
Date: 2011-07-19 14:29:43
Message-ID: 4E2594D7.7000001@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)toy:/ssd/data# smartctl --version
smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build)
...

root(at)toy:/ssd/data# du -skh pg_xlog/
4.2G pg_xlog/

root(at)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(at)toy:/ssd/data# cat pg_xlog/* > /dev/null

root(at)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(at)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(at)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(at)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(at)2ndQuadrant(dot)com Baltimore, MD

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2011-07-19 20:08:19 Re: hstore - Implementation and performance issues around its operators
Previous Message Yeb Havinga 2011-07-19 12:16:07 Re: BBU still needed with SSD?