Re: how to do profile for pg? - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: how to do profile for pg?
Date
Msg-id CAJ7c6TMNk8J4OB-9_nzeepHUKGwRdU2+4FSjdhtiGO0n+f0yTA@mail.gmail.com
Whole thread Raw
In response to Re: how to do profile for pg?  ("jacktby@gmail.com" <jacktby@gmail.com>)
List pgsql-hackers
Hi,

> 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
 

Well, then I guess you better hurry with reading these books :)

There is no shortcut I'm afraid. One of the first things that Brendan
explains is how to do benchmarks *prorerly*. This is far from being
trivial and often you may be measuring not something you want. E.g.
you may think that you are profiling CPU while in fact there is a lock
contention and CPU is not even a bottleneck. Another thing worth
considering which is often neglected is to make sure your optimization
doesn't cause any digradations under different workloads.

Last but not least you should be mindful of different configuration
parameters of PostgreSQL - shared_buffers, synchronous_commit = off,
to name a few, and also understand the architecture of the system
quite well. In this context I recommend Database System Concepts, 7th
Edition by Avi Silberschatz et al and also CMU Intro to Database
Systems [1] and CMU Advanced Database Systems [2] courses.

[1]: https://www.youtube.com/playlist?list=PLSE8ODhjZXjZaHA6QcxDfJ0SIWBzQFKEG
[2]: https://www.youtube.com/playlist?list=PLSE8ODhjZXjYzlLMbX3cR0sxWnRM7CLFn

-- 
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: New WAL record to detect the checkpoint redo location
Next
From: Alvaro Herrera
Date:
Subject: Re: how to do profile for pg?