-
Notifications
You must be signed in to change notification settings - Fork 315
How to disable Intel Hyper Threading Technology
Since ParallelCluster 2.5.0 you can disable hyperthreding by configuring the disable_hyperthreading parameter in the cluster section.
If you're using ParallelCluster 2.4.1 or older versions there are two things you need to do disable hyperthreading (on Amazon Linux).
You have to pass an additional setting at cluster creation time, by using the extra_json
parameter, which enable you to set the number of slots per instances to vpcus, cores, or a number.
To set the number of slots per instance to be only the number of cores, you have to set the following in your config:
[cluster yourcluster]
...
extra_json = { "cluster" : { "cfn_scheduler_slots" : "cores" } }
If you are using Amazon Linux, you have to create a script with the following content:
#!/bin/bash
for cpunum in $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | cut -s -d, -f2- | tr ',' '\n' | sort -un)
do
echo 0 > /sys/devices/system/cpu/cpu$cpunum/online
done
Upload the script with the correct permissions to S3 and use as Post Install script by configuring the post_install
configuration parameter.
[cluster yourcluster]
...
post_install = s3://<bucket-name>/yourscript.sh
See Disabling Intel Hyper-Threading Technology on Amazon Linux for more details.