'How can I verify that my hardware prefetcher is disabled

I have disabled hardware prefetching using the following guidelines: Installed msr-tools 1.3

wrmsr -a 0x1A4 1

The prefetcher information for my system (Broadwell) is in the msr address 0x1A4 as shown by intel documentation.

I did rdmsr -a 0x1A4 the out put showed 1. According to the intel docs if the bit number corresponding to the particular prefetcher is set to 1 that means it is disabled.

I wanted to know if there is anyother way I can verify that my hardware prefetchers have been disabled?



Solution 1:[1]

Disabled prefetcher shall slowdown some operations which benefit from enabled prefetcher. You will need to write some code (probably in assembler language) and measure it's performance with enabled and disabled prefetcher.

Some long time ago I wrote test program to measure memory read performance. It was repeatedly reading memory in blocks of different sizes. It proved obvious correlation between memory block sizes and capacities of different levels of memory cache.

Solution 2:[2]

You can run some I/O intensive and prefetch-friendly workloads to verify.

btw, My CPU is Gold 6240, and set 0x1A4 as 1 is not working on it.
Instead, I use sudo wrmsr -a 0x1A4 0xf

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 John Doe
Solution 2 grayxu