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

José Roberto Emerich Junior jremerich at gmail.com
Thu Sep 12 22:46:27 JST 2019


Hi!

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 and child_max_connections
- A metric that show the query execution time
- 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

ahhhh, thank you for the fast return! You rock!

Em qua, 11 de set de 2019 às 19:46, Tatsuo Ishii <ishii at sraoss.co.jp>
escreveu:

> > Hi!
> >
> > I have 3 questions:
> >
> > 1. How can I get node occupation? I have pgpools in docker containers,
> and
> > I want to recycle the container when the occupation gets 95~99% to avoid
> > that the requests are denied.
>
> What is "occupation"? I am not familiar with docker.
>
> > 2. Is there any way to get the execution time from statements? My system
> > has some users in Oracle and anothers in Postgres .. We are migrating to
> > Postgres. But the requests to Postgres have twice the time to the same
> > request that Oracle, but the Postgres servers (1 master and 1 slave in
> > native stream replication) are more robust then the Oracle's and it has
> > resources left. We're using about 30% of memory and 10% of CPU. I want to
> > find out if the pgpool configuration are satisfactory by comparing the
> > response time from postgres node log and the response time on pgpool.
>
> There's no such a feature in pgpool. I think it's not terribly hard to
> implement it though.
>
> > 3. May I try to improve the tool by contribuiting in the project? How
> can I
> > do this?
>
> We mostly follow PostgreSQL's way. You can propose design of new
> feature in this mailing list to start discussion, along with patches
> against git repository if possible. Developers, including me, will
> reply to your postings to continue the discussion. Once developers
> agree with the patch, one of committers will commit/push the patch. We
> always welcome contributions to the project. Please don't hesitate to
> ask questions regarding contribution works.
>
> > I hope you made me understand.
> >
> > Thanks guys!
>
> 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/20190912/09931143/attachment.html>


More information about the pgpool-hackers mailing list