Troubleshooting Linux System Bottlenecks

Source: Internet
Author: User
Tags cpu usage

First, Introduction

The operating system resources are not the same as compute resources (CPU), storage resources (hard disk, memory), network resources (NIC). Can be a bottleneck including CPU utilization, sufficient memory space, hard disk read and write throughput, read and write times.

Sysstat is a common toolkit for monitoring system resources, system performance and activities, which includes the following features:

    • Iostat: Statistics and reports the CPU status and I/O status data for your device.
    • mpstat: Monitor and display detailed information about the CPU.
    • Pidstat: Statistics The CPU, memory, and so on of the running process/task.
    • SAR: Saves and reports details about different resources (CPU, memory, input and output, network, kernel, etc.).
    • SADC: System Activity Data Collector for collecting background data for SAR.
    • SA1: Reads and stores binary data for SADC data files.
    • SA2: Collaboration with SAR for summarizing daily reports.
    • SADF: Displays the data generated by the SAR in a different format (CSV or XML).
    • Sysstat: Explain the various functions of Sysstat.
    • Nfsiostat-sysstat: Statistical I/O status data for the network file system of the NFS protocol.
    • Cifsiostat: Statistical I/O status data for the network file system of the CIFS protocol
Second, installation

Sysstat can be installed directly via Yum

Yum  Install Sysstat

Want to get the latest performance can also be compiled installation, source package http://sebastien.godard.pagesperso-orange.fr/download.html

Third, the use

SAR [Options] [-A] [-o file] t [n]

which

T is the sampling interval, n is the number of samples, the default value is 1;

-o file means that the command result is stored in a binary format in a file, and file is a filename.

Options is a command-line option, and the SAR command is commonly used as follows:

-A: Sum of all reports

-U: Output statistics about CPU usage

-V: Output statistics for inode, files, and other kernel tables

-D: Output activity information for each block device

-r: Output memory and swap space statistics

-B: Display statistics for I/O and transfer rates

-A: File read and write status

-C: Output process statistics, number of processes created per second

-r: Output memory page statistics

-Y: terminal equipment activity situation

-W: Output system Exchange activity information

To see if the CPU has a bottleneck: sar-u and sar-q combination

Sar-u 1 10

Sar-q 1 10

See if memory has bottlenecks: Sar-b, sar-r, and sar-w combinations

Sar-b 1 10

Sar-r 1 10

Check io bottlenecks: Sar-b, sar-u, and sar-d

Sar-b 1 10

Troubleshooting Linux System Bottlenecks

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.