“Pgbench”的版本间差异

来自兆芯CPU与嵌入式系统
跳到导航 跳到搜索
(创建页面,内容为“ ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench -c clients 模拟的客户数,也就是并发数据库会话数目。缺省是 1。 -t transactions…”)
 
第1行: 第1行:
 +
<source lang="bash">
 +
#1个session,读写性能
 
  ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench
 
  ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench
-c clients 模拟的客户数,也就是并发数据库会话数目。缺省是 1。
 
-t transactions 每个客户端跑的事务数目。缺省是 10。
 
 
starting vacuum...end.
 
starting vacuum...end.
 
transaction type: <builtin: TPC-B (sort of)>
 
transaction type: <builtin: TPC-B (sort of)>
第13行: 第13行:
 
tps = 208.672446 (including connections establishing)
 
tps = 208.672446 (including connections establishing)
 
tps = 208.675069 (excluding connections establishing)
 
tps = 208.675069 (excluding connections establishing)
 +
##1个session,只读性能
 +
root@debian:~/xull/pgsql/bin# ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench -S 
 +
Password:
 +
starting vacuum...end.
 +
transaction type: <builtin: select only>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 1
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 294834
 +
latency average = 1.018 ms
 +
tps = 982.778611 (including connections establishing)
 +
tps = 982.790906 (excluding connections establishing)
 +
script statistics:
 +
- statement latencies in milliseconds:
 +
     0.003  \set aid random(1, 100000 * :scale)
 +
     1.010  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 +
</source>

2019年10月18日 (五) 11:11的版本

#1个session,读写性能
 ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 714
query mode: simple
number of clients: 1
number of threads: 1
duration: 300 s
number of transactions actually processed: 62602
latency average = 4.792 ms
tps = 208.672446 (including connections establishing)
tps = 208.675069 (excluding connections establishing)
##1个session,只读性能
root@debian:~/xull/pgsql/bin# ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench -S  
Password: 
starting vacuum...end.
transaction type: <builtin: select only>
scaling factor: 714
query mode: simple
number of clients: 1
number of threads: 1
duration: 300 s
number of transactions actually processed: 294834
latency average = 1.018 ms
tps = 982.778611 (including connections establishing)
tps = 982.790906 (excluding connections establishing)
script statistics:
 - statement latencies in milliseconds:
         0.003  \set aid random(1, 100000 * :scale)
         1.010  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;