https://pantsbuild.org/ logo
#general
Title
# general
g

gray-shoe-19951

04/18/2023, 10:01 PM
Hi team, It is not clear to me the difference between rule_threads_core and process_execution_local_parallelism ? Could you please elaborate a little bit? And how to config them correctly.
h

happy-kitchen-89482

04/18/2023, 10:20 PM
Sure: The Pants engine runs by composing rule executions. A rule is an async python function (technically a coroutine) that runs in the pantsd engine process. Some rules do work by spawning new processes (e.g., to run a test, or a compiler, or a linter).
So those two options roughly control how many compute resources on your machine are dedicated to each of those needs.
g

gray-shoe-19951

04/18/2023, 10:23 PM
When the threads will be used then?
For example, if I ask pants to run all rests, how those two configs would affect its performance?
h

happy-kitchen-89482

04/18/2023, 10:35 PM
the only way to answer that for your case is trial and error
without knowing what's in your tests, I can't evaluate how they compare to rule execution time
but very generally, tests tend to be process-heavy
👌 1