Linux backend services handling large volumes of string data – performance is slow.
In the history of C++ development projects, we utilized a custom protocol for communication, which employed a two-dimensional array pattern. When processing large volumes of data, the protocol required iterating through the arrays and performing serialization operations to generate logs. Due to its low efficiency, this resulted in noticeable lag or stuttering within the system under heavy load, as reported by the business departments.
Problem Identification When troubleshooting the issue, we first performed a performance analysis of the system and discovered that CPU utilization increased significantly when processing large amounts of data, and system response times became longer.
Upgrading the GCC version caused program crashes: hidden issues due to code non-compliance.
In the same business code scenario, the program compiled and ran normally in a CentOS 7 environment. However, when switching to CentOS 8 and using an updated version of GCC for compilation, the program crashed. It’s worth noting that the issue only occurs in Release mode, while Debug mode does not exhibit any problems. This is the first time we’ve encountered a situation like this; after three days of investigation, we finally identified the root cause.
Linux System Benchmark Test
Windows platform has RuMaster (Entertainment Master), which isn’t known for highly accurate data, but it’s still useful as a reference. Of course, there are other professional benchmarking software options available. When it comes to Linux systems, there haven’t seemed to be any particularly suitable benchmarking software found.
Sysbench is a versatile benchmark testing tool that can be used to test CPU, memory, file I/O, thread performance, and more. You can use Sysbench to execute various performance testing tasks.
Docker Basics, Intermediate, and Advanced
Having worked with CentOS for many years, content may not apply to macOS or Ubuntu users in some cases.
You can refer to the documentation from Tsinghua University for installation guidance: https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/
Installation Due to unknown mysterious forces, domestic Docker installation is recommended to set the cloud vendor’s repository address. Here we recommend using Alibaba Cloud.
Set Repository Source Address yum install yum-utils device-mapper-persistent-data lvm2 && \ sudo yum-config-manager --add-repo http://mirrors.
Linux Setup JMeter Test Environment
The author has a strong interest in hardware and used JMeter to conduct load testing, documenting the process of deploying JMeter, InfluxDB, and Grafana on CentOS 7. They shared installation and command usage for JMeter, InfluxDB’s features and Docker installation method, as well as a simple deployment and configuration for Grafana. They summarized experience and references related to high-performance programming patterns.
Background As widely known, I have a very strong interest in hardware.
Red Hat and CentOS Lifecycle
Production environment operating systems, with Red Hat and CentOS being the mainstream choices. The documentation includes links to two system lifecycles and shares experience upgrading from CentOS 8 to CentOS Stream 8.