pg.ddx.io  pgsql-testers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
testing HS/SR - performance difference primary vs. standby
2+ messages / 1 participants
[nested] [flat]

* testing HS/SR - performance difference primary vs. standby
@ 2010-04-08 21:19  Erik Rijkers <er@xs4all.nl>
  0 siblings, 0 replies; 2+ messages in thread

From: Erik Rijkers @ 2010-04-08 21:19 UTC (permalink / raw)
  To: pgsql-testers

What is the expected difference in (select-)
performance between a primary and standby? (v9.0)

I expected no difference, but I find large differences.

Here is one test:

On port 6566 is primary, on port 6566 slave.
They are both on an otherwise idle machine.

Initialize:
  pgbench -h /tmp -p 6565 -i -s 10000 replicas

Then, after waiting for the standby to catch up:

3x pgbench on primary:

pgbench -h /tmp -p 6565 -n -S -c 20 -T 900 replicas
  tps = 518.854079 (including connections establishing)
  tps = 563.715825 (including connections establishing)
  tps = 614.428721 (including connections establishing)

3x pgbench on standby:

pgbench -h /tmp -p 6566 -n -S -c 20 -T 900 replicas
  tps = 272.378369 (including connections establishing)
  tps = 287.080326 (including connections establishing)
  tps = 304.373053 (including connections establishing)


The postgresql.conf's are almost the same:

grep -Ev '^([[:space:]]*#)|(^$)' ...

pgsql.sr_primary/data/postgresql.conf:data_directory =
'/var/data1/pg_stuff/pg_installations/pgsql.sr_primary/data'
pgsql.sr_primary/data/postgresql.conf:port = 6565
pgsql.sr_primary/data/postgresql.conf:max_connections = 100
pgsql.sr_primary/data/postgresql.conf:shared_buffers = 32MB
pgsql.sr_primary/data/postgresql.conf:checkpoint_segments = 50
pgsql.sr_primary/data/postgresql.conf:archive_mode = 'on'
pgsql.sr_primary/data/postgresql.conf:archive_command= 'cp %p
/var/data1/pg_stuff/dump/replication_archive/%f'
pgsql.sr_primary/data/postgresql.conf:max_wal_senders = 5
pgsql.sr_primary/data/postgresql.conf:datestyle = 'iso, mdy'
pgsql.sr_primary/data/postgresql.conf:lc_messages = 'en_US.UTF-8'
pgsql.sr_primary/data/postgresql.conf:lc_monetary = 'en_US.UTF-8'
pgsql.sr_primary/data/postgresql.conf:lc_numeric = 'en_US.UTF-8'
pgsql.sr_primary/data/postgresql.conf:lc_time = 'en_US.UTF-8'
pgsql.sr_primary/data/postgresql.conf:default_text_search_config = 'pg_catalog.english'


pgsql.sr_slavery/data/postgresql.conf:data_directory =
'/var/data1/pg_stuff/pg_installations/pgsql.sr_slavery/data'
pgsql.sr_slavery/data/postgresql.conf:port = 6566
pgsql.sr_slavery/data/postgresql.conf:max_connections = 100
pgsql.sr_slavery/data/postgresql.conf:shared_buffers = 32MB
pgsql.sr_slavery/data/postgresql.conf:checkpoint_segments = 50
pgsql.sr_slavery/data/postgresql.conf:archive_mode = 'on'
pgsql.sr_slavery/data/postgresql.conf:archive_command= 'cp %p
/var/data1/pg_stuff/dump/replication_archive/%f'
pgsql.sr_slavery/data/postgresql.conf:max_wal_senders = 5
pgsql.sr_slavery/data/postgresql.conf:datestyle = 'iso, mdy'
pgsql.sr_slavery/data/postgresql.conf:lc_messages = 'en_US.UTF-8'
pgsql.sr_slavery/data/postgresql.conf:lc_monetary = 'en_US.UTF-8'
pgsql.sr_slavery/data/postgresql.conf:lc_numeric = 'en_US.UTF-8'
pgsql.sr_slavery/data/postgresql.conf:lc_time = 'en_US.UTF-8'
pgsql.sr_slavery/data/postgresql.conf:default_text_search_config = 'pg_catalog.english'


Is that large difference expected?  (what causes it?)


Thanks,

Erik Rijkers








^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: testing HS/SR - performance difference primary vs. standby
@ 2010-04-08 21:37  Erik Rijkers <er@xs4all.nl>
  0 siblings, 0 replies; 2+ messages in thread

From: Erik Rijkers @ 2010-04-08 21:37 UTC (permalink / raw)
  To: pgsql-testers

sorry, I typoed the port numbers.  It should be:

On port 6565 is primary, on port 6566 slave.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-04-08 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-04-08 21:19 testing HS/SR - performance difference primary vs. standby Erik Rijkers <er@xs4all.nl>
2010-04-08 21:37 Re: testing HS/SR - performance difference primary vs. standby Erik Rijkers <er@xs4all.nl>

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