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

José Roberto Emerich Junior jremerich at gmail.com
Thu Sep 19 04:00:48 JST 2019


Em ter, 17 de set de 2019 às 06:29, Tatsuo Ishii <ishii at sraoss.co.jp>
escreveu:

> > 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.
>

I tried this, but I need to put process by process to monitor all pool. I
want a way to get info from all process in just one command, if it's
possible...


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

Nice!


>
> > - A metric that show the query execution time
>
> It's not available today, not terrybly hard to implement, though.
>

Nice!


>
> > - 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
>

Yes! Exactly this! With this I can monitor the throughput of the pgpool and
compare with the nodes.

How can I help to dev/test this or any other features? I'm really willing
to help improve this amazing tool!

Thanks!


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


-- 
Abraços!

=============================
José Roberto Emerich Junior
=============================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20190918/5f2b21d2/attachment.html>


More information about the pgpool-hackers mailing list