pgpool性能测试

IP分配:
192.168.100.108  db1
192.168.100.109  db2
192.168.100.222  vip


服务器配置:(两台服务器配置相同)
[root@db2 ~]# uname -a
Linux db2 3.8.13-98.7.1.el7uek.x86_64 #2 SMP Wed Nov 25 13:51:41 PST 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@db2 ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:         128568        1046      122488        3511        5033      123749
Swap:         32767           0       32767
[root@db2 ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       100G  8.0G   92G   9% /
devtmpfs         63G     0   63G   0% /dev
tmpfs            63G   88K   63G   1% /dev/shm
tmpfs            63G  3.5G   60G   6% /run
tmpfs            63G     0   63G   0% /sys/fs/cgroup
/dev/sda6       485G   33M  484G   1% /soft
/dev/sda2       500G  961M  499G   1% /hg
/dev/sda1       497M  189M  309M  38% /boot
/dev/sdb1       985G  4.6G  980G   1% /hgdata
tmpfs            13G   16K   13G   1% /run/user/42
tmpfs            13G     0   13G   0% /run/user/0


[highgo@db2 ~]$  pgbench -h 192.168.100.222 -p 9999 -T 10 highgo   ---VIP插入
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 1
query mode: simple
number of clients: 1
number of threads: 1
duration: 10 s
number of transactions actually processed: 349
latency average: 28.706 ms
tps = 34.835714 (including connections establishing)
tps = 35.086471 (excluding connections establishing)
[highgo@db2 ~]$  pgbench -h 192.168.100.108 -p 5866 -T 10 highgo   ---public ip插入
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 1
query mode: simple
number of clients: 1
number of threads: 1
duration: 10 s
number of transactions actually processed: 7267
latency average: 1.376 ms
tps = 726.696294 (including connections establishing)
tps = 726.860636 (excluding connections establishing)


highgo=# show pool_nodes;
 node_id | hostname | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay 
---------+----------+------+--------+-----------+---------+------------+-------------------+-------------------
 0       | db1      | 5866 | up     | 0.500000  | primary | 359        | true              | 0
 1       | db2      | 5866 | up     | 0.500000  | standby | 0          | false             | 0
(2 rows)


[highgo@db2 ~]$ pgbench -h 192.168.100.222 -p 9999 -c 10 -S -T 30 highgo   --VIP查询
starting vacuum...end. 
transaction type: SELECT only
scaling factor: 1
query mode: simple
number of clients: 10
number of threads: 1
duration: 30 s
number of transactions actually processed: 5356
latency average: 56.119 ms
tps = 178.193115 (including connections establishing)
tps = 180.596120 (excluding connections establishing)


highgo=# show pool_nodes;
 node_id | hostname | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay 
---------+----------+------+--------+-----------+---------+------------+-------------------+-------------------
 0       | db1      | 5866 | up     | 0.500000  | primary | 3576       | true              | 0
 1       | db2      | 5866 | up     | 0.500000  | standby | 2140       | false             | 0
(2 rows)


[highgo@db2 ~]$ pgbench -h 192.168.100.222 -p 9999 -c 10 -S -T 30 highgo   --VIP查询
starting vacuum...end.
transaction type: SELECT only
scaling factor: 1
query mode: simple
number of clients: 10
number of threads: 1
duration: 30 s
number of transactions actually processed: 5356
latency average: 56.119 ms
tps = 178.193115 (including connections establishing)
tps = 180.596120 (excluding connections establishing)
[highgo@db2 ~]$ pgbench -h 192.168.100.108 -p 5866 -c 10 -S -T 30 highgo  --public ip查询
starting vacuum...end.
transaction type: SELECT only
scaling factor: 1
query mode: simple
number of clients: 10
number of threads: 1
duration: 30 s
number of transactions actually processed: 1213577
latency average: 0.247 ms
tps = 40452.247094 (including connections establishing)
tps = 40482.473769 (excluding connections establishing)
[highgo@db2 ~]$ pgbench -h 192.168.100.109 -p 5866 -c 10 -S -T 30 highgo   --备机查询(流复制+pgpool)
starting vacuum...错误:  无法在恢复期间执行VACUUM
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值