“Pgbench”的版本间差异

来自兆芯CPU与嵌入式系统
跳到导航 跳到搜索
(创建页面,内容为“ ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench -c clients 模拟的客户数,也就是并发数据库会话数目。缺省是 1。 -t transactions…”)
 
 
(未显示同一用户的2个中间版本)
第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,只读性能
 +
./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;
 +
 +
#30个session,读写性能
 +
./pgbench -h 192.168.10.156 -U pgbench -c 30 -T 300 -r pgbench
 +
starting vacuum...end.
 +
transaction type: <builtin: TPC-B (sort of)>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 30
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 140570
 +
latency average = 64.564 ms
 +
tps = 464.652135 (including connections establishing)
 +
tps = 464.657686 (excluding connections establishing)
 +
#30个session,只读性能
 +
./pgbench -h 192.168.10.156 -U pgbench -c 30 -T 300 -r pgbench -S
 +
Password:
 +
starting vacuum...end.
 +
transaction type: <builtin: select only>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 30
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 1109351
 +
latency average = 8.113 ms
 +
tps = 3697.755242 (including connections establishing)
 +
tps = 3697.798580 (excluding connections establishing)
 +
script statistics:
 +
- statement latencies in milliseconds:
 +
     0.002  \set aid random(1, 100000 * :scale)
 +
     8.105  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 +
 +
#40个session,读写性能
 +
./pgbench -h 192.168.10.156 -U pgbench -c 40 -T 300 -r pgbench
 +
Password:
 +
starting vacuum...end.
 +
transaction type: <builtin: TPC-B (sort of)>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 40
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 140924
 +
latency average = 85.404 ms
 +
tps = 468.363265 (including connections establishing)
 +
tps = 468.368936 (excluding connections establishing)
 +
#40个session,只读性能
 +
./pgbench -h 192.168.10.156 -U pgbench -c 40 -T 300 -r pgbench -S
 +
Password:
 +
starting vacuum...end.
 +
transaction type: <builtin: select only>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 40
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 985425
 +
latency average = 12.178 ms
 +
tps = 3284.584917 (including connections establishing)
 +
tps = 3284.623497 (excluding connections establishing)
 +
script statistics:
 +
- statement latencies in milliseconds:
 +
     0.002  \set aid random(1, 100000 * :scale)
 +
     12.168  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 +
 +
#60个session,读写性能
 +
./pgbench -h 192.168.10.156 -U pgbench -c 60 -T 300 -r pgbench 
 +
Password:
 +
starting vacuum...end.
 +
transaction type: <builtin: TPC-B (sort of)>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 60
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 159822
 +
latency average = 113.348 ms
 +
tps = 529.341550 (including connections establishing)
 +
tps = 529.347960 (excluding connections establishing)
 +
#60个session,只读性能
 +
./pgbench -h 192.168.10.156 -U pgbench -c 60 -T 300 -r pgbench -S
 +
Password:
 +
starting vacuum...end.
 +
transaction type: <builtin: select only>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 60
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 919073
 +
latency average = 19.587 ms
 +
tps = 3063.331202 (including connections establishing)
 +
tps = 3063.367406 (excluding connections establishing)
 +
script statistics:
 +
- statement latencies in milliseconds:
 +
     0.002  \set aid random(1, 100000 * :scale)
 +
     19.568  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 +
 +
#80个session,读写性能
 +
./pgbench -h 192.168.10.156 -U pgbench -c 80 -T 300 -r pgbench
 +
Password:
 +
starting vacuum...end.
 +
transaction type: <builtin: TPC-B (sort of)>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 80
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 153965
 +
latency average = 155.949 ms
 +
tps = 512.986960 (including connections establishing)
 +
tps = 512.993305 (excluding connections establishing)
 +
#80个session,只读性能
 +
./pgbench -h 192.168.10.156 -U pgbench -c 80 -T 300 -r pgbench -S 
 +
Password:
 +
starting vacuum...end.
 +
transaction type: <builtin: select only>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 80
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 818840
 +
latency average = 29.312 ms
 +
tps = 2729.270760 (including connections establishing)
 +
tps = 2729.304017 (excluding connections establishing)
 +
script statistics:
 +
- statement latencies in milliseconds:
 +
     0.002  \set aid random(1, 100000 * :scale)
 +
     29.278  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 +
 +
#100个session,读写性能
 +
./pgbench -h 192.168.10.156 -U pgbench -c 100 -T 300 -r pgbench
 +
Password:
 +
starting vacuum...end.
 +
transaction type: <builtin: TPC-B (sort of)>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 100
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 175622
 +
latency average = 173.804 ms
 +
tps = 575.360072 (including connections establishing)
 +
tps = 575.366715 (excluding connections establishing)
 +
#100个session,只读性能
 +
./pgbench -h 192.168.10.156 -U pgbench -c 100 -T 300 -r pgbench -S
 +
Password:
 +
starting vacuum...end.
 +
transaction type: <builtin: select only>
 +
scaling factor: 714
 +
query mode: simple
 +
number of clients: 100
 +
number of threads: 1
 +
duration: 300 s
 +
number of transactions actually processed: 701231
 +
latency average = 42.786 ms
 +
tps = 2337.210651 (including connections establishing)
 +
tps = 2337.237060 (excluding connections establishing)
 +
script statistics:
 +
- statement latencies in milliseconds:
 +
     0.002  \set aid random(1, 100000 * :scale)
 +
     42.731  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 +
</source>

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

#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,只读性能
./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;

#30个session,读写性能
 ./pgbench -h 192.168.10.156 -U pgbench -c 30 -T 300 -r pgbench
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 714
query mode: simple
number of clients: 30
number of threads: 1
duration: 300 s
number of transactions actually processed: 140570
latency average = 64.564 ms
tps = 464.652135 (including connections establishing)
tps = 464.657686 (excluding connections establishing)
#30个session,只读性能
./pgbench -h 192.168.10.156 -U pgbench -c 30 -T 300 -r pgbench -S
Password: 
starting vacuum...end.
transaction type: <builtin: select only>
scaling factor: 714
query mode: simple
number of clients: 30
number of threads: 1
duration: 300 s
number of transactions actually processed: 1109351
latency average = 8.113 ms
tps = 3697.755242 (including connections establishing)
tps = 3697.798580 (excluding connections establishing)
script statistics:
 - statement latencies in milliseconds:
         0.002  \set aid random(1, 100000 * :scale)
         8.105  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;

#40个session,读写性能
./pgbench -h 192.168.10.156 -U pgbench -c 40 -T 300 -r pgbench 
Password: 
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 714
query mode: simple
number of clients: 40
number of threads: 1
duration: 300 s
number of transactions actually processed: 140924
latency average = 85.404 ms
tps = 468.363265 (including connections establishing)
tps = 468.368936 (excluding connections establishing)
#40个session,只读性能
./pgbench -h 192.168.10.156 -U pgbench -c 40 -T 300 -r pgbench -S 
Password: 
starting vacuum...end.
transaction type: <builtin: select only>
scaling factor: 714
query mode: simple
number of clients: 40
number of threads: 1
duration: 300 s
number of transactions actually processed: 985425
latency average = 12.178 ms
tps = 3284.584917 (including connections establishing)
tps = 3284.623497 (excluding connections establishing)
script statistics:
 - statement latencies in milliseconds:
         0.002  \set aid random(1, 100000 * :scale)
        12.168  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;

#60个session,读写性能
./pgbench -h 192.168.10.156 -U pgbench -c 60 -T 300 -r pgbench  
Password: 
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 714
query mode: simple
number of clients: 60
number of threads: 1
duration: 300 s
number of transactions actually processed: 159822
latency average = 113.348 ms
tps = 529.341550 (including connections establishing)
tps = 529.347960 (excluding connections establishing)
#60个session,只读性能
./pgbench -h 192.168.10.156 -U pgbench -c 60 -T 300 -r pgbench -S 
Password: 
starting vacuum...end.
transaction type: <builtin: select only>
scaling factor: 714
query mode: simple
number of clients: 60
number of threads: 1
duration: 300 s
number of transactions actually processed: 919073
latency average = 19.587 ms
tps = 3063.331202 (including connections establishing)
tps = 3063.367406 (excluding connections establishing)
script statistics:
 - statement latencies in milliseconds:
         0.002  \set aid random(1, 100000 * :scale)
        19.568  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;

#80个session,读写性能
./pgbench -h 192.168.10.156 -U pgbench -c 80 -T 300 -r pgbench 
Password: 
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 714
query mode: simple
number of clients: 80
number of threads: 1
duration: 300 s
number of transactions actually processed: 153965
latency average = 155.949 ms
tps = 512.986960 (including connections establishing)
tps = 512.993305 (excluding connections establishing)
#80个session,只读性能
./pgbench -h 192.168.10.156 -U pgbench -c 80 -T 300 -r pgbench -S  
Password: 
starting vacuum...end.
transaction type: <builtin: select only>
scaling factor: 714
query mode: simple
number of clients: 80
number of threads: 1
duration: 300 s
number of transactions actually processed: 818840
latency average = 29.312 ms
tps = 2729.270760 (including connections establishing)
tps = 2729.304017 (excluding connections establishing)
script statistics:
 - statement latencies in milliseconds:
         0.002  \set aid random(1, 100000 * :scale)
        29.278  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;

#100个session,读写性能
./pgbench -h 192.168.10.156 -U pgbench -c 100 -T 300 -r pgbench 
Password: 
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 714
query mode: simple
number of clients: 100
number of threads: 1
duration: 300 s
number of transactions actually processed: 175622
latency average = 173.804 ms
tps = 575.360072 (including connections establishing)
tps = 575.366715 (excluding connections establishing)
#100个session,只读性能
./pgbench -h 192.168.10.156 -U pgbench -c 100 -T 300 -r pgbench -S
Password: 
starting vacuum...end.
transaction type: <builtin: select only>
scaling factor: 714
query mode: simple
number of clients: 100
number of threads: 1
duration: 300 s
number of transactions actually processed: 701231
latency average = 42.786 ms
tps = 2337.210651 (including connections establishing)
tps = 2337.237060 (excluding connections establishing)
script statistics:
 - statement latencies in milliseconds:
         0.002  \set aid random(1, 100000 * :scale)
        42.731  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;