Re: Disk performance

From: Ivan Voras <ivoras(at)freebsd(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Disk performance
Date: 2010-06-15 13:16:19
Message-ID: hv7uf1$cgp$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/15/10 14:59, Janning wrote:
> Hi all,
>
> as we encountered some limitations of our cheap disk setup, I really would
> like to see how cheap they are compared to expensive disk setups.
>
> We have a 12 GB RAM machine with intel i7-975 and using
> 3 disks "Seagate Barracuda 7200.11, ST31500341AS (1.5 GB)"
> One disk for the system and WAL etc. and one SW RAID-0 with two disks for
> postgresql data.
>
> Now I ran a few test as described in
> http://www.westnet.com/~gsmith/content/postgresql/pg-disktesting.htm
>
> # time sh -c "dd if=/dev/zero of=bigfile bs=8k count=3000000 && sync"
> 3000000+0 records in
> 3000000+0 records out
> 24576000000 bytes (25 GB) copied, 276.03 s, 89.0 MB/s
>
> real 4m48.658s
> user 0m0.580s
> sys 0m51.579s
>
> # time dd if=bigfile of=/dev/null bs=8k
> 3000000+0 records in
> 3000000+0 records out
> 24576000000 bytes (25 GB) copied, 222.841 s, 110 MB/s
>
> real 3m42.879s
> user 0m0.468s
> sys 0m18.721s

The figures are ok if the tests were done on a single drive (i.e. not
your RAID-0 array).

> IMHO it is looking quite fast compared to the values mentioned in the article.
> What values do you expect with a very expensive setup like many spindles,
> scsi, raid controller, battery cache etc. How much faster will it be?

For start, you are attempting to use RAID-0 with two disks here. This
means you have twice as much risk that a drive failure will cause total
data loss. In any kind of serious setup this would be the first thing to
replace.

> Of yourse, you can't give me exact results, but I would just like to get a an
> idea about how much faster an expensive disk setup could be.
> Would it be like 10% faster, 100% or 1000% faster? If you can give me any
> hints, I would greatly appreciate it.

There is no magic here - scalability of drives can be approximated linearly:

a) faster drives: 15,000 RPM drives will be almost exactly 15000/7200
times faster at random access

b) more drives: depending on your RAID schema, each parallel drive or
drive combination will grow your speed linearly. For example, a 3-drive
RAID-0 will be 3/2 times faster than a 2-drive RAID-0. Of course, you
would not use RAID-0 anywhere serious. But an 8-drive RAID-10 array will
be 8/4=2 times faster than a 4-drive RAID-10 array.

Finally, it all depends on your expected load vs budget. If you are
unsure of what you want and what you need, but don't expect serious
write loads, make a 4-drive RAID-10 array of your cheap 7200 RPM drives,
invest in more RAM and don't worry about it.

Drive controllers are another issue and there is somewhat more magic
here. If the above paragraph describes you well, you probably don't need
a RAID controller. There are many different kinds of these with
extremely different prices, and many different configuration option so
nowadays it isn't practical to think about those until you really need to.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2010-06-15 13:18:26 Re: Problem serving one-click installer to Syria
Previous Message Mike C 2010-06-15 13:05:46 pg_restore performance / practicality question