Sangwu
11/21/2024, 3:49 PMevents
to trigger flow runs. But, I've noticed that it takes 4~10s until the job submitted and actually starts running inside a worker. (Note: this is using a prefect cloud server, the workers are hosted on an AKS kubernetes cluster, we tested with very low volume (1 ~ 3 concurrent jobs)
I've noticed that there are two environment variables PREFECT_WORKER_QUERY_SECONDS
and PREFECT_WORKER_PREFETCH_SECONDS
which you can configure to control the polling interval. My question is:
1. Would lowering these values make the job startup time faster?
2. When prefect workers poll for work, does it take one job? Or does it take multiple jobs at once?
3. What are other methods to optimize job startup time?
Ideally, we'd like the job to start within 1~2 seconds.Nate
11/21/2024, 4:25 PMEXTRA_PIP_PACKAGES
or something in a pull
step?Sangwu
11/21/2024, 4:27 PMSangwu
11/21/2024, 4:27 PM.serve
Nate
11/21/2024, 4:28 PM1. When prefect workers poll for work, does it take one job? Or does it take multiple jobs at once?it will find N scheduled runs and submit them all as subprocesses