Disk performance, was Re: tablespaces and DB administration

Поиск
Список
Период
Сортировка
Искать

Disk performance, was Re: tablespaces and DB administration

От:
Marty Scholes <marty@outputservices.com>
Дата:
This was a lively debate on what was faster, single spindles or RAID.

This is important, because I keep running into people who do not 
understand the performance dynamics of a RDBMS like Oracle or Pg.

Pg and Oracle make a zillion tiny reads and writes and fsync() 
regularly.  If your drive will copy a 4GB file at a sustained rate of 72 
MB/s, that tells you nothing about how it will do with an RDBMS.

I will throw in my experience on RAID vs spindles.

With the RAID write cache disabled, a well balanced set of spindles will 
kill a RAID system any day.

Enable the cache, and the RAID starts inching ahead.  My experience is 
that no one can continuously keep I/O properly balanced across several 
spindles on a production system.  Things change and the I/O mix changes. 
  Then, the RAID is outperforming the spindles.  If you want to spend 
the rest of your career constantly balancing I/O across spindles, then 
do so.

For the rest of us, with a write cache, a hardware RAID wins hands down 
over the long haul.

It might make sense to provide some sort of benchmarking tool for 
various systems so that we can predict I/O performance.

Run the following code both on a hardware RAID and on a single spindle.

#include 
#include 
#include 
#include 
#include 
#include 

void makefile(int fs)
{
         int i;
         char    buf[8192];
         int     ld;
         int     blocks=4096;
         int     pos;
         time_t  stim;
         time_t  etim;
         float   avg;

         unlink("dump.out");
         ld=open("dump.out", O_WRONLY | O_CREAT);

         printf("Writing %d blocks sequentially\n", blocks);
         time(&stim);
         for (i=0; i
FAQ