Re: how to do profile for pg?

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: "jacktby(at)gmail(dot)com" <jacktby(at)gmail(dot)com>
Subject: Re: how to do profile for pg?
Date: 2023-09-21 14:02:59
Message-ID: CAJ7c6TNM_c5_QpwZnCWEcuKvL_oVEkwH3bzvDOHYDQsFyRbe_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi jacktby,

PostgreSQL is literally a large and complicated program in C. Thus it
can be profiled as such. E.g. you can use `perf` and build flamegraphs
using `perf record`. Often pgbench is an adequate tool to compare
before and after results.There are many other tools available
depending on what exactly you want to profile - CPU, lock contention,
disk I/O, etc. People write books (plural) on the subject. Personally
I would recommend "System Performance, Enterprise and the Cloud, 2nd
Edition" and "BPF Performance Tools" by Brendan Gregg.

--
Best regards,
Aleksander Alekseev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jacktby@gmail.com 2023-09-21 14:22:48 Re: how to do profile for pg?
Previous Message Ashutosh Bapat 2023-09-21 13:51:30 Re: Infinite Interval