Instructions to Turn ON/OFF Hardware Prefetch on SPARC64 Systems
By Giri Mandalika on Nov 07, 2010
The hardware prefetch is ON by default on M-series servers such as M8000/M9000, M4000/M5000, M3000
The following excerpt is from a SPARC64 document:
Hardware speculatively issues the prefetch operation based on the prediction that there is high possibility to access to the following continuous address in the future, if there have been load accesses for a consecutive address.
Although this feature is designed to improve the performance of various workloads, due to the speculative nature, not all workloads may benefit with the default behavior. For example, in our experiments, we noticed 10+% improvement in CPU utilization while running some of the PeopleSoft workloads on M-series hardware with hardware prefetch turned off. Hence irrespective of the application/workload, the recommended approach is to conduct few experiments by running representative customer workloads on target M-series hardware with and without the hardware prefetch turned on.
Instructions to Turn On/Off Hardware Prefetch:
Connect to the system Service Processor (XSCF)
% ssh -l <userid> <host>
Check the current prefetch mode by running the following command at XSCF> prompt
Find the domain id of all mounted system boards (or skip to next step)
XSCF> showboards -a
Power-off all configured domains
XSCF> poweroff -d <domainid> [OR] XSCF> poweroff -a
From my experience, on larger systems with multiple domains configured, all domains must be powered off before the SP lets changing the prefetch mode. If someone has a correction to this information or better instruction that minimizes disruption, please let me know. I'd be happy to update these instructions.
Wait until the domain(s) are completely powered off. Check the status by running
XSCF> showlogs power
Change the prefetch mode to the desired value
XSCF> setprefetchmode -s [on|off]
Verify the prefetch mode
Finally power-on all configured domains
XSCF> poweron -d <domainid> [OR] XSCF> poweron -a
Disconnect from SP, and wait for the OS to boot up
Note to Sun-Oracle customers:
If the default value of hardware prefetch is changed, please make sure to mention this in any service requests, bug reports, etc., that you may file with Oracle Corporation. Unfortunately none of the standard commands on Solaris report the status of hardware prefetch - so, providing this additional piece of information beforehand will help the person who is analyzing/diagnosing the case.