pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: carlosreimer@terra.com.br
Cc: pgsql-performance@postgresql.org
Subject: Re: Initial database loading and IDE x SCSI
Date: Fri, 02 Jun 2006 13:40:11 -0500
Message-ID: <1149273611.25526.169.camel@state.g2switchworks.com> (raw)
In-Reply-To: <PEEPKDFEHHEMKBBFPOOKCEHCCPAA.carlosreimer@terra.com.br>
References: <PEEPKDFEHHEMKBBFPOOKCEHCCPAA.carlosreimer@terra.com.br>

On Fri, 2006-06-02 at 13:25, carlosreimer@terra.com.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.



view thread (4+ messages)  latest in thread

Message-ID: <1149273611.25526.169.camel@state.g2switchworks.com>
Permalink:  ../1149273611.25526.169.camel@state.g2switchworks.com/
Also on:    postgresql.org/message-id/1149273611.25526.169.camel@state.g2switchworks.com

 · 

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: smarlowe@g2switchworks.com, carlosreimer@terra.com.br
  Subject: Re: Initial database loading and IDE x SCSI
  In-Reply-To: <1149273611.25526.169.camel@state.g2switchworks.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