Vmstat Performance Analysis command in MySQL

Source: Internet
Author: User
Tags switches time interval linux

Vmstat:

Displays the virtual memory statistics and reports on the overall running state of the system, such as processes, memory, I/O, and so on.

Options:

-A: Show memory activity

-F: Displays the total number of processes created after startup

-S: Displays the time counter and memory status in tabular format and cannot refresh the display

-D: Displaying disk status

-P: Displays the specified partition status

-S: Specifies the unit of output information

-N: Time interval and number of times the state information is refreshed

Instance:

[root@master~]# Vmstat

procs----------memory---------------Swap-----IO-----system-------------CPU---------

R b swpd free buff cache si so bi bo in CS us sy ID WA St

0 0 0 23016 62180 304304 0 0 69 30 584145 1 2 95-2 0

Display Content analysis:

Procs

R:the number of processes waiting for run time.

B:the number of processes in uninterruptible.

Memory

SWPD: Virtual memory used.

Free: idle memory.

Buff: Memory used as buffer.

Cache: Used as cache memory.

Inact: Inactive memory inactive memory. (-a option)

Active: Active memory active memory that activates the state. (-a option)

Swap

Si: The amount of memory exchanged from disk to memory (/s).

So: The amount of memory exchanged to disk (/s).

Io

BI: The number of blocks (BLOCKS/S) received from the block device.

Bo: The number of blocks sent to the block device (BLOCKS/S).

System

In: The number of interrupts per second, including the clock.

CS: The number of context switches per second.

Cpu

% of total CPU time:

This column more highlights: http://www.bianceng.cn/database/MySQL/

US: The time spent running non-kernel (non-kernel) code. (User time, including nice time)

SY: The time it takes to run the kernel code. (System time)

ID: Idle time spent idle. Prior to Linux 2.5.41, this is includes io-wait time.

WA: Time to wait for IO. Prior to Linux 2.5.41, included in idle.

ST: the time obtained from the virtual machine. Prior to Linux 2.6.11, unknown.

[root@master~]# vmstat-s

547428 Total Memory

524908 used Memory

230284 Active Memory

247108 Inactive Memory

22520 free Memory

62620 Buffer Memory

304316 Swap Cache

2096472 Total Swap

0 used Swap

2096472 Free Swap

5071 Non-nice User CPU Ticks

199 Nice user CPU ticks

11648 System CPU Ticks

707535 Idle CPU Ticks

16799 io-wait CPU Ticks

195 IRQ CPU Ticks

529 SOFTIRQ CPU Ticks

0 Stolen CPU Ticks

489932 pages Paged in

216337 Pages paged Out

0 pages swapped in

0 pages swapped out

4337742 interrupts

1066186 CPU Context Switches

1341878613 boot time

42883 Forks

Related Article

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.