mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Add extra workers if computing based on memory
Co-authored-by: Elijah DeLee <kdelee@redhat.com>
This commit is contained in:
parent
16be38bb54
commit
621833ef0e
@ -341,6 +341,10 @@ class AutoscalePool(WorkerPool):
|
||||
# Get same number as max forks based on memory, this function takes memory as bytes
|
||||
self.max_workers = get_mem_effective_capacity(total_memory_gb * 2**30)
|
||||
|
||||
# add magic prime number of extra workers to ensure
|
||||
# we have a few extra workers to run the heartbeat
|
||||
self.max_workers += 7
|
||||
|
||||
# max workers can't be less than min_workers
|
||||
self.max_workers = max(self.min_workers, self.max_workers)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user