Postgresql

来自兆芯CPU与嵌入式系统
跳到导航 跳到搜索
 1#1个session,读写性能
 2 ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench
 3starting vacuum...end.
 4transaction type: <builtin: TPC-B (sort of)>
 5scaling factor: 714
 6query mode: simple
 7number of clients: 1
 8number of threads: 1
 9duration: 300 s
10number of transactions actually processed: 62602
11latency average = 4.792 ms
12tps = 208.672446 (including connections establishing)
13tps = 208.675069 (excluding connections establishing)
14#1个session,只读性能
15./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench -S  
16Password: 
17starting vacuum...end.
18transaction type: <builtin: select only>
19scaling factor: 714
20query mode: simple
21number of clients: 1
22number of threads: 1
23duration: 300 s
24number of transactions actually processed: 294834
25latency average = 1.018 ms
26tps = 982.778611 (including connections establishing)
27tps = 982.790906 (excluding connections establishing)
28script statistics:
29 - statement latencies in milliseconds:
30         0.003  \set aid random(1, 100000 * :scale)
31         1.010  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 1#30个session,读写性能
 2 ./pgbench -h 192.168.10.156 -U pgbench -c 30 -T 300 -r pgbench
 3starting vacuum...end.
 4transaction type: <builtin: TPC-B (sort of)>
 5scaling factor: 714
 6query mode: simple
 7number of clients: 30
 8number of threads: 1
 9duration: 300 s
10number of transactions actually processed: 140570
11latency average = 64.564 ms
12tps = 464.652135 (including connections establishing)
13tps = 464.657686 (excluding connections establishing)
14#30个session,只读性能
15./pgbench -h 192.168.10.156 -U pgbench -c 30 -T 300 -r pgbench -S
16Password: 
17starting vacuum...end.
18transaction type: <builtin: select only>
19scaling factor: 714
20query mode: simple
21number of clients: 30
22number of threads: 1
23duration: 300 s
24number of transactions actually processed: 1109351
25latency average = 8.113 ms
26tps = 3697.755242 (including connections establishing)
27tps = 3697.798580 (excluding connections establishing)
28script statistics:
29 - statement latencies in milliseconds:
30         0.002  \set aid random(1, 100000 * :scale)
31         8.105  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 1#40个session,读写性能
 2./pgbench -h 192.168.10.156 -U pgbench -c 40 -T 300 -r pgbench 
 3Password: 
 4starting vacuum...end.
 5transaction type: <builtin: TPC-B (sort of)>
 6scaling factor: 714
 7query mode: simple
 8number of clients: 40
 9number of threads: 1
10duration: 300 s
11number of transactions actually processed: 140924
12latency average = 85.404 ms
13tps = 468.363265 (including connections establishing)
14tps = 468.368936 (excluding connections establishing)
15#40个session,只读性能
16./pgbench -h 192.168.10.156 -U pgbench -c 40 -T 300 -r pgbench -S 
17Password: 
18starting vacuum...end.
19transaction type: <builtin: select only>
20scaling factor: 714
21query mode: simple
22number of clients: 40
23number of threads: 1
24duration: 300 s
25number of transactions actually processed: 985425
26latency average = 12.178 ms
27tps = 3284.584917 (including connections establishing)
28tps = 3284.623497 (excluding connections establishing)
29script statistics:
30 - statement latencies in milliseconds:
31         0.002  \set aid random(1, 100000 * :scale)
32        12.168  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 1#60个session,读写性能
 2./pgbench -h 192.168.10.156 -U pgbench -c 60 -T 300 -r pgbench  
 3Password: 
 4starting vacuum...end.
 5transaction type: <builtin: TPC-B (sort of)>
 6scaling factor: 714
 7query mode: simple
 8number of clients: 60
 9number of threads: 1
10duration: 300 s
11number of transactions actually processed: 159822
12latency average = 113.348 ms
13tps = 529.341550 (including connections establishing)
14tps = 529.347960 (excluding connections establishing)
15#60个session,只读性能
16./pgbench -h 192.168.10.156 -U pgbench -c 60 -T 300 -r pgbench -S 
17Password: 
18starting vacuum...end.
19transaction type: <builtin: select only>
20scaling factor: 714
21query mode: simple
22number of clients: 60
23number of threads: 1
24duration: 300 s
25number of transactions actually processed: 919073
26latency average = 19.587 ms
27tps = 3063.331202 (including connections establishing)
28tps = 3063.367406 (excluding connections establishing)
29script statistics:
30 - statement latencies in milliseconds:
31         0.002  \set aid random(1, 100000 * :scale)
32        19.568  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 1#80个session,读写性能
 2./pgbench -h 192.168.10.156 -U pgbench -c 80 -T 300 -r pgbench 
 3Password: 
 4starting vacuum...end.
 5transaction type: <builtin: TPC-B (sort of)>
 6scaling factor: 714
 7query mode: simple
 8number of clients: 80
 9number of threads: 1
10duration: 300 s
11number of transactions actually processed: 153965
12latency average = 155.949 ms
13tps = 512.986960 (including connections establishing)
14tps = 512.993305 (excluding connections establishing)
15#80个session,只读性能
16./pgbench -h 192.168.10.156 -U pgbench -c 80 -T 300 -r pgbench -S  
17Password: 
18starting vacuum...end.
19transaction type: <builtin: select only>
20scaling factor: 714
21query mode: simple
22number of clients: 80
23number of threads: 1
24duration: 300 s
25number of transactions actually processed: 818840
26latency average = 29.312 ms
27tps = 2729.270760 (including connections establishing)
28tps = 2729.304017 (excluding connections establishing)
29script statistics:
30 - statement latencies in milliseconds:
31         0.002  \set aid random(1, 100000 * :scale)
32        29.278  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
 1#100个session,读写性能
 2./pgbench -h 192.168.10.156 -U pgbench -c 100 -T 300 -r pgbench 
 3Password: 
 4starting vacuum...end.
 5transaction type: <builtin: TPC-B (sort of)>
 6scaling factor: 714
 7query mode: simple
 8number of clients: 100
 9number of threads: 1
10duration: 300 s
11number of transactions actually processed: 175622
12latency average = 173.804 ms
13tps = 575.360072 (including connections establishing)
14tps = 575.366715 (excluding connections establishing)
15#100个session,只读性能
16./pgbench -h 192.168.10.156 -U pgbench -c 100 -T 300 -r pgbench -S
17Password: 
18starting vacuum...end.
19transaction type: <builtin: select only>
20scaling factor: 714
21query mode: simple
22number of clients: 100
23number of threads: 1
24duration: 300 s
25number of transactions actually processed: 701231
26latency average = 42.786 ms
27tps = 2337.210651 (including connections establishing)
28tps = 2337.237060 (excluding connections establishing)
29script statistics:
30 - statement latencies in milliseconds:
31         0.002  \set aid random(1, 100000 * :scale)
32        42.731  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;