Is there a way to pass "vm-memory" for osc build to OBS workers ?
I am able to use "osc build vm-memory 14336" for a package build on my local machine. Is there a way to pass the vm-memory parameter when package is built in OBS workers ? I did not found anything about that in online OBS doc https://openbuildservice.org/files/manuals/obs-user-guide.pdf (the <memory> in _constraints is not used for that) -- Michel Normand
On Freitag, 19. Februar 2021, 17:04:21 CET Normand wrote:
I am able to use "osc build vm-memory 14336" for a package build on my local machine.
Is there a way to pass the vm-memory parameter when package is built in OBS workers ?
I did not found anything about that in online OBS doc https://openbuildservice.org/files/manuals/obs-user-guide.pdf (the <memory> in _constraints is not used for that)
constraints are limiting to assign the jobs to workers only if they have sufficient memory. But you can configure your workers providing any amount of memory by specifing OBS_INSTANCE_MEMORY=".." in /etc/buildhost.config or /etc/sysconfig/obs-server -- Adrian Schroeter <adrian@suse.de> Build Infrastructure Project Manager SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany (HRB 247165, AG München), Geschäftsführer: Felix Imendörffer
On 2/20/21 7:37 AM, Adrian Schröter wrote:
On Freitag, 19. Februar 2021, 17:04:21 CET Normand wrote:
I am able to use "osc build vm-memory 14336" for a package build on my local machine.
Is there a way to pass the vm-memory parameter when package is built in OBS workers ?
I did not found anything about that in online OBS doc https://openbuildservice.org/files/manuals/obs-user-guide.pdf (the <memory> in _constraints is not used for that)
constraints are limiting to assign the jobs to workers only if they have sufficient memory.
But you can configure your workers providing any amount of memory by specifing
OBS_INSTANCE_MEMORY=".."
in /etc/buildhost.config
or
/etc/sysconfig/obs-server
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. My use case is the envoy-proxy package that do not build for ppc64le for "Out of memory" failure as tracked by https://bugzilla.suse.com/show_bug.cgi?id=1182423 -- Michel Normand
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.
participants (3)
-
Adrian Schröter
-
Normand
-
Srinidhi B