but I need a quick demo to see the memory profiling or CPU profiling. I
hope a blog or a video which is better for me. Thanks.<br/><br/><br/><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="ntes-mailmaster-quote" style="padding-top: 1px; padding-bottom:
1px" >
<div style=" margin-top: 20px; margin-bottom: 12px; font-size: 14px;
line-height: 1.25; color: #89898c; " >---- Replied Message ----</div>
<div style=" margin-bottom: 12px; font-size: 13px; line-height: 1.25;
color: #2c2c2e; padding: 2px; border-radius: 8px; background-color: #f0f0f0; " >
<table width="100%" cellpadding="0" cellspacing="10" border="0">
<tr>
<td valign="top" style=" width: 4em; font-size: 13px;
line-height: 1.25; color: #89898c; white-space: nowrap; " >From</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25;
color: #2c2c2e; word-break: break-all; " ><a class="mail-from" style="color:
#1c83eb; text-decoration: none" href="mailto:aleksan...@timescale.com"
>Aleksander Alekseev<aleksan...@timescale.com></a></td>
</tr>
<tr>
<td valign="top" style=" width: 4em; font-size: 13px;
line-height: 1.25; color: #89898c; white-space: nowrap; " >Date</td>
<td class="mail-date" valign="top" style=" font-size: 13px;
line-height: 1.25; color: #2c2c2e; word-break: break-all; " >09/21/2023
22:02</td>
</tr>
<tr style="">
<td valign="top" style=" width: 4em; font-size: 13px;
line-height: 1.25; color: #89898c; " >To</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25;
color: #2c2c2e; word-break: break-all; " ><a class="mail-to" style="color:
#1c83eb; text-decoration: none"
href="mailto:pgsql-hackers@lists.postgresql.org"
>pgsql-hackers<pgsql-hackers@lists.postgresql.org></a></td>
</tr>
<tr style="">
<td valign="top" style=" width: 4em; font-size: 13px;
line-height: 1.25; color: #89898c; " >Cc</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25;
color: #2c2c2e; word-break: break-all; " ><a class="mail-cc" style="color:
#1c83eb; text-decoration: none" href="mailto:jack...@gmail.com"
>jack...@gmail.com</a></td>
</tr>
<tr>
<td valign="top" style=" width: 4em; font-size: 13px;
line-height: 1.25; color: #89898c; " >Subject</td>
<td class="mail-subject" valign="top" style=" font-size: 13px;
line-height: 1.25; color: #2c2c2e; word-break: break-all; " >Re: how to do
profile for pg?</td>
</tr>
</table>
</div>
<div>Hi jacktby,
<br/>
<br/>PostgreSQL is literally a large and complicated program in C. Thus it
<br/>can be profiled as such. E.g. you can use `perf` and build flamegraphs
<br/>using `perf record`. Often pgbench is an adequate tool to compare
<br/>before and after results.There are many other tools available
<br/>depending on what exactly you want to profile - CPU, lock contention,
<br/>disk I/O, etc. People write books (plural) on the subject. Personally
<br/>I would recommend "System Performance, Enterprise and the Cloud, 2nd
<br/>Edition" and "BPF Performance Tools" by Brendan Gregg.
<br/>
<br/>--
<br/>Best regards,
<br/>Aleksander Alekseev
<br/></div>
</div>
</body>
</html>