Re: CPU usage for queries, psycopg 2 vs 3

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: David Raymond <David(dot)Raymond(at)tomtom(dot)com>
Cc: "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: CPU usage for queries, psycopg 2 vs 3
Date: 2023-09-19 20:44:20
Message-ID: CA+mi_8Z0JkU0pu=dax5o3Hs0JUKf+9QOWbp3LsMJXLUk0Ke4Gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Hello David,

On Thu, 7 Sept 2023 at 14:17, David Raymond <David(dot)Raymond(at)tomtom(dot)com> wrote:
>
> > Could you please be so kind as to repeat your tests with psycopg 3.1.4?
> Tried with 3.1.4 and it has idle processor usage while waiting for the 8 results, just like psycopg2.
> Tried with 3.1.5 and it spikes up to 62% reported CPU usage while waiting for the 8 results, just like the current release.

I am not able to quickly investigate this issue, because I don't have
a Windows machine handy. However I would like to release 3.1.11 soon,
so I would like to merge this changeset, which should revert the wait
function to what was in 3.1.4 on Windows:

https://github.com/psycopg/psycopg/commit/36f70532c4451d04c0052c6eac4d05380159e809

Are you able to test it to verify that CPU usage is regular with this changeset?

Also please note that you sent your last, very informative, message,
to me only: maybe you want to send it to the ML?

If someone is able to look into this issue better, it would be some
welcome help. FYI, I've reported it at
https://github.com/psycopg/psycopg/issues/645

Cheers

-- Daniele

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message David Raymond 2023-09-20 14:27:27 RE: CPU usage for queries, psycopg 2 vs 3
Previous Message Daniele Varrazzo 2023-09-11 15:26:21 Re: CPU usage for queries, psycopg 2 vs 3