[pgpool-hackers: 3432] Re: How to get node occupation and execution time from statements?

Tatsuo Ishii ishii at sraoss.co.jp
Tue Sep 17 18:29:22 JST 2019


> By occupation I mean utilization.. Something that I can see that the pgpool
> are with '98% of connections slots in use'. I use the pgpool into a docker
> container, so I like to 'kill' the container when pgpool get 99% of
> utilization, so docker swarm (docker orchestrator) will launch a brand new
> container. When I do this, the vacuum in database nodes are more effective,
> the cache are released, I guarantee that all the requests will be executed
> because it will have free connections to use always. I do this 'kill'
> frequently by crontab, but it consume some host resources that are not so
> good. Basically I need to now if the pgpool has slot to receive more
> connections, if don't, I'll kill the container.
> 
> I like to propose the following features to monitoring:
> 
> - A metric that calculates the utilization of pgpool, calculating a
> percentage using num_init_children max_pool

Can be obainted from pcp_proc_info today.

> and child_max_connections

It's not available today, not terrybly hard to implement, though.

> - A metric that show the query execution time

It's not available today, not terrybly hard to implement, though.

> - A metric that show the 'tps', like in pg_top. So I can monitor how many
> transactions has been executed in the pool to measure the efficiency

It's not available today. Interesting question is, how do you define
tps (I guess you mean "query per second", rather than "transactions
per second" by tps) as it needs to define a duration of query
execution. "Tps" is essentially:

number_of_queries_executed / duration

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list