Get the App
SLTechnology News&Howtos  ›  Database  › 

Performance Test and Analysis of pgbench

Shulou Source: shulou.com Published: 2022-05-31 15:06:33 10月03日 Update

The main content of this article is "pgbench performance Test and Analysis". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "pgbench performance Test and Analysis".

-- pgbench test performance pressure pgbench-I-s 2-F 80-h 192.168.81-p 5432-U pguser-d mydb--pgbench built-in test script is as follows [postgres@pgtest ~] $pgbench-b listAvailable builtin scripts: tpcb-like simple-update select-only--tpcb-like contains select update insert, other literally The default is tpcb-likepgbench-b simple-update-h 192.168.81-p 5432-U pguser mydbstarting vacuum...end.transaction type: scaling factor: 2query mode: simplenumber of clients: 1number of threads: 1number of transactions per client: 10number of transactions actually processed: 10/10latency average = 4.611 mstps = 216.853874 (including connections establishing) tps = 237.214382 (excluding connections establishing)-- two mixed testing methods 28 scale mixed test pgbench-b simple-update@2-b select-only@8-b tpcb@0-h 192.168.81-p 5432-U pguser mydb-- customizable script pgbench-f bench_script_for_select.sql-U pguser mydb-- can be weighted to execute the first script 3 times and the second 10 times 60 seconds pgbench-T 60-f bench_insert.sql@3-f bench_select.sql@10-U pguser mydb-- simulates 4 clients, each thing creates a new connection-Cpgbench-c 4-C-U pguser mydb-- outputs test results every two seconds-P-j multithreaded pgbench-P 2-T 7200-c 8-f bench_select.sql@10-f update.sql@3-U pguser mydb to here I believe you have a deeper understanding of "pgbench performance Test and Analysis", so you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Testing performance analysis script content learning mixing practical deeper things interests pressure literal practical practical customer client meaning simple operation way Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Docker Shulou Tech Info Apple MySQL