Skip to content

Collect system artifacts

Vitaliy Kukharik requested to merge system-artifacts into master

Now we are collecting system information that can be useful for analysis after running tests.

  1. uname -a: This command provides general information about the system, including the kernel name, its version, as well as information about the machine and operating system.

  2. lscpu: This command outputs detailed information about the CPU, including its architecture, number of cores, threads, frequency, and more.

  3. cat /proc/meminfo: Provides detailed information about the system's memory, including total volume, free and used memory, as well as cache and buffers.

  4. lsblk: Displays information about all available block devices (such as hard drives and their partitions).

  5. df -h: Shows information about disk space usage in a readable format (using units like GB, MB).

  6. sysctl -a: Outputs all current system kernel parameters.

  7. sysctl -p: Displays kernel parameters that have been changed relative to default values. This can be useful for identifying any settings that have been configured to optimize PostgreSQL performance.

  8. cat /sys/kernel/mm/transparent_hugepage/enabled: Shows the current state of transparent huge pages, which is important for database performance optimization.

  9. ps -auxf: Provides a snapshot of all current processes in the system in a tree format.

  10. Observation of system resources using sar

    • start_sar_observation() and stop_sar_observation() functions.
  11. Observation of processes using pidstat

    • start_pidstat_observation() and stop_pidstat_observation() functions.
ls -l /tmp/ARTIFACTS/2023-12-25-2023_wal_compression_ON/ | grep .txt
-rw-r--r-- 1 root root   2663 Dec 25 20:23 cpu_info.txt
-rw-r--r-- 1 root root    465 Dec 25 20:23 disk_info.txt
-rw-r--r-- 1 root root    371 Dec 25 20:23 disk_space_info.txt
-rw-r--r-- 1 root root  38515 Dec 25 20:23 kernel_parameters.txt
-rw-r--r-- 1 root root    476 Dec 25 20:23 kernel_parameters_non_default.txt
-rw-r--r-- 1 root root   1503 Dec 25 20:23 mem_info.txt
-rw-r--r-- 1 root root     17 Dec 25 20:23 pgbouncer_version.txt
-rw-r--r-- 1 root root  14160 Dec 25 20:23 processes_snapshot.txt
-rw-r--r-- 1 root root    136 Dec 25 20:23 system_info.txt
-rw-r--r-- 1 root root     23 Dec 25 20:23 transparent_hugepage_info.txt
ls -l /tmp/ARTIFACTS/2023-12-26-2054_wal_compression_OFF/ | grep sar
-rw-r--r-- 1 root root  25371 Dec 26 20:54 sar_all_cpu_usage.txt
-rw-r--r-- 1 root root   5126 Dec 26 20:54 sar_cpu_usage.txt
-rw-r--r-- 1 root root  31808 Dec 26 20:54 sar_disk_usage.txt
-rw-r--r-- 1 root root   7772 Dec 26 20:54 sar_memory_usage.txt
-rw-r--r-- 1 root root  12836 Dec 26 20:54 sar_network_usage.txt
ls -l /tmp/ARTIFACTS/2023-12-26-2048_wal_compression_OFF/ | grep pidstat
-rw-r--r-- 1 root root 100292 Dec 26 20:48 pidstat_cpu_usage.txt
-rw-r--r-- 1 root root  90112 Dec 26 20:48 pidstat_disk_usage.txt
-rw-r--r-- 1 root root  97616 Dec 26 20:48 pidstat_memory_usage.txt

Additionally:

  • PgBouncer version (if installed)
  • Remove PGBENCH_SCALE_FACTOR variable
  • Add PGBENCH_INIT_COMMAND variable
  • Add 'info' function and improve formatting
  • Add 'prefixes' function (alias for ts)
  • Add '_PSQL' function (alias for psql)
  • Code refactoring.
Edited by Vitaliy Kukharik

Merge request reports