Dear Learner,

Hope you are doing well.

Yes you can add local[16] if you have 16 cores.

# Run application locally on 8 cores
./bin/spark-submit \
  --class org.apache.spark.examples.SparkPi \
  --master local[8] \
  /path/to/examples.jar \
  100

I hope this resolves your query.

If you face any further issue kindly let us know.

We will be glad assisting you.