Skip to content

pg_stat_statements performance penalty on Intel much higher than on AMD

During experimenting with Postgres AI assistant we found TPS performance penalty on Intel C3 machines in comparison to AMD C3D in GCP caused by pg_stat_statements extension.

experiment 1:

  1. provision GCP VMs c3-stadard-176 and c3d-standard-180 with 10Tb SSD pd and Ubuntu 22.04
  2. install postgres 16 from official repo
  3. change shared buffers to 128Gb, max_connections to 2000, rest of postgres and OS config by default
  4. initialise pgbench with scale factor 1000 pgbench -i -s 1000 pgbench
  5. run pgbench selects only load pgbench -j $c -c $c -S pgbench -T120 -n -P10

experiment 2:

  1. provision GCP VMs c3-stadard-176 and c3d-standard-180 with 10Tb SSD pd and Ubuntu 22.04
  2. install postgres 16 from official repo
  3. change shared buffers to 128Gb, max_connections to 2000, ,rest of postgres and OS config by default
  4. initialise pgbench with scale factor 1000 pgbench -i -s 1000 pgbench
  5. run pgbench selects only load pgbench -j $c -c $c -S pgbench -T120 -n -P10
Edited by Dmitry Fomin