From fc5f44aa5478a10425ddf12c3203710ce1713b71 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Feb 04 2019 15:12:44 +0000 Subject: Base builder capacity and maxjobs on processor count --- diff --git a/builder/tasks/main.yml b/builder/tasks/main.yml index d669833..1249beb 100644 --- a/builder/tasks/main.yml +++ b/builder/tasks/main.yml @@ -22,8 +22,8 @@ module: koji_host name: "{{ inventory_hostname }}" arches: [x86_64] - capacity: 4 - description: Koji builder + capacity: "{{ ansible_processor_count }}" + description: "{{ ansible_product_name }} builder with {{ ansible_processor_count }} CPUs and {{ ansible_memtotal_mb }} MB of memory" comment: Added by Ansible channels: [default] diff --git a/templates/kojid.conf.j2 b/templates/kojid.conf.j2 index bb9d12e..84ce2cd 100644 --- a/templates/kojid.conf.j2 +++ b/templates/kojid.conf.j2 @@ -3,7 +3,7 @@ sleeptime=2 ; The maximum number of jobs that kojid will handle at a time -maxjobs=64 +maxjobs={{ maxjobs | default(8 * ansible_processor_count) }} ; The minimum amount of free space (in MBs) required for each build root minspace=512