# Running hail locally - number of cores

**URL:** <https://discuss.hail.is/t/running-hail-locally-number-of-cores/3273>\
**Category:** Hail Query & hailctl\
**Created:** [March 27, 2023, 4:23pm UTC](https://discuss.hail.is/t/running-hail-locally-number-of-cores/3273 "2023-03-27T16:23:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [March 27, 2023, 4:27pm UTC](https://discuss.hail.is/t/running-hail-locally-number-of-cores/3273/2 "2023-03-27T16:27:35Z")

</div>

Hail running on Apache Spark in local mode will use all available cores by default, but you can load the Spark WebUI (the URL is printed in initialization) and look at the Executors pane to ensure everything is getting used. Using `hl.init(master='local[96]')` can explicitly request 96 local cores.

You should also make sure that you set memory with PYSPARK\_SUBMIT\_ARGS:

> [@How do I increase the memory or RAM available to the JVM when I start Hail through Python?](https://discuss.hail.is/t/how-do-i-increase-the-memory-or-ram-available-to-the-jvm-when-i-start-hail-through-python/133/2):
>
> You can set the memory using an environment variable: PYSPARK\_SUBMIT\_ARGS="--driver-memory 8g --executor-memory 8g pyspark-shell" ipython This will start an ipython notebook with 8 GB of memory. If you want ipython to always start with 8 GB of memory, you can add this to your .bashrc (or the equivalent file for your shell): export PYSPARK\_SUBMIT\_ARGS="--driver-memory 8g --executor-memory 8g pyspark-shell"

---

_[View the full topic](https://discuss.hail.is/t/running-hail-locally-number-of-cores/3273)._
