/proc/diskstats는 초당 1000ms*CPU 코어 수 디스크 시간 이상을 씁니다.

/proc/diskstats는 초당 1000ms*CPU 코어 수 디스크 시간 이상을 씁니다.

procfs-diskstats의 결과를 해석하는 방법에 관심이 있습니다. API처럼 보이지만 인터넷, 매뉴얼 페이지 또는 Linux 커널 문서에서 자세한 설명을 본 적이 없습니다.

하나 있다문서매우 간결한 설명이 있습니다.

The /proc/diskstats file displays the I/O statistics
of block devices. Each line contains the following 14
fields:

        ==  ===================================
         1  major number
         2  minor mumber
         3  device name
         4  reads completed successfully
         5  reads merged
         6  sectors read
         7  time spent reading (ms)
         8  writes completed
         9  writes merged
        10  sectors written
        11  time spent writing (ms)
        12  I/Os currently in progress
        13  time spent doing I/Os (ms)
        14  weighted time spent doing I/Os (ms)
        ==  ===================================
        ...

그리고iostats.rst몇 마디 더 말해보세요. 하지만 이 지표가 정확히 무엇을 의미하는지 말하기는 여전히 어렵습니다.

13  time spent doing I/Os (ms)

iostats.rst에서:

Field 10 -- # of milliseconds spent doing I/Os (unsigned int)
    This field increases so long as field 9 is nonzero.

    Since 5.0 this field counts jiffies when at least one request was
    started or completed. If request runs more than 2 jiffies then some
    I/O time might be not accounted in case of concurrent requests.

그런데 이 값을 보니초당내 4코어 CPU VM에서 값이 증가합니다(델타).100000밀리초 이상fe 4Gb 파일을 복사하는 경우.
나는 추측할 수 있다HDD/SSD(SATA? 버스에 따라 다름?)여러 CPU 코어 요청을 병렬로 처리할 수 있습니다..
4코어 CPU에서 이는 이 카운터의 100000밀리초 증가가 초당 HDD/SDD 서비스(CPU 코어당 최소 25초의 요청)를 나타냄을 의미합니다. 또는 2개의 코어에서 50초(초당) 또는 1개의 코어에서 100초(초당)입니다.

상식적으로 우리는 초당 1초 이상의 작업을 수행할 수 없습니다.

관련 게시물:/proc/diskstats 디스크 읽기 시간이 초당 1초 이상 증가합니다.

UPD: 리눅스 커널 4.4.161, x86_64

관련 정보