Skip to content

Instantly share code, notes, and snippets.

@notsobad
Created December 30, 2014 03:42
Show Gist options
  • Save notsobad/6a00bbfe022b36e3c0ba to your computer and use it in GitHub Desktop.
Save notsobad/6a00bbfe022b36e3c0ba to your computer and use it in GitHub Desktop.
io

IO性能分析

iostat

$ iostat -x 1
Linux 3.5.2-x86_64-linode26 (linode)    11/08/2012      _x86_64_        (4 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.84    0.00    0.08    1.22    0.07   97.80

Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util
xvda              0.09     1.02    2.58    0.49   112.79    12.11    40.74     0.15   48.56   3.88   1.19
xvdb              1.39     0.43    4.03    1.82    43.33    18.43    10.56     0.66  112.73   1.93   1.13

iotop

htop

dstat

You did not select any stats, using -cdngy by default.
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
 12   3  84   0   0   1|  13k 1622k|   0     0 |  99B  938B|8156    26k
  5   1  93   0   0   0|   0     0 |4699k 5297k|   0     0 |  19k   26k
  6   1  93   0   0   0|   0     0 |5317k 6320k|   0     0 |  19k   24k
  6   1  92   0   0   0|   0    24k|5124k 6322k|   0     0 |  21k   30k
  6   1  93   0   0   0|  12k    0 |4658k 6116k|   0     0 |  18k   23k
  6   1  93   0   0   0|8192B 2364k|3050k 5474k|   0     0 |  20k   28k
  6   1  93   0   0   0|   0     0 |2400k 4700k|   0     0 |  17k   23k
  5   1  93   0   0   0|   0     0 |2994k 3596k|   0     0 |  18k   27k
  7   1  92   0   0   0|4096B   56k|3224k 3965k|   0     0 |  22k   32k
  6   1  92   0   0   0|   0    48k|3865k 5792k|   0     0 |  20k   29k
  6   1  93   0   0   0|4096B    0 |3727k 4871k|   0     0 |  17k   22k

vmstat 1

  procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 1  0 334512 4325628 324404 25262412    0    0     2   206    0    1 12  4 84  0
 3  0 334512 4324136 324404 25263320    0    0     0   812 20516 29403  6  2 92  0
 0  0 334512 4323452 324404 25264400    0    0     0     0 20095 27078  7  2 92  0
 2  0 334512 4321876 324408 25265504    0    0     8    44 20544 30209  7  1 92  0
 0  0 334512 4321432 324408 25266556    0    0     0     0 18912 24470  6  2 92  0
 0  0 334512 4319176 324408 25267492    0    0     4     0 17372 23350  5  1 93  0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment