This shows you the differences between two versions of the page.
|
ep:labs:03:contents:tasks:ex2 [2020/10/25 16:20] cristian.marin0805 [02. [10p] Iostat] |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== 02. [10p] Iostat ==== | ||
| - | <note tip> | ||
| - | Parameteres for iostat: | ||
| - | * -x for extended statistics | ||
| - | * -d to display device stastistics only | ||
| - | * -m for displaying r/w in MB/s | ||
| - | <code bash> | ||
| - | $ iostat -xdm | ||
| - | </code> | ||
| - | Use iostat with -p for specific device statistics: | ||
| - | <code bash> | ||
| - | $ iostat -xdm -p sda | ||
| - | </code> | ||
| - | </note> | ||
| - | |||
| - | === [10p] Task A - Monitoring the behaviour === | ||
| - | * Run //iostat -x 1 5//. | ||
| - | * Considering the last two outputs provided by the previous command, calculate **the efficiency of IOPS** for each of them. Does the amount of data written per I/O **increase** or **decrease**? | ||
| - | |||
| - | :!: :!: Add in your archive screenshot or pictures of the operations and the result you obtained, also showing the output of iostat from which you took the values. | ||
| - | |||
| - | <note> | ||
| - | How to do: | ||
| - | |||
| - | * Divide the kilobytes read (//rkB/s//) and written (//wkB/s//) per second by the reads per second (//r/s//) and the writes per second (//w/s//). | ||
| - | * If you happen to have quite a few [[https://en.wikipedia.org/wiki/Loop_device|loop devices]] in your **iostat** output, find out what they are exactly: | ||
| - | |||
| - | <code bash> | ||
| - | $ df -kh /dev/loop* | ||
| - | </code> | ||
| - | </note> | ||
| - | |||
| - | |||
| - | <solution -hidden> | ||
| - | The way to calculate the efficiency of IOPS is to divide the reads per second //(r/s)// and writes per second //(w/s)// by the kilobytes read //(rkB/s)// and written //(wkB/s)// per second. | ||
| - | |||
| - | Example: the amount of data written per I/O for ///dev/sda// increases during each iteration: | ||
| - | |||
| - | {{ :ep:labs:ep2017_l3_ex01.png?700 |}} | ||
| - | |||
| - | <code> | ||
| - | 53040/105 = 505KB per I/O | ||
| - | 71152/102 = 697KB per I/O | ||
| - | </code> | ||
| - | |||
| - | If everything is zero in iostat - perform some I/O operations... | ||
| - | </solution> | ||