Postgresql

來自兆芯CPU與嵌入式係統
跳轉至: 導航搜索
 1 #1個session,讀寫性能
 2  ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench
 3 starting vacuum...end.
 4 transaction type: <builtin: TPC-B (sort of)>
 5 scaling factor: 714
 6 query mode: simple
 7 number of clients: 1
 8 number of threads: 1
 9 duration: 300 s
10 number of transactions actually processed: 62602
11 latency average = 4.792 ms
12 tps = 208.672446 (including connections establishing)
13 tps = 208.675069 (excluding connections establishing)
14 #1個session,隻讀性能
15 ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench -S  
16 Password: 
17 starting vacuum...end.
18 transaction type: <builtin: select only>
19 scaling factor: 714
20 query mode: simple
21 number of clients: 1
22 number of threads: 1
23 duration: 300 s
24 number of transactions actually processed: 294834
25 latency average = 1.018 ms
26 tps = 982.778611 (including connections establishing)
27 tps = 982.790906 (excluding connections establishing)
28 script 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
 3 starting vacuum...end.
 4 transaction type: <builtin: TPC-B (sort of)>
 5 scaling factor: 714
 6 query mode: simple
 7 number of clients: 30
 8 number of threads: 1
 9 duration: 300 s
10 number of transactions actually processed: 140570
11 latency average = 64.564 ms
12 tps = 464.652135 (including connections establishing)
13 tps = 464.657686 (excluding connections establishing)
14 #30個session,隻讀性能
15 ./pgbench -h 192.168.10.156 -U pgbench -c 30 -T 300 -r pgbench -S
16 Password: 
17 starting vacuum...end.
18 transaction type: <builtin: select only>
19 scaling factor: 714
20 query mode: simple
21 number of clients: 30
22 number of threads: 1
23 duration: 300 s
24 number of transactions actually processed: 1109351
25 latency average = 8.113 ms
26 tps = 3697.755242 (including connections establishing)
27 tps = 3697.798580 (excluding connections establishing)
28 script 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 
 3 Password: 
 4 starting vacuum...end.
 5 transaction type: <builtin: TPC-B (sort of)>
 6 scaling factor: 714
 7 query mode: simple
 8 number of clients: 40
 9 number of threads: 1
10 duration: 300 s
11 number of transactions actually processed: 140924
12 latency average = 85.404 ms
13 tps = 468.363265 (including connections establishing)
14 tps = 468.368936 (excluding connections establishing)
15 #40個session,隻讀性能
16 ./pgbench -h 192.168.10.156 -U pgbench -c 40 -T 300 -r pgbench -S 
17 Password: 
18 starting vacuum...end.
19 transaction type: <builtin: select only>
20 scaling factor: 714
21 query mode: simple
22 number of clients: 40
23 number of threads: 1
24 duration: 300 s
25 number of transactions actually processed: 985425
26 latency average = 12.178 ms
27 tps = 3284.584917 (including connections establishing)
28 tps = 3284.623497 (excluding connections establishing)
29 script 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  
 3 Password: 
 4 starting vacuum...end.
 5 transaction type: <builtin: TPC-B (sort of)>
 6 scaling factor: 714
 7 query mode: simple
 8 number of clients: 60
 9 number of threads: 1
10 duration: 300 s
11 number of transactions actually processed: 159822
12 latency average = 113.348 ms
13 tps = 529.341550 (including connections establishing)
14 tps = 529.347960 (excluding connections establishing)
15 #60個session,隻讀性能
16 ./pgbench -h 192.168.10.156 -U pgbench -c 60 -T 300 -r pgbench -S 
17 Password: 
18 starting vacuum...end.
19 transaction type: <builtin: select only>
20 scaling factor: 714
21 query mode: simple
22 number of clients: 60
23 number of threads: 1
24 duration: 300 s
25 number of transactions actually processed: 919073
26 latency average = 19.587 ms
27 tps = 3063.331202 (including connections establishing)
28 tps = 3063.367406 (excluding connections establishing)
29 script 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 
 3 Password: 
 4 starting vacuum...end.
 5 transaction type: <builtin: TPC-B (sort of)>
 6 scaling factor: 714
 7 query mode: simple
 8 number of clients: 80
 9 number of threads: 1
10 duration: 300 s
11 number of transactions actually processed: 153965
12 latency average = 155.949 ms
13 tps = 512.986960 (including connections establishing)
14 tps = 512.993305 (excluding connections establishing)
15 #80個session,隻讀性能
16 ./pgbench -h 192.168.10.156 -U pgbench -c 80 -T 300 -r pgbench -S  
17 Password: 
18 starting vacuum...end.
19 transaction type: <builtin: select only>
20 scaling factor: 714
21 query mode: simple
22 number of clients: 80
23 number of threads: 1
24 duration: 300 s
25 number of transactions actually processed: 818840
26 latency average = 29.312 ms
27 tps = 2729.270760 (including connections establishing)
28 tps = 2729.304017 (excluding connections establishing)
29 script 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 
 3 Password: 
 4 starting vacuum...end.
 5 transaction type: <builtin: TPC-B (sort of)>
 6 scaling factor: 714
 7 query mode: simple
 8 number of clients: 100
 9 number of threads: 1
10 duration: 300 s
11 number of transactions actually processed: 175622
12 latency average = 173.804 ms
13 tps = 575.360072 (including connections establishing)
14 tps = 575.366715 (excluding connections establishing)
15 #100個session,隻讀性能
16 ./pgbench -h 192.168.10.156 -U pgbench -c 100 -T 300 -r pgbench -S
17 Password: 
18 starting vacuum...end.
19 transaction type: <builtin: select only>
20 scaling factor: 714
21 query mode: simple
22 number of clients: 100
23 number of threads: 1
24 duration: 300 s
25 number of transactions actually processed: 701231
26 latency average = 42.786 ms
27 tps = 2337.210651 (including connections establishing)
28 tps = 2337.237060 (excluding connections establishing)
29 script 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;