|
为什么用了pgpool-II后,处理能力下降严峻?续
接下来我把这个函数内容清空, 重新编译pgpool-II再次测试, 结果依旧
postgres@db6-> pgbench -M prepared -n -r -f ./test.sql -h 172.16.3.150 -p 9999 -U postgres -c 16 -j 8 -T 50 postgres
transaction type: Custom query
scaling factor: 1
query mode: prepared
number of clients: 16
number of threads: 8
duration: 50 s
number of transactions actually processed: 844017
tps = 16879.764062 (including connections establishing)
tps = 16884.295568 (excluding connections establishing)
statement latencies in milliseconds:
0.781028 select 1;
接下来做一下单SQL的所有函数跟踪.
postgres@db-172-16-3-150-> psql -h 127.0.0.1 -p 9999 -U postgres postgres
psql (9.4.1, server 9.3.5)
Type "help" for help.
postgres=#
定位到POOL的pid, 用于stap跟踪.
ps -ewf|grep pgpool
root 21962 21961 0 13:36 ? 00:00:00 pgpool: postgres postgres 127.0.0.1(44044) idle
稍微修改一下跟踪脚本
[root@db-172-16-3-150 ~]# vi trc.stp
global f_start[999999],f_stop[999999]
probe process("/opt/pgpool3.4.1/bin/pgpool" .function("*@/opt/soft_bak/pgpool-II-3.4.1/src/*" .call {
f_start[execname(), pid(), tid(), cpu()] = gettimeofday_ns()
}
probe process("/opt/pgpool3.4.1/bin/pgpool" .function("*@/opt/soft_bak/pgpool-II-3.4.1/src/*" .return {
t=gettimeofday_ns()
a=execname()
b=cpu()
c=pid()
d=pp()
e=tid()
if (f_start[a,c,e,b]) {
f_stop[a,d] <<< t - f_start[a,c,e,b]
printf("%d, %s\n", t - f_start[a,c,e,b], d)
# or you can printf("%s \n", $$locals$$)
}
}
probe end {
foreach ([a,d] in f_stop @sum - limit 50 ) {
printf("avg_ns:%d, sum_ns:%d, cnt:%d, execname:%s, pp:%s\n", @avg(f_stop[a,d]), @sum(f_stop[a,d]), @count(f_stop[a,d]), a, d)
}
exit()
}
跟踪过程中执行一条查询.
postgres=# select * from pg_class limit 1;
relname | relnamespace | reltype | reloftype | relowner | relam | relfilenode | reltablespace | relpages | reltuples | relallv
isible | reltoastrelid | reltoastidxid | relhasindex | relisshared | relpersistence | relkind | relnatts | relchecks | relhasoids |
relhaspkey | relhasrules | relhastriggers | relhassubclass | relispopulated | relfrozenxid | relminmxid | relacl
| reloptions
--------------+--------------+---------+-----------+----------+-------+-------------+---------------+----------+-----------+--------
-------+---------------+---------------+-------------+-------------+----------------+---------+----------+-----------+------------+-
-----------+-------------+----------------+----------------+----------------+--------------+------------+---------------------------
--+------------
pg_statistic | 11 | 10818 | 0 | 10 | 0 | 12629 | 0 | 15 | 388 |
15 | 2840 | 0 | t | f | p | r | 26 | 0 | f |
f | f | f | f | t | 1800 | 1 | {postgres=arwdDxt/postgres
} |
(1 row)
Time: 2.566 ms
跟踪结果 :
[root@db-172-16-3-150 ~]# stap -vp 5 -DMAXSKIPPED=9999999 -DSTP_NO_OVERLOAD -DMAXTRYLOCK=100 ./trc.stp -x 21962
Pass 1: parsed user script and 116 library script(s) using 212508virt/40068res/3172shr/37728data kb, in 320usr/30sys/355real ms.
Pass 2: analyzed script: 937 probe(s), 7 function(s), 4 embed(s), 2 global(s) using 218660virt/47212res/4168shr/43880data kb, in 190usr/80sys/345real ms.
Pass 3: translated to C into "/tmp/stapX1vB5l/stap_3d39e5129acf59add49b6bf0e6dbd2cb_420727_src.c" using 218668virt/47752res/4512shr/43888data kb, in 100usr/70sys/174real ms.
Pass 4: compiled C into "stap_3d39e5129acf59add49b6bf0e6dbd2cb_420727.ko" in 2570usr/350sys/2866real ms.
Pass 5: starting run.
5768, process("/opt/pgpool3.4.1/bin/pgpool" .function("core_yylex_init@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:3279" .return
4786, process("/opt/pgpool3.4.1/bin/pgpool" .function("core_yyensure_buffer_stack@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:2945" .return
10659, process("/opt/pgpool3.4.1/bin/pgpool" .function("core_yy_switch_to_buffer@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:2740" .return
16177, process("/opt/pgpool3.4.1/bin/pgpool").function("core_yy_scan_buffer@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:2995").return
22334, process("/opt/pgpool3.4.1/bin/pgpool").function("scanner_init@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.l:1070").return
4711, process("/opt/pgpool3.4.1/bin/pgpool").function("parser_init@/opt/soft_bak/pgpool-II-3.4.1/src/parser/gram.y:14022").return
6561, process("/opt/pgpool3.4.1/bin/pgpool").function("ScanKeywordLookup@/opt/soft_bak/pgpool-II-3.4.1/src/parser/kwlookup.c:38").return
12141, process("/opt/pgpool3.4.1/bin/pgpool").function("core_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:1325").return
17366, process("/opt/pgpool3.4.1/bin/pgpool").function("base_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:108").return
4026, process("/opt/pgpool3.4.1/bin/pgpool").function("core_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:1325").return
8694, process("/opt/pgpool3.4.1/bin/pgpool").function("base_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:108").return
4399, process("/opt/pgpool3.4.1/bin/pgpool").function("new_list@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:68").return
9963, process("/opt/pgpool3.4.1/bin/pgpool").function("lcons@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:264").return
3421, process("/opt/pgpool3.4.1/bin/pgpool").function("new_list@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:68").return
8066, process("/opt/pgpool3.4.1/bin/pgpool").function("lcons@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:264").return
4211, process("/opt/pgpool3.4.1/bin/pgpool").function("ScanKeywordLookup@/opt/soft_bak/pgpool-II-3.4.1/src/parser/kwlookup.c:38").return
8851, process("/opt/pgpool3.4.1/bin/pgpool").function("core_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:1325").return
13218, process("/opt/pgpool3.4.1/bin/pgpool").function("base_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:108").return
4509, process("/opt/pgpool3.4.1/bin/pgpool").function("ScanKeywordLookup@/opt/soft_bak/pgpool-II-3.4.1/src/parser/kwlookup.c:38").return
4511, process("/opt/pgpool3.4.1/bin/pgpool").function("downcase_truncate_identifier@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scansup.c:131").return
10093, process("/opt/pgpool3.4.1/bin/pgpool").function("core_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:1325").return
14532, process("/opt/pgpool3.4.1/bin/pgpool").function("base_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:108").return
4516, process("/opt/pgpool3.4.1/bin/pgpool").function("ScanKeywordLookup@/opt/soft_bak/pgpool-II-3.4.1/src/parser/kwlookup.c:38").return
9213, process("/opt/pgpool3.4.1/bin/pgpool").function("core_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:1325").return
13574, process("/opt/pgpool3.4.1/bin/pgpool").function("base_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:108").return
4585, process("/opt/pgpool3.4.1/bin/pgpool").function("makeRangeVar@/opt/soft_bak/pgpool-II-3.4.1/src/parser/makefuncs.c:421").return
3432, process("/opt/pgpool3.4.1/bin/pgpool").function("new_list@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:68").return
7994, process("/opt/pgpool3.4.1/bin/pgpool").function("lcons@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:264").return
6101, process("/opt/pgpool3.4.1/bin/pgpool").function("process_integer_literal@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.l:1177").return
10490, process("/opt/pgpool3.4.1/bin/pgpool").function("core_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:1325").return
15001, process("/opt/pgpool3.4.1/bin/pgpool").function("base_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:108").return
4647, process("/opt/pgpool3.4.1/bin/pgpool").function("makeIntConst@/opt/soft_bak/pgpool-II-3.4.1/src/parser/gram.y:13370").return
4495, process("/opt/pgpool3.4.1/bin/pgpool").function("core_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:1325").return
9066, process("/opt/pgpool3.4.1/bin/pgpool").function("base_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:108").return
3499, process("/opt/pgpool3.4.1/bin/pgpool").function("new_list@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:68").return
8153, process("/opt/pgpool3.4.1/bin/pgpool").function("lcons@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:264").return
3497, process("/opt/pgpool3.4.1/bin/pgpool").function("lcons@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:264").return
4836, process("/opt/pgpool3.4.1/bin/pgpool").function("list_nth@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:415").return
3732, process("/opt/pgpool3.4.1/bin/pgpool").function("list_nth@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:415").return
4430, process("/opt/pgpool3.4.1/bin/pgpool").function("list_concat@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:326").return
9653, process("/opt/pgpool3.4.1/bin/pgpool").function("insertSelectOptions@/opt/soft_bak/pgpool-II-3.4.1/src/parser/gram.y:13588").return
3565, process("/opt/pgpool3.4.1/bin/pgpool").function("new_list@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:68").return
8187, process("/opt/pgpool3.4.1/bin/pgpool").function("lcons@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:264").return
3923, process("/opt/pgpool3.4.1/bin/pgpool").function("core_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:1325").return
8453, process("/opt/pgpool3.4.1/bin/pgpool").function("base_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:108").return
14031, process("/opt/pgpool3.4.1/bin/pgpool").function("base_yyparse@/opt/soft_bak/pgpool-II-3.4.1/src/parser/gram.c:20532").return
4695, process("/opt/pgpool3.4.1/bin/pgpool").function("scanner_finish@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.l:1108").return
10165, process("/opt/pgpool3.4.1/bin/pgpool").function("raw_parser@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:49").return
6052, process("/opt/pgpool3.4.1/bin/pgpool").function("initStringInfo@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:47").return
15669, process("/opt/pgpool3.4.1/bin/pgpool").function("makeStringInfo@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:29").return
4255, process("/opt/pgpool3.4.1/bin/pgpool").function("initStringInfo@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:47").return
13428, process("/opt/pgpool3.4.1/bin/pgpool").function("makeStringInfo@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:29").return
4565, process("/opt/pgpool3.4.1/bin/pgpool").function("appendStringInfoChar@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:174").return
3760, process("/opt/pgpool3.4.1/bin/pgpool").function("initStringInfo@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:47").return
3342, process("/opt/pgpool3.4.1/bin/pgpool").function("initStringInfo@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:47").return
4465, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3308, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3455, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3250, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3340, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3286, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3327, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3306, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3298, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3282, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3337, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3260, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3352, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3295, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3308, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3284, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3306, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3278, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3330, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3286, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3291, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3290, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3304, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3284, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
7861, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:355").return
12794, process("/opt/pgpool3.4.1/bin/pgpool").function("pg_vsnprintf@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:202").return
17946, process("/opt/pgpool3.4.1/bin/pgpool").function("appendStringInfoVA@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:114").return
3430, process("/opt/pgpool3.4.1/bin/pgpool").function("initStringInfo@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:47").return
3286, process("/opt/pgpool3.4.1/bin/pgpool").function("initStringInfo@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:47").return
3300, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3314, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3316, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3324, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3280, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3328, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3286, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3292, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3257, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3352, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3282, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3306, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3283, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3330, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3286, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3288, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3292, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3294, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3278, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3300, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3276, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3328, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3289, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3268, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3347, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3296, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3280, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3301, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3276, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3329, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
3286, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
7872, process("/opt/pgpool3.4.1/bin/pgpool").function("dopr@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:355").return
12239, process("/opt/pgpool3.4.1/bin/pgpool").function("pg_vsnprintf@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:202").return
16750, process("/opt/pgpool3.4.1/bin/pgpool").function("appendStringInfoVA@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:114").return
^C
avg_ns:3323, sum_ns:182786, cnt:55, execname gpool, pp rocess("/opt/pgpool3.4.1/bin/pgpool").function("dopr_outch@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:1024").return
avg_ns:12488, sum_ns:99904, cnt:8, execname gpool, pp rocess("/opt/pgpool3.4.1/bin/pgpool").function("base_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:108").return
avg_ns:7904, sum_ns:63232, cnt:8, execname gpool, pp rocess("/opt/pgpool3.4.1/bin/pgpool").function("core_yylex@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:1325").return
avg_ns:7643, sum_ns:45860, cnt:6, execname gpool, pp rocess("/opt/pgpool3.4.1/bin/pgpool").function("lcons@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:264").return
avg_ns:17348, sum_ns:34696, cnt:2, execname gpool, pp rocess("/opt/pgpool3.4.1/bin/pgpool").function("appendStringInfoVA@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:114").return
avg_ns:14548, sum_ns:29097, cnt:2, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("makeStringInfo@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:29").return
avg_ns:12516, sum_ns:25033, cnt:2, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("pg_vsnprintf@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:202").return
avg_ns:4020, sum_ns:24125, cnt:6, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("initStringInfo@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:47").return
avg_ns:22334, sum_ns:22334, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("scanner_init@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.l:1070").return
avg_ns:4949, sum_ns:19797, cnt:4, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("ScanKeywordLookup@/opt/soft_bak/pgpool-II-3.4.1/src/parser/kwlookup.c:38").return
avg_ns:3663, sum_ns:18316, cnt:5, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("new_list@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:68").return
avg_ns:16177, sum_ns:16177, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("core_yy_scan_buffer@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:2995").return
avg_ns:7866, sum_ns:15733, cnt:2, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("dopr@/opt/soft_bak/pgpool-II-3.4.1/src/parser/snprintf.c:355").return
avg_ns:14031, sum_ns:14031, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("base_yyparse@/opt/soft_bak/pgpool-II-3.4.1/src/parser/gram.c:20532").return
avg_ns:10659, sum_ns:10659, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("core_yy_switch_to_buffer@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:2740").return
avg_ns:10165, sum_ns:10165, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("raw_parser@/opt/soft_bak/pgpool-II-3.4.1/src/parser/parser.c:49").return
avg_ns:9653, sum_ns:9653, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("insertSelectOptions@/opt/soft_bak/pgpool-II-3.4.1/src/parser/gram.y:13588").return
avg_ns:4284, sum_ns:8568, cnt:2, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("list_nth@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:415").return
avg_ns:6101, sum_ns:6101, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("process_integer_literal@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.l:1177").return
avg_ns:5768, sum_ns:5768, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("core_yylex_init@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:3279").return
avg_ns:4786, sum_ns:4786, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("core_yyensure_buffer_stack@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.c:2945").return
avg_ns:4711, sum_ns:4711, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("parser_init@/opt/soft_bak/pgpool-II-3.4.1/src/parser/gram.y:14022").return
avg_ns:4695, sum_ns:4695, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("scanner_finish@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scan.l:1108").return
avg_ns:4647, sum_ns:4647, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("makeIntConst@/opt/soft_bak/pgpool-II-3.4.1/src/parser/gram.y:13370").return
avg_ns:4585, sum_ns:4585, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("makeRangeVar@/opt/soft_bak/pgpool-II-3.4.1/src/parser/makefuncs.c:421").return
avg_ns:4565, sum_ns:4565, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("appendStringInfoChar@/opt/soft_bak/pgpool-II-3.4.1/src/parser/stringinfo.c:174").return
avg_ns:4511, sum_ns:4511, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("downcase_truncate_identifier@/opt/soft_bak/pgpool-II-3.4.1/src/parser/scansup.c:131").return
avg_ns:4430, sum_ns:4430, cnt:1, execname:pgpool, pp:process("/opt/pgpool3.4.1/bin/pgpool").function("list_concat@/opt/soft_bak/pgpool-II-3.4.1/src/parser/list.c:326").return
Pass 5: run completed in 10usr/14470sys/20108real ms.
时间总和 698965us = 0.698965 毫秒. 也可以理解为pgpool-II处理一个查询时, 自身的开心约0.698965毫秒, (实际上应该略小, 因为stap计算时间时也有一定的开销, 在这个基础上, 最后给个经验值约 0.5毫秒左右吧.)
(和本文前面测试中的0.765831-0.252501 = 0.51333毫秒差不多)
这部分时间是select * from pg_class limit 1; 在pgpool-II代码中的耗费. |
|