Bedeutet eine SSD-Festplattenauslastung von nahezu 100%, dass die Festplatte langsam ist?

Problemphänomen

Die Nutzungsrate der SSD-Festplatte (als Cache-Festplatte) im Cluster liegt nahe bei 100%, und es muss ermittelt werden, ob der Festplattenengpass erreicht wird.

Problemuntersuchung

In der iostat-Dokumentation finden Sie, wie in den Blogs anderer Personen erwähnt, die Dienstprogramme von iostat nicht die neuen Geräte, die Parallelität unterstützen, wie z. B. ssd, raid usw.:

  %util
         Percentage  of  elapsed time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is
         close to 100% for devices serving requests serially.  But for devices serving requests in parallel, such as RAID arrays  and  modern  SSDs,  this  number  does  not
         reflect their performance limits.

Darüber hinaus können Sie den Artikel "Zwei Fallen in iostat:% util und svctm" unter https://brooker.co.za/blog/2014/07/04/iostat-pct.html lesen.

Ich habe es auch auf x86 versucht, indem ich die Cache-Festplatte gelesen habe:

fio -name test -rw randread -filename /dev/sdr -runtime 60  -time_based=1 -direct=1 -ioengine libaio -numjobs=1 -iodepth=1 -eta-newline=1

read: IOPS=7872, BW=30.8MiB/s (32.2MB/s)(236MiB/7671msec)
Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00     9.00 7524.00  394.00    29.59     2.37     8.27     0.42    0.18    0.13    1.14   0.12  95.00

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00     0.00 8305.00   82.00    32.66     0.96     8.21     0.01    0.12    0.11    0.26   0.12  99.80

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00     0.00 8379.00   62.00    32.80     0.60     8.10     0.02    0.11    0.11    0.10   0.12  99.10

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00     8.00 7720.00  195.00    30.53     1.67     8.33     0.15    0.14    0.12    0.86   0.12  98.10

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00     4.00 8021.00   87.00    31.33     0.72     8.10     0.02    0.12    0.12    0.17   0.12  99.20

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00     5.00 7502.00  374.00    29.31     1.89     8.11     0.31    0.16    0.13    0.92   0.12  96.00

Sie können sehen, dass iops ungefähr 7000 ist und utils bereits 100% ist, aber wenn Sie iodepth erhöhen:

fio -name test -rw randread -filename /dev/sdr -runtime 60  -time_based=1 -direct=1 -ioengine libaio -numjobs=1 -iodepth=128 -eta-newline=1

read: IOPS=129k, BW=505MiB/s (530MB/s)(18.1GiB/36746msec)
Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00    22.00 125637.00  667.00   491.68    13.65     8.19    10.29    0.35    0.34    1.90   0.01 100.00

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00     9.00 131418.00  136.00   513.60     1.39     8.02     1.59    0.24    0.24    0.52   0.01 100.00

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00     0.00 131817.00   43.00   514.91     0.34     8.00     0.23    0.21    0.21    0.19   0.01 100.00

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00     1.00 132226.00   81.00   517.15     1.23     8.02     0.67    0.23    0.23    0.63   0.01 100.00

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdr               0.00     0.00 130618.00   37.00   510.23     0.32     8.00     0.12    0.21    0.21    0.65   0.01 100.00

Sie können sehen, dass iops 12w und utils auch 100% sind.

Ich habe auch das NVME-Gerät getestet, das 4k-1-1 entspricht. Lesen ist nur 1W, wenn es 4k-1-128 ist, hat Lesen 25W, aber ihre Utils sind 100%.

Problemursachen

%util, it means "Percentage of CPU time during which I/O requests were issued to the device".

Der Parameter util gibt "den Prozentsatz der CPU-Zeit an, während der E / A-Anforderungen an das Gerät gesendet werden". Dieser Wert kann die Auslastung eines Geräts für serielle Geräte (z. B. mechanische Festplatten) widerspiegeln. Wenn es länger als 90 ausgeführt wird % kann es langsam sein. Wenn bei parallelen Geräten (wie SSDs, Solid-State-Festplatten) ein E / A in einem bestimmten Zeitraum 100% der CPU-Zeit belegt, belegen 100 E / A in demselben Zeitraum möglicherweise auch 100% der CPU-Zeit, sodass nicht davon ausgegangen werden kann, dass das Gerät einen Engpass erreicht hat.

Um ein bestimmtes Plattengerät zu beurteilen, müssen andere Parameter wie Wartewert, avgqu-sz usw. analysiert werden.

Zusammenfassung eines Problems

Der Referenzwert von io util% ist nur für die Festplatte genau, da die Festplatte nicht gleichzeitig ausgeführt wird und nicht die Fähigkeit der SSD (gleichzeitiges Gerät) widerspiegeln kann.

Ich denke du magst

Origin blog.51cto.com/wendashuai/2551080
Empfohlen
Rangfolge