问题
I am trying to measure the PCIe bandwidth of NIC devices using Intel® Performance Counter Monitor (PCM) tools. But, I am not able to understand the output of it.
To measure the PCIe bandwidth, I executed the binary pcm-iio. This binary helps to measure the monitor PCIe bandwidth per PCIe device. After executing the binary I got the following output.
|IIO Stack 2 - PCIe1 |IB write|IB read|OB read|OB write|TLB Miss|VT-d L3 Miss|VT-d CTXT Miss|VT-d Lookup|
|_____________________________|________|_______|_______|________|________|____________|______________|___________|
| Part0 (1st x16/x8/x4) |4498 M |9003 M | 0 |3256 K | 0 | 0 | 0 | 0 |
| Part1 (2nd x4) | 0 | 0 | 0 | 0 |
| Part2 (2nd x8/3rd x4) | 0 | 0 | 0 | 0 |
| Part3 (4th x4) | 0 | 0 | 0 | 0 |
|_____________________________|________|_______|_______|________|________|____________|______________|___________|
I want to understand what is the meaning of IB read, IB write, OB read and OB write.
回答1:
IB write, short for inbound write, is the number of bytes that the PCIe device (specified in the first column) requested to write to main memory through DMA. IB read is the number of bytes that the PCIe device requested to read from main memory through DMA(“Direct Memory Access”). Whether it's a read or write request, it's the device that is issuing the request to the socket (the IIO stack to which the device is connected, to be specific). So it's inbound traffic from the perspective of the socket.
These metrics are measured using the DATA_REQ_OF_CPU
uncore event. In particular, the event with umask 0x1 represents a 4-byte inbound write request and the event with umask 0x4 represents a 4-byte inbound read request.
OB write, short for outbound write, is the number of bytes that the processor socket requested to write to the PCIe device through MMIO("Memory-mapped I/O"). OB read is the number of bytes that the processor socket requested to read from the PCIe device through MMIO.
These metrics are measured similarly to the inbound ones, except that the DATA_REQ_BY_CPU
uncore event is used instead.
In older versions of pcm-iio, the full form of IB and OB were used.
It's worth noting that DATA_REQ_OF_CPU
doesn't measure memory bandwidth, but rather I/O bandwidth for each device that is connected to each IIO stack.
来源:https://stackoverflow.com/questions/57133871/what-is-the-meaning-of-ib-read-ib-write-ob-read-and-ob-write-they-came-as-out