1

I disabled the hardware prefetcher as follows:

#sudo wrmsr  0x1a4 15

Each bit 1 indicates it is disabled as per document.. https://software.intel.com/en-us/articles/disclosure-of-hw-prefetcher-control-on-some-intel-processors.

But i dint feel any difference while I am running the programs. How can I cross check they are really disabled? Any easy ways to do it?

Thank you

Manuel Selva
  • 18,554
  • 22
  • 89
  • 134
ANTHONY
  • 333
  • 5
  • 18
  • You won't "feel" it, you need to measure various CPU intensive workloads. Try rendering some video clips with it enabled and with it disabled. – doug65536 Feb 18 '16 at 06:31
  • The easiest thing to benchmark is probably a memcpy loop. Or maybe `dd if=/dev/zero of=/dev/null bs=32M count=1000`. The large block-size means the memcpy that happens inside the `read(2)` system call won't just keep re-writing already-cached memory. You'll see the higher throughput with a block-size like `128k` (half L2 size, but still big enough to not have too many system calls). The `write(2)` to /dev/null doesn't touch the buffer, BTW. The "driver" behind /dev/null just returns without touching the data. – Peter Cordes Feb 18 '16 at 06:37
  • @doug65536 "feel" means observe..!! i tried to see difference in time taken (using rdstc).. But even after disabling the time shows the same instead of increasing.!! Thanks for ur suggestion abt video clips.. – ANTHONY Feb 19 '16 at 08:17
  • @PeterCordes Thanks u. But Im really sorry that I dint understand clearly, because I'm naive with OS also. Can you be more clear how to do that and how to find out prefetcher disabled or not?? – ANTHONY Feb 19 '16 at 08:19
  • Maybe you processor only support disabling the prefetcher in the Bios http://stackoverflow.com/a/21383108/116388 – Manuel Selva Mar 14 '16 at 09:09
  • 1
    Better put your measurement code, people often do things like trying to measure a single access instead of amortizing, or using bad alignment. – Leeor Mar 27 '16 at 22:37

0 Answers0