Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How is uninterruptable sleep calculated? Is the 'b' figure a reasonable figure to estimate the number of processes waiting for I/O over the course of that second?

For a synthetic test :

i=1; while [ $i -lt 1000 ] ; do dd if=/dev/zero of=./test.rnd bs=1M count=1& i=$((i+1)); done

vmstat 1:

 0  0  73220  92012 128276 239752    0    0     0    84  661 2332  3  2 93  2  0
 0  0  73220  92020 128276 239752    0    0     0     0  576 2196  2  1 97  0  0
 0  0  73220  92020 128276 239752    0    0     0     0  524 2167  2  1 97  0  0
 9  1  73732  76324  85788 227184    0  512     0 43528 1937 9963 32 60  8  0  0
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  1  75396 108828  51412 139344    0 1664   248 42500 1878 8023 33 59  0  8  0
 3  1  75396 117180  51412 139080    0    0     8 10584 1010 3898  9 13  0 78  0
 1  1  75396 132856  51420 139208    0    0     0 14924 1331 5384 16 23  0 61  0
 0  1  75396 138984  51420 139340    0    0     0  8240  930 3436 10  9  0 81  0
 0  1  75396 144900  51420 139084    0    0     0  7000 1111 3722 11 11  0 78  0
 1  1  75396 154668  51420 139340    0    0     0  6528 1173 3914 12 14  0 73  0
 0  1  75396 164992  51420 138616    0    0     0  9372 1107 4490 11 16  0 73  0
 2  1  75396 175708  51432 139344    0    0     0 18424 1138 4676 11 18  0 70  0
 0  1  75396 191668  51432 139340    0    0     0 12036 1249 4889 15 23  0 62  0
 1  1  75396 211660  51432 139340    0    0     0 22020 1414 5842 20 28  0 52  0
 1  1  75396 228152  51436 139336    0    0     0 19136 1181 7921 15 22  0 62  0
 0  1  75396 235704  51436 139348    0    0     0  8272  983 3716 10 12  0 78  0
 0  1  75396 249204  51440 139360    0    0     0 19916 1239 5918 16 22  0 62  0
 0  1  75396 254888  51440 139412    0    0    76  9076  995 3899 12  8  0 79  0
 0  0  75396 273816  51440 139424    0    0     0  3072  836 2487  6  5 73 16  0
 0  0  75396 273856  51448 139420    0    0     0    36  593 2241  1  1 97  1  0
 0  0  75396 273944  51448 139424    0    0     0     0  651 2405  4  2 94  0  0
 0  0  75396 273976  51456 139428    0    0     0  1132  626 2289  2  2 93  3  0
 0  0  75396 274048  51456 139436    0    0     0    92  620 2218  3  1 94  2  0

Under the same conditions with vmstat 5:

$ vmstat 5
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  75396 273452  51540 140860    0    0     1     7    4    1  1  0 99  0  0
 0  0  75396 273420  51556 140880    0    0     0    38  593 2218  2  1 96  1  0
 0  1  75396 129904  51568 140880    0    0     0 21552 1371 5153 21 30 12 37  0
 0  1  75396 174996  51580 140904    0    0     1 10018 1112 3956 12 15  0 73  0
 6  0  75396 228012  51596 140836    0    0     0 15460 1282 5033 15 20  0 65  0
 0  0  75396 272176  51604 140900    0    0     0  1845  717 2422  5  3 80 11  0
 0  0  75396 272532  51608 140912    0    0     0    27  637 2448  3  1 95  0  0
 0  0  75396 272612  51624 140904    0    0     0    26  620 2362  2  1 96  1  0

Why am I only seeing 1 process in uninterruptable sleep during the attempt at 1000 writes? Why does the run queue look so much less clogged during the high I/O with the vmstat 5?

I would imagine these numbers to be like calculating your velocity by using multiple reads of your position. It could work, and it does work, if your speed is constant. But a second is a very long time in computing, and processes could enter and leave uninterruptable sleep frequently.

To me it was much more sensible to look at %wa, but... with so many systems with so many different disks, it's conceivable to me to have high I/O contention, with processes stuck waiting for one disk, while the other dozen disks are moving along fine. Leading to a process starved for I/O, while the wa number is low, and the b number is >0.

I want to better understand what the performance numbers on my machine mean, so the question is.... how are these performance numbers calculated?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.