Re: Initial database loading and IDE x SCSI

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: carlosreimer(at)terra(dot)com(dot)br
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Initial database loading and IDE x SCSI
Date: 2006-06-02 18:40:11
Message-ID: 1149273611.25526.169.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, 2006-06-02 at 13:25, carlosreimer(at)terra(dot)com(dot)br wrote:
> Hi,
>
> I would like to know if my supposition is right.
>
> Considering an environment with only one hard disk attached to a server, an
> initial loading of the database probably is much faster using an IDE/ATA
> interface with write-back on than using an SCSI interface. That´s because of
> the SCSI command interface overhead.
>
> Then main advantage of SCSI interfaces, the multiuser environment is lost in
> this scenery.
>
> Am I right? Am I missing something here?
>
> Even if I´m right, is something that could be done too improove SCSI loading
> performance in this scenery?

The answer is yes. And no.

IDE drives notoriously lie about their cache, so that if you have the
cache enabled, the IDE drive will nominally ack to an fsync before it's
actually written the data. So, the IDE drive will write faster, but
your data probably won't survive a system crash or power loss during a
write. If you turn off the cache, then the IDE drive will be much
slower.

SCSI overhead isn't really a big issue during loads because you're
usually writing data at a good clip, and the overhead of SCSI is pretty
small by comparison to how much data you'll be slinging.

However, SCSI drives don't lie about Fsync, so the maximum speed of your
output will be limited by the speed at which your machine can fsync the
pg_xlog output.

For a single disk system, just doing development or a reporting
database, an IDE drive is often just fine. But under no circumstances
should you put an accounting system on a single drive, especially IDE
with cache turned on.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Lewis 2006-06-02 18:41:27 Re: Initial database loading and IDE x SCSI
Previous Message carlosreimer 2006-06-02 18:25:57 Initial database loading and IDE x SCSI