RE: Pg10 : Client Configuration for Parallelism ?

From: <laurent(dot)dechambe(at)orange(dot)com>
To: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: RE: Pg10 : Client Configuration for Parallelism ?
Date: 2019-04-17 11:26:07
Message-ID: 32656_1555500367_5CB70D4F_32656_413_67_A971FB43DFBC3D4C859ACB3316C9FF4632D98CF2@OPEXCAUBM42.corporate.adroot.infra.ftgroup
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I can see whether there is parallelism with pg_top or barely top on the server.

<DBEAVER>
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
38584 postgres 20 0 8863828 8.153g 8.151g R 100.0 3.2 1:23.01 postgres
10 root 20 0 0 0 0 S 0.3 0.0 88:07.26 rcu_sched

<BASIC JDBC>
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
46687 postgres 20 0 8864620 0.978g 0.977g S 38.5 0.4 0:01.16 postgres
46689 postgres 20 0 8864348 996.4m 995.1m R 38.5 0.4 0:01.16 postgres
46690 postgres 20 0 8864348 987.2m 985.8m S 38.5 0.4 0:01.16 postgres
46691 postgres 20 0 8864348 998436 997084 R 38.5 0.4 0:01.16 postgres
46692 postgres 20 0 8864348 982612 981260 S 38.5 0.4 0:01.16 postgres
46693 postgres 20 0 8864348 979.9m 978.6m R 38.5 0.4 0:01.16 postgres
46694 postgres 20 0 8864348 987.9m 986.6m S 38.5 0.4 0:01.16 postgres
46696 postgres 20 0 8864348 996864 995512 S 38.5 0.4 0:01.16 postgres
46688 postgres 20 0 8864348 982.3m 981.0m R 38.2 0.4 0:01.15 postgres
46695 postgres 20 0 8864348 986.9m 985.6m S 38.2 0.4 0:01.15 postgres
21323 postgres 20 0 8862788 8.096g 8.095g S 0.7 3.2 2:24.75 postgres
46682 postgres 20 0 157996 2596 1548 R 0.7 0.0 0:00.05 top

This is not a matter of cache. If I execute the queries in a different order the result will be the same : DBeaver query is longer.

There is something in documentation that says that there won't be parallelism if " The client sends an Execute message with a non-zero fetch count."
I am not sure what this sentence means.

-----Message d'origine-----
De : Andreas Kretschmer [mailto:andreas(at)a-kretschmer(dot)de]
Envoyé : mercredi 17 avril 2019 12:39
À : pgsql-performance(at)lists(dot)postgresql(dot)org
Objet : Re: Pg10 : Client Configuration for Parallelism ?

Am 17.04.19 um 11:51 schrieb laurent(dot)dechambe(at)orange(dot)com:
>
> Here are the logs (with log_error_verbosity = verbose) :
>
> <DBEAVER>
>
> 2019-04-17 11:30:42 CEST;35895;thedbuser;thedb;00000;LOG:  00000:
> execute <unnamed>: SELECT COUNT(1) FROM big_table
>
> 2019-04-17 11:30:42 CEST;35895;thedbuser;thedb;00000;LOCATION:
> exec_execute_message, postgres.c:1959
>
> 2019-04-17 11:31:08 CEST;35895;thedbuser;thedb;00000;LOG:  00000:
> duration: 25950.908 ms
>
> <BASIC JDBC>
>
> 2019-04-17 11:31:20 CEST;37257;thedbuser;thedb;00000;LOG:  00000:
> execute <unnamed>: SELECT COUNT(1) FROM big_table
>
> 2019-04-17 11:31:20 CEST;37257;thedbuser;thedb;00000;LOCATION:
> exec_execute_message, postgres.c:1959
>
> 2019-04-17 11:31:32 CEST;37257;thedbuser;thedb;00000;LOG:  00000:
> duration: 11459.943 ms
>
>
> <PGADMIN4>
>
> 2019-04-17 11:32:56 CEST;37324;thedbuser;thedb;00000;LOG:  00000:
> statement: SELECT COUNT(1) FROM big_table;
>
> 2019-04-17 11:32:56 CEST;37324;thedbuser;thedb;00000;LOCATION: 
> exec_simple_query, postgres.c:940
>
> 2019-04-17 11:33:08 CEST;37324;thedbuser;thedb;00000;LOG:  00000:
> duration: 11334.677 ms
>
>

That's compareable. The first one took more time, cold cache. The 2nd
and 3rd are faster, warm cache.

But: we can't see if the execution is paralell or not. If you want to
know that, install and use auto_explain.

Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Gunther Schadow 2019-04-17 11:55:14 Re: Pg10 : Client Configuration for Parallelism ?
Previous Message Andreas Kretschmer 2019-04-17 10:38:57 Re: Pg10 : Client Configuration for Parallelism ?