To change the CPU core consumption, set the number of cores to be used by the workers in the spark-env.sh file in spark-installation-directory/conf
This is done with the SPARK_EXECUTOR_CORES attribute in spark-env.sh file.
The value is set to 1 by default.