Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

UNIX system performance


May 23, 2021 UNIX Getting started


Table of contents


System performance

The purpose of this tutorial is to introduce some of the free performance analysis tools available to monitor and manage UNIX system performance and provide guidance on how to analyze and resolve performance issues in UNIX environments.

UNIX has the following key resource types that need to be monitored and adjusted:

  • Cpu

  • Memory

  • Disk space

  • The communication line

  • I/O time

  • Network time

  • Application

Performance components

There are five main components that change over time:

Component Describe
The user state CPU The time it takes for the CPU to run a user program in the user state. It includes the time used to execute the library function call, but does not include the time you spend in the kernel.
The system state CPU In the system state, the CPU spends time running the program. K ernel services are required for all I/O routines. Programmers can influence this value by using blocked I/O transports.
I/O time and network time These are the times spent moving data and I/O requesting services
The performance of virtual memory This includes context switching and switching.
Application Time spent running other programs -- the system does not serve the application because another application holds the CPU in its current state.

Performance tools

UNIX provides the following important tools to measure and adjust the performance of UNIX systems:

Command Describe
nice/renice Modify the scheduling priority of the run program.
Netstat Print network connections, routing tables, interface states, invalid connections, and multicast members.
time Measure the run time of a normal command or the use of resources.
uptime The average load on the system.
Ps Displays a snapshot of the current process.
Vmstat Statistics that display virtual memory information.
gprof Displays the call diagram information.
prof Process performance analysis.
top Displays the system's tasks.