
Hi, On Mon, 2021-02-22 at 10:38 +0100, Normand wrote:
Thank you Adrian for the answer, My understanding of setting OBS_INSTANCE_MEMORY in buildhost.config is that it will set this value for all the jobs submitted to this host; is it true ? If true then that is a drawback for the number of parallel jobs that could be run on this host.
Yes. I have a usecase where some of the "power hosts" were not having enough RAM to run $(grep -c processor /proc/cpuinfo) number of builds needed to build some of our big packages. (I use tmpfs for our builds.) To resolve this, I implemented a small hack in the obsworker script on these hosts: # diff -u /tmp/obsworker /etc/init.d/obsworker --- /tmp/obsworker 2021-02-22 16:44:51.000000000 +0530 +++ /etc/init.d/obsworker 2019-02-11 17:08:31.000000000 +0530 @@ -310,6 +310,9 @@ else WORKERID="${HOSTNAME}:$I" fi + VMDISK_ROOT_FILESIZE="--vmdisk-rootsize ${OBS_VM_DISK_AUTOSETUP_ROOT_FILESIZE}" + [ $I -eq 1 ] && VMDISK_ROOT_FILESIZE="--vmdisk-rootsize 18432" + [ $I -eq 2 ] && VMDISK_ROOT_FILESIZE="--vmdisk-rootsize 18432" R=$OBS_WORKER_DIRECTORY/root_$I # prepare obsworker startup in screen... TMPFS= On a machine with 24 CPUs, first 2 workers build with 18GB root filesystem. The rest of the 22 workers build with 6GB build root filesystem - as set in /etc/sysconfig/obs-server file. Could something like this work for you? Instead of setting "VMDISK_ROOT_FILESIZE", you would need to pass a large "MEMORY" value to specific workers. Regards, Srinidhi.