Re: testing HS/SR - 1 vs 2 performance - Mailing list pgsql-hackers

From Aidan Van Dyk
Subject Re: testing HS/SR - 1 vs 2 performance
Date
Msg-id 20100412133001.GH5554@oak.highrise.ca
Whole thread Raw
In response to Re: testing HS/SR - 1 vs 2 performance  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: testing HS/SR - 1 vs 2 performance  (Aidan Van Dyk <aidan@highrise.ca>)
Re: testing HS/SR - 1 vs 2 performance  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
* Robert Haas <robertmhaas@gmail.com> [100412 07:10]:
> I think we need to investigate this more.  It's not going to look good
> for the project if people find that a hot standby server runs two
> orders of magnitude slower than the primary.

Yes, it's not "good", but it's a known problem.  We've had people
complaining that wal-replay can't keep up with a wal stream from a heavy
server.

The master producing the wal stream has $XXX seperate read/modify
processes working over the data dir, and is bottle-necked by the
serialized WAL stream.  All the seek+read delays are parallized and
overlapping.

But on the slave (traditionally PITR slave, now also HS/SR), has al
lthat read-modify-write happening in a single thread fasion, meaning
that WAL record $X+1 waits until the buffer $X needs to modify is read
in.  All the seek+read delays are serialized.

You can optimize that by keepdng more of them in buffers (shared, or OS
cache), but the WAL producer, by it's very nature being a
multi-task-io-load producing random read/write is always going to go
quicker than single-stream random-io WAL consumer...

a.

-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: testing HS/SR - 1 vs 2 performance
Next
From: Aidan Van Dyk
Date:
Subject: Re: testing HS/SR - 1 vs 2 performance