public inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedRe: Load test
2+ messages / 2 participants
[nested] [flat]
* Re: Load test
@ 2026-05-07 15:08 kurt thepw.com <kurt@thepw.com>
2026-05-07 17:28 ` Re: Load test Raj <rajeshkumar.dba09@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: kurt thepw.com @ 2026-05-07 15:08 UTC (permalink / raw)
To: Subramanian,Ramachandran <ramachandran.subramanian@alte-leipziger.de>; Raj <rajeshkumar.dba09@gmail.com>; Shubhang Joshi <shubhangjoshi2405@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
The pgBadger log analysis tool may provide useful information:
https://www.postgresql.org/about/news/pgbadger-v124-released-2772/
________________________________
From: Subramanian,Ramachandran <ramachandran.subramanian@alte-leipziger.de>
Sent: Thursday, May 7, 2026 4:12 AM
To: Raj <rajeshkumar.dba09@gmail.com>; Shubhang Joshi <shubhangjoshi2405@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: AW: Load test
I am a newbie, just sharing what I have learnt so far.
Try creating queries on pg_stat_activity and run them periodically during the load test to get the metrics. ( Maybe append to a CSV file that you can import into excel and analyze later ) .
If you store sufficient pg_stat_statement ( based on your pg_stat_statement.max value in your conf file ) , you may be able analyze more details after the load test is done.
Clean up your pg_stat_statement
select pg_stat_statements_reset();
Set the parm to a higher value than the number of SQLs you expect to run during the load test. Restart your instance.
Let the load test finish.
Look into your pg_stat_statements for all kinds of beautiful metrics.
Clean up your pg_stat_statements if not needed anymore, reset your max value and restart the instance.
You can build on some basic queries like this
SELECT pid,
backend_type
FROM pg_stat_activity
ORDER BY pid, backend_type ;
SELECT pid,
usename,
datname,
client_addr,
application_name,
state,
wait_event_type,
wait_event,
backend_start,
query_start,
now() - query_start AS runtime,
query
FROM pg_stat_activity
WHERE state = 'active'
ORDER BY runtime DESC;
SELECT pid,
now() - query_start AS duration,
usename,
query
FROM pg_stat_activity
WHERE state = 'active'
AND now() - query_start > interval '10 seconds'
ORDER BY duration DESC;
~
Freundliche Grüße
i. A. Ramachandran Subramanian
Zentralbereich Informationstechnologie
Alte Leipziger Lebensversicherung a. G.
Hallesche Krankenversicherung a. G.
______________________
ALH Gruppe
Alte Leipziger-Platz 1, 61440 Oberursel
Tel: +49 (6171) 66-4882
Fax: +49 (6171) 66-800-4882
E-Mail: ramachandran.subramanian@alte-leipziger.de
www.alte-leipziger.de<https://www.alte-leipziger.de;
www.hallesche.de<https://www.hallesche.de;
Alte Leipziger Lebensversicherung a. G., Alte Leipziger-Platz 1, 61440 Oberursel
Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Frank Kettnaker, Dr. Jochen Kriegmeier, Alexander Mayer, Christian Pape, Wiltrud Pekarek, Udo Wilcsek
Sitz Oberursel (Taunus) · Rechtsform VVaG · Amtsgericht Bad Homburg v. d. H. HRB 1583 · USt.-IdNr. DE 114106814
Hallesche Krankenversicherung a. G., Löffelstraße 34-38, 70597 Stuttgart
Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Frank Kettnaker, Dr. Jochen Kriegmeier, Alexander Mayer, Christian Pape, Wiltrud Pekarek, Udo Wilcsek
Sitz Stuttgart · Rechtsform VVaG · Amtsgericht Stuttgart HRB 2686 · USt.-IdNr. DE 147802285
Beiträge zu privaten Kranken- und Pflegekrankenversicherungen unterliegen nicht der Versicherungsteuer (§ 4 (1) Nr. 5 b VersStG) · Versicherungsleistungen sowie Umsätze aus Versicherungsvertreter-/Maklertätigkeiten sind umsatzsteuerfrei
Pflichtangaben<https://www.alte-leipziger.de/impressum; der ALH Gruppe gemäß § 35a GmbHG bzw. § 80 AktG
Von: Raj <rajeshkumar.dba09@gmail.com>
Gesendet: Donnerstag, 7. Mai 2026 09:07
An: Shubhang Joshi <shubhangjoshi2405@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Betreff: Re: Load test
How do we check latency and throughput?
On Thu, 7 May 2026, 09:52 Shubhang Joshi, <shubhangjoshi2405@gmail.com<mailto:shubhangjoshi2405@gmail.com>> wrote:
Hi Raj,
During the load test, we should monitor the following key metrics:
- Query Performance: Latency and throughput.
- System Resources: CPU and memory utilization, disk I/O, and cache efficiency.
- Database Activity: Active connections and locking/blocking behavior.
- Logs: Any errors or anomalies observed.
Additionally, we will need to compare the baseline performance with the load test results to identify potential bottlenecks and areas for optimization.
Best regards,
Shubhang Joshi
On Wed, 6 May, 2026, 2:20 pm Raj, <rajeshkumar.dba09@gmail.com<mailto:rajeshkumar.dba09@gmail.com>> wrote:
Hi team,
What are things we (dba) need to monitor during load test by application team?
If how we monitor, is addon for me.
Thanks.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Load test
2026-05-07 15:08 Re: Load test kurt thepw.com <kurt@thepw.com>
@ 2026-05-07 17:28 ` Raj <rajeshkumar.dba09@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Raj @ 2026-05-07 17:28 UTC (permalink / raw)
To: kurt thepw.com <kurt@thepw.com>; +Cc: Subramanian,Ramachandran <ramachandran.subramanian@alte-leipziger.de>; Shubhang Joshi <shubhangjoshi2405@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>
Thanks
On Thu, 7 May 2026, 20:38 kurt thepw.com, <kurt@thepw.com> wrote:
> The pgBadger log analysis tool may provide useful information:
>
> https://www.postgresql.org/about/news/pgbadger-v124-released-2772/
> ------------------------------
> *From:* Subramanian,Ramachandran <
> ramachandran.subramanian@alte-leipziger.de>
> *Sent:* Thursday, May 7, 2026 4:12 AM
> *To:* Raj <rajeshkumar.dba09@gmail.com>; Shubhang Joshi <
> shubhangjoshi2405@gmail.com>
> *Cc:* Pgsql-admin <pgsql-admin@lists.postgresql.org>
> *Subject:* AW: Load test
>
>
> I am a newbie, just sharing what I have learnt so far.
>
>
>
>
>
> Try creating queries on pg_stat_activity and run them periodically during
> the load test to get the metrics. ( Maybe append to a CSV file that you can
> import into excel and analyze later ) .
>
>
>
>
>
> If you store sufficient pg_stat_statement ( based on your
> pg_stat_statement.max value in your conf file ) , you may be able analyze
> more details after the load test is done.
>
>
>
> Clean up your pg_stat_statement
>
> select pg_stat_statements_reset();
>
>
>
>
>
> Set the parm to a higher value than the number of SQLs you expect to run
> during the load test. Restart your instance.
>
>
>
>
>
> Let the load test finish.
>
>
>
>
>
> Look into your pg_stat_statements for all kinds of beautiful metrics.
>
>
>
>
>
> Clean up your pg_stat_statements if not needed anymore, reset your max
> value and restart the instance.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> You can build on some basic queries like this
>
>
>
>
>
>
>
> SELECT pid,
>
> backend_type
>
> FROM pg_stat_activity
>
> ORDER BY pid, backend_type ;
>
>
>
>
>
> SELECT pid,
>
> usename,
>
> datname,
>
> client_addr,
>
> application_name,
>
> state,
>
> wait_event_type,
>
> wait_event,
>
> backend_start,
>
> query_start,
>
> now() - query_start AS runtime,
>
> query
>
> FROM pg_stat_activity
>
> WHERE state = 'active'
>
> ORDER BY runtime DESC;
>
>
>
>
>
> SELECT pid,
>
> now() - query_start AS duration,
>
> usename,
>
> query
>
> FROM pg_stat_activity
>
> WHERE state = 'active'
>
> AND now() - query_start > interval '10 seconds'
>
> ORDER BY duration DESC;
>
> ~
>
>
>
>
>
>
>
>
>
>
>
> Freundliche Grüße
>
> *i. A. Ramachandran Subramanian*
>
> Zentralbereich Informationstechnologie
>
> Alte Leipziger Lebensversicherung a. G.
>
> Hallesche Krankenversicherung a. G.
>
> ______________________
>
> ALH Gruppe
> Alte Leipziger-Platz 1, 61440 Oberursel
> <https://www.google.com/maps/search/Alte+Leipziger-Platz+1,+61440+Oberursel?entry=gmail&source=g;
> Tel: +49 (6171) 66-4882
> Fax: +49 (6171) 66-800-4882
> E-Mail: ramachandran.subramanian@alte-leipziger.de
> www.alte-leipziger.de
> www.hallesche.de
>
> Alte Leipziger Lebensversicherung a. G., Alte Leipziger-Platz 1, 61440
> Oberursel
> <https://www.google.com/maps/search/Alte+Leipziger-Platz+1,+61440+Oberursel?entry=gmail&source=g;
>
> Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn
> (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Frank Kettnaker, Dr. Jochen
> Kriegmeier, Alexander Mayer, Christian Pape, Wiltrud Pekarek, Udo Wilcsek
>
> Sitz Oberursel (Taunus) · Rechtsform VVaG · Amtsgericht Bad Homburg v. d.
> H. HRB 1583 · USt.-IdNr. DE 114106814
>
> Hallesche Krankenversicherung a. G., Löffelstraße 34-38, 70597 Stuttgart
> <https://www.google.com/maps/search/L%C3%B6ffelstra%C3%9Fe+34-38,+70597+Stuttgart?entry=gmail&sou...;
>
> Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn
> (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Frank Kettnaker, Dr. Jochen
> Kriegmeier, Alexander Mayer, Christian Pape, Wiltrud Pekarek, Udo Wilcsek
>
> Sitz Stuttgart · Rechtsform VVaG · Amtsgericht Stuttgart HRB 2686 ·
> USt.-IdNr. DE 147802285
>
> Beiträge zu privaten Kranken- und Pflegekrankenversicherungen unterliegen
> nicht der Versicherungsteuer (§ 4 (1) Nr. 5 b VersStG) ·
> Versicherungsleistungen sowie Umsätze aus
> Versicherungsvertreter-/Maklertätigkeiten sind umsatzsteuerfrei
>
> Pflichtangaben <https://www.alte-leipziger.de/impressum; der ALH Gruppe
> gemäß § 35a GmbHG bzw. § 80 AktG
>
> *Von:* Raj <rajeshkumar.dba09@gmail.com>
> *Gesendet:* Donnerstag, 7. Mai 2026 09:07
> *An:* Shubhang Joshi <shubhangjoshi2405@gmail.com>
> *Cc:* Pgsql-admin <pgsql-admin@lists.postgresql.org>
> *Betreff:* Re: Load test
>
>
>
> How do we check latency and throughput?
>
> On Thu, 7 May 2026, 09:52 Shubhang Joshi, <shubhangjoshi2405@gmail.com>
> wrote:
>
> Hi Raj,
>
> During the load test, we should monitor the following key metrics:
>
> - Query Performance: Latency and throughput.
> - System Resources: CPU and memory utilization, disk I/O, and cache
> efficiency.
> - Database Activity: Active connections and locking/blocking behavior.
> - Logs: Any errors or anomalies observed.
>
> Additionally, we will need to compare the baseline performance with the
> load test results to identify potential bottlenecks and areas for
> optimization.
>
> Best regards,
> Shubhang Joshi
>
>
>
>
>
> On Wed, 6 May, 2026, 2:20 pm Raj, <rajeshkumar.dba09@gmail.com> wrote:
>
> Hi team,
>
>
>
> What are things we (dba) need to monitor during load test by application
> team?
>
>
>
> If how we monitor, is addon for me.
>
>
>
> Thanks.
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-05-07 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-05-07 15:08 Re: Load test kurt thepw.com <kurt@thepw.com>
2026-05-07 17:28 ` Raj <rajeshkumar.dba09@gmail.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox