Skip to main content

pgagroal manual · Explanation · upstream 2.1.0

Performance

From the upstream pgagroal manual, rendered in the Elevarq documentation style. Single-sourced from the pinned pgagroal release.

\newpage

Performance is an important goal for [pgagroal][pgagroal] and effort have been made to make [pgagroal][pgagroal] scale and use a limited number of resources.

This chapter describes [pgagroal][pgagroal] performance characteristics and provides benchmarking results compared to other [PostgreSQL][postgresql] connection pool implementations.

Benchmarking Methodology

The [pgbench][pgbench] program was used in the performance runs. All pool configurations were made with performance in mind.

The runs were performed on [RHEL][rhel] 7.7 / EPEL / DevTools 8 based machines on 10G network. All connection pools were the latest versions as of January 14, 2020. [pgagroal][pgagroal] was using the epoll mode of [libev][libev].

Performance Results

Simple Protocol

This run uses:

pgbench -M simple

pgbench simple

Extended Protocol

This run uses:

pgbench -M extended

pgbench extended

Prepared Statements

This run uses:

pgbench -M prepared

pgbench prepared

Read-Only Workload

This run uses:

pgbench -S

pgbench readonly

Performance Tuning

Pipeline Selection

Choose the appropriate pipeline for your workload:

See Pipelines for detailed configuration.

Connection Pool Sizing

Optimal pool sizing depends on your workload:

System-Level Optimizations

Network Configuration

Memory Configuration

CPU Configuration

Monitoring Performance

Use the following metrics to monitor pgagroal performance:

See Prometheus for detailed monitoring setup.