In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
The main content of this article is "analyzing the changes of performance indicators of PostgreSQL DBA database". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "analyzing the changes of performance indicators of PostgreSQL DBA database".
Different network environment (delay) has a great influence on the performance index of the database. Tc is used to simulate the increase of network delay to observe the change of the performance index of the database.
Install tc
Using python's encapsulation tool tcconfig, install the command:
Pip3 install tcconfig
Performance testing
Network without delay
[pg12@localhost] $pgbench-S-c 10-h localhost-T 20 teststarting vacuum...end.transaction type: scaling factor: 1query mode: simplenumber of clients: 10number of threads: 1duration: 20 snumber of transactions actually processed: 298322latency average = 0.671 mstps = 14911.921647 (including connections establishing) tps = 14916.752171 (excluding connections establishing)
TPS is close to 15K
Network delay delay 10ms
Set the network latency to 10ms
Tcset-device lo-delay=10-overwrite
Test again
[pg12@localhost] $pgbench-S-c 10-h 192.168.26.28-T 20 teststarting vacuum...end.transaction type: scaling factor: 1query mode: simplenumber of clients: 1duration: 20 snumber of transactions actually processed: 8459latency average = 23.655 mstps = 422.736098 (including connections establishing) tps = 424.325926 (excluding connections establishing)
TPS dropped directly to more than 400, almost only the original 1max 40.
Network delay 50ms
Set the network latency to 50ms
Tcset-device lo-delay=50-overwrite
Test again
[pg12@localhost] $pgbench-S-c 10-h 192.168.26.28-T 20 teststarting vacuum...end.transaction type: scaling factor: 1query mode: simplenumber of clients: 1duration: 20 snumber of transactions actually processed: 1650latency average = 121.406 mstps = 82.368327 (including connections establishing) tps = 83.671552 (excluding connections establishing)
This time the result is more than 80, which is about the original 1max 200.
Why it is difficult to upgrade the TPS of OLTP distributed database, one of the reasons is network delay.
At this point, I believe that everyone on the "analysis of PostgreSQL DBA database performance index changes" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.