Re: Initial database loading and IDE x SCSI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux