1

I have a PostgreSQL database (OLTP, 10GB in size) server and I'm planning an array of hdds for it's storage. I have various disks I can use. I need to find the best ones for the job with the right kind of RAID configuration.

What to look? IOPS, MB/s, 4k/512k, what queue depth? What tools to use for measuring (and in which configuration)?

It's a virtual machine so I can use the Performance tab and esxtop, too, if they provide some useful information for the task.

Henno
  • 1,046
  • 5
  • 19
  • 33
  • If you can afford it, use 4 drives in RAID 10 for everything. Separate your logs and data files on different LUN/RAID groups and have a max of 1 LUN/RAID group per CPU core. Otherwise, read the PostgreSQL 9.0 High Peformance book that @StarShip3000 recommended. I hear great things about it. – Jeremiah Peschka Mar 19 '11 at 19:50

3 Answers3

1

Check this book out. http://www.2ndquadrant.com/books/postgresql-9-0-high-performance/

Kuberchaun
  • 256
  • 2
  • 5
1

I wouldn't spend time on benchmarking individual disks. Assuming we're talking about direct-attached storage, get the RAID array design right, that's the most important part of getting good disk I/O.

Individual harddisk models within a category & product generation will be quite close in performance, perhaps +/- 10 percent difference. You can get an idea of most drives' performance by going to Storagereview.com's Performance Database, and/or read their individual drive reviews.

Very generally speaking:

  • Enterprise class SSDs are king
  • lastest generation of 15,000 RPM 2.5" SAS drives are next
  • then latest 10,000 RPM 2.5" SAS drives
  • then 3.5" SAS drives
  • then 7.200 RPM SATA drives.

(For OLTP, you want seek time to be as low as possible within your budget.)

About RAID, it's a frequently asked question. In short:

  • RAID 1 for lesser used volumes / cost saving.
  • RAID 10 for volumes where performance is more important.
  • Use Battery Backed Write Cache on the RAID controller, and enable Write Caching in the controller BIOS (especially when using conventional harddisk drives).
0

I have a PostgreSQL database (OLTP, 10GB in size) server and I'm planning an array of hdds for it's storage. I have various disks I can use. I need to find the best ones for the job with the right kind of RAID configuration.

Get a SSD. Low size SSD can be gotten for 150 USD or so. 64 GB is multipel times waht you need. This will be about 100 times faster (!) than any Riad you can sensibly put together with 4 discs. 3 of them for Raid 1 on a RAID controller will max out the controller. We dont talk of 450 or so IOPS that a 15k SAS gives you. We talk of 40K IOPS. Out of one disc. Carefull about the last generation, though - the ones older are not as fast, unless you go enterprise.

TomTom
  • 50,857
  • 7
  • 52
  • 134