pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Greg Smith <greg@2ndquadrant.com>
To: Yeb Havinga <yebhavinga@gmail.com>
Cc: Florian Weimer <fweimer@bfk.de>
Cc: Andy <angelflow@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: BBU still needed with SSD?
Date: Tue, 19 Jul 2011 10:29:43 -0400
Message-ID: <4E2594D7.7000001@2ndquadrant.com> (raw )
In-Reply-To: <4E257587.3040704@gmail.com >
References: <1310953399.25726.YahooMailClassic@web111304.mail.gq1.yahoo.com >
<4E23E72B.2070508@gmail.com >
<82vcuyd7p5.fsf@mid.bfk.de >
<4E255DF9.20005@gmail.com >
<82y5zubl90.fsf@mid.bfk.de >
<4E2569B0.2050307@gmail.com >
<82livubix4.fsf@mid.bfk.de >
<4E257587.3040704@gmail.com >
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
view thread (17+ messages) latest in thread
Message-ID: <4E2594D7.7000001@2ndquadrant.com>
Permalink: ../4E2594D7.7000001@2ndquadrant.com/
Also on: postgresql.org/message-id/4E2594D7.7000001@2ndquadrant.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: greg@2ndquadrant.com, yebhavinga@gmail.com, fweimer@bfk.de, angelflow@yahoo.com
Subject: Re: BBU still needed with SSD?
In-Reply-To: <4E2594D7.7000001@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox