문제

o_wronly | o_sync | o_direct를 사용하여 디스크에 단일 블록 쓰기를 사용하여 하트 비트를 하트 비트를 썼습니다.

이 장치의 버퍼 캐시를 비활성화하기 위해해야 할 일이 있습니까?

테스트 중에 독자가 없습니다.나는 그것을 다음과 같이 시뮬레이트 할 수있다 :

# dd of=/dev/sda1 bs=512 count=1 if=/dev/zero oflag=direct,dsync
.

당 "Iostat 1"뭔가가 쓸 때마다 장치에서 읽고 있습니다.

"skip= 1000"등을 추가하면 동작이 변경되지 않습니다
/ dev / sda 또는 / dev / sda1 :

를 사용하면 동작이 조금 변경됩니다.

SDA :

Linux 2.6.32-431.5.1.el6.x86_64 (wiley)  07/31/2014     _x86_64_ (8 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.07    0.01    0.07    0.04    0.00   99.80

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda              86.00       672.00         1.00        672          1
.

SDA1 :

sda              83.00       648.00         1.00        648          1
.

도움이 되었습니까?

해결책

aha!

원시 (8) 여기에서 볼 때 :

https://superuser.com./ questions / 242928 / disable-linux-read-and-write-file-cache-on-partition / 464382 # 464382

쓰기 :

# dd of=/dev/raw/raw1 bs=512 count=1 if=/dev/zero oflag=direct,dsync
.

iostat :

sda               2.00         0.00         1.00          0          1
.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top