intel / intel-pmwatch

MIT License
35 stars 7 forks source link

Why media_write_ops is more than cpu_write_ops? #10

Open fukien opened 2 years ago

fukien commented 2 years ago

Hi, I tried to measure the counters of Optane DIMM by doing a self-crafted read/write benchmark. I found one thing pretty weird: the number of cpu_write_ops is lower than media_write_ops, e.g., DIMM0: media_write_ops: 4443, cpu_write_ops: 17 (Actually, cpu_write_ops keeps quite stable at the value of 17, no matter if I enlarge the dataset or not). However, as for cpu_read_opts, its number is lower than media_read_ops. This is reasonable, cause CPU cacheline is 64B while Optane DCPMM internal XPLine is 256B. Thus, the read/write operations of the internal Optane level should be more than that of CPU read/write operations. Can anyone please help explain why media_write_ops is more than cpu_write_ops? Thanks.

GrayXu commented 2 years ago

According to their docs, media_ops has a granularity of 256B and cpu_ops is 64B. So cpu_write_ops should be bigger and ~4x bigger than media_write_ops if there is no write amplification.

I guess the "4443" and "17" is happened when the PM module is idle. And it could be caused by some background internal tasks?