Measuring Reorder Buffer Capacity
16 hours ago
- #benchmarking
- #microarchitecture
- #performance
- Out-of-order processors execute instructions out of program order but must maintain the appearance of in-order execution.
- The reorder buffer (ROB) tracks the status of instructions in the instruction window and ensures they commit in program order.
- The ROB's capacity limits how far ahead the processor can search for independent instructions to execute in parallel.
- A microbenchmark using cache-missing loads and NOPs can measure the ROB size by observing when memory accesses overlap or serialize.
- Hyper-Threading partitions the ROB statically between threads only when both threads are active.
- Physical Register File (PRF) microarchitectures may limit the instruction window by exhausting rename registers.
- The microbenchmark can also measure the number of available speculative registers in PRF architectures.
- x86 zeroing idioms (e.g., XOR reg, reg) and register moves may be optimized to not consume physical registers.
- Mixed integer and SSE/AVX instructions can reveal shared resource limitations in some microarchitectures.
- The microbenchmark is a powerful tool for measuring microarchitectural details like ROB size, PRF capacity, and optimization behaviors.