Operations 6 min read

Master Linux Performance Monitoring: Key Metrics & Tools Explained

This guide outlines essential Linux performance evaluation areas—CPU, memory, disk I/O, network I/O, and overall system load—detailing the primary commands (vmstat, free, iostat, ifstat, top), interpreting their output fields, and offering practical thresholds for diagnosing bottlenecks.

Java High-Performance Architecture
Java High-Performance Architecture
Java High-Performance Architecture
Master Linux Performance Monitoring: Key Metrics & Tools Explained

Key Performance Evaluation Areas

CPU – Main tool: vmstat Memory – Main tool: free Disk I/O – Main tools: iostat, sar Network I/O – Main tool: ifstat Overall System Performance – Main tool:

top

CPU Evaluation

Key vmstat fields: r – number of processes running or waiting for CPU time slice. b – number of processes blocked for resources. si – kilobytes per second read from swap. so – kilobytes per second written to swap. us – user‑mode CPU usage. sy – system‑mode CPU usage. id – idle CPU percentage (us + sy + id = 100%).

Practical insights:

If procs:r consistently exceeds the number of CPU cores, the CPU is a bottleneck.

A high procs:b value indicates heavy system pressure.

Non‑zero swap:si suggests insufficient physical memory or a memory leak.

When cpu:us stays above 50% for a long period, consider optimizing the application.

Elevated cpu:sy often points to intensive I/O system calls.

If us + sy exceeds 80%, the CPU may be undersized.

Memory Evaluation

The free command shows available memory for applications.

Practical insights:

Free/Total > 70% → memory is abundant.

Free/Total < 20% → memory shortage.

20% < Free/Total < 70% → memory is generally sufficient.

Disk I/O Evaluation

Key iostat fields: rkB/s – kilobytes read per second. wkB/s – kilobytes written per second. svctm – average service time per I/O request (ms). await – average wait time per I/O request (ms); lower is better. util – percentage of time the device was busy; values near 100% indicate saturated bandwidth.

Practical insights:

Persistently high rkB/s and wkB/s indicate heavy read/write load.

If svctm and await are similar, I/O latency is low and performance is good.

When await far exceeds svctm, I/O queues are long and the system may need tuning or faster storage.

Network I/O Evaluation

Key ifstat fields: RX Pkts/Rate – incoming packet rate. RX Errs/Drop – packet loss. TX Pkts/Rate – outgoing packet rate. RX Data/Rate – incoming data volume. TX Data/Rate – outgoing data volume.

Overall System Performance Evaluation

The top command’s load average shows the average length of the run queue over 1, 5, and 15 minutes.

Practical insight: The three load values should generally not exceed the number of CPU cores; sustained values above the core count indicate a heavily loaded CPU.

For a system with 2 CPUs, a healthy threshold is load average < 2.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Performance Monitoringlinuxtopsystem metricsiostatvmstat
Java High-Performance Architecture
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.