How to Diagnose System Performance Issues Using OS Metrics and Tools
When system performance degrades, start by examining OS reports—CPU usage, memory consumption, disk and network I/O, and connection counts—using tools like Windows PerfMon, Linux vmstat, iostat, top, iftop, or Wireshark to pinpoint bottlenecks before diving into code.
When a system exhibits problems, avoid jumping straight into code investigation. First, review the operating system's reports to check CPU utilization, memory usage, disk I/O, network I/O, and connection counts.
On Windows, perfmon is a useful tool; on Linux, many commands and utilities such as SystemTap, LatencyTOP, vmstat, sar, iostat, top, and tcpdump can provide similar insights.
By observing these metrics, you can usually locate the source of performance issues.
(1) Examine CPU utilization. If CPU usage is low while throughput and latency remain poor, the program is likely waiting on I/O rather than computing. Distinguish between kernel‑mode and user‑mode CPU time; high kernel‑mode usage can degrade overall performance. On multi‑core CPUs, core 0 is critical—its high load can affect scheduling on other cores.
(2) Assess I/O. CPU and I/O often move inversely: high CPU usage usually means low I/O and vice versa. Consider three aspects of I/O: disk file I/O, driver I/O (e.g., network cards), and memory paging rate.
(3) Check network bandwidth. On Linux, commands like iftop, iptraf, ntop, and tcpdump, or tools such as Wireshark, can reveal network usage.
(4) If CPU, I/O, memory, and network bandwidth are all low yet performance does not improve, the issue likely lies within the program itself—possible blocking on locks, waiting for resources, or excessive context switching.
Understanding OS‑level performance helps identify problems such as insufficient bandwidth, memory, or TCP buffers, and often shows that the solution involves system tuning rather than code changes.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java High-Performance Architecture
Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
