You can set the global concurrency to 8 to utilize all 8 cores of your server, but it's important to understand how Prefect manages concurrency and worker pools. Here's what you need to know:
1.
Concurrency Limits: Prefect allows you to set concurrency limits on work pools. This means you can limit the number of concurrent runs for flows associated with a work pool. For example, setting a concurrency limit of 8 would allow up to 8 tasks to run simultaneously if your work pool is configured accordingly.
Concurrency Management
2.
Work Pools: Each work pool can have its own concurrency settings. You should ensure that your work pool is configured to match the number of cores you want to utilize.
Work Pools
3.
Slot Decay: Prefect uses a concept called slot decay to manage how quickly slots (i.e., available resources for tasks) refresh. This can affect how tasks are scheduled and executed. Adjusting the
slot_decay_per_second
parameter can help you balance task frequency and resource usage.
By configuring these settings correctly, you can effectively use all 8 cores of your server for task execution.