环境

  • Red Hat Enterprise Linux 6.6
  • Red Hat Enterprise Linux 7
  • Performance Co-pilot(PCP)

问题

  • What are the metrics of PCP required to compare the performance of postgresql in two different RHEL systems ?
  • How to compare performance of postgresql DB based on PCP ?

决议

  • There are almost 200+ metrics available for postgresql. To check the available metrics run the below command,

​Raw​

# pminfo -T -d postgresql

  • To know the details of the metrics refer the Postgresql documentation.
  • As far as passive measurements go, you can check for CPU usage, memory usage, shared_buffers usage, etc., but none of these are guaranteed to directly reflect the SQL performance i.e., CPU usage might be higher, but that's because the IO part was optimized and can now do twice as much work. Meaning you need a SQL-based testing mechanism.
  • The obvious limitations of benchmarking apply here as well - you need to know the real workload in order to have a meaningful benchmark. If the use is serving small chunks of read-mostly data to a web server, don't put too much value into heavy sequential write tests. If the use is based on a single user, benchmark that and not a 1000-user scenario, each with many open transactions. If the focus is on full text indexes, test that and not a surrogate-key-only scenario.