<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>40249</bug_id>
          
          <creation_ts>2021-06-21 02:06:55 +0300</creation_ts>
          <short_desc>gb: parallelize gb-task-check-install-arch for speed</short_desc>
          <delta_ts>2024-04-01 17:17:35 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Infrastructure</classification>
          <product>Infrastructure</product>
          <component>girar</component>
          <version>unspecified</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry V. Levin">ldv</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>glebfm</cc>
    
    <cc>iv</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>sin</cc>
          
          <qa_contact name="Andrey Cherepanov">cas</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>199328</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2021-06-21 02:06:55 +0300</bug_when>
    <thetext>When a task built more than just a few binary packages, it makes sense to parallelize gb-task-check-install-arch because the only thing that could be shared between install checks is the cache.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203785</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan A. Melnikov">iv</who>
    <bug_when>2021-10-13 21:49:04 +0300</bug_when>
    <thetext>I have a rough implementation of parallel install checks that currently works on  mipsel (secondary) and riscv64 girar instances. It uses the same build node and user and runs install checks in parallel using several hasher instances (with different --number). For 4-core Loongson3A I run 5 install check threads, and it gives from 1.6 to 3 times speed up, depending on the task. Also, for trivial tasks where only one binary package is build parallel version may be slower by a second or so.

I&apos;m not posting links to code here mainly because I believe that it will be more effective to write something from scratch then to forward-port &amp; clean up my implementation onto current girar (I&apos;m still using an ancient pre-ga version). Still, I can write smth up on what and how I was doing, if you think it&apos;ll be useful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>205037</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2021-11-19 03:20:56 +0300</bug_when>
    <thetext>(In reply to Dmitry V. Levin from comment #0)
&gt; When a task built more than just a few binary packages, it makes sense to
&gt; parallelize gb-task-check-install-arch because the only thing that could be
&gt; shared between install checks is the cache.

Since the cache is so important for install checks, it would make sense to generate the cache once and subsequently reuse it by parallelized install checks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>243866</commentid>
    <comment_count>3</comment_count>
    <who name="Ivan A. Melnikov">iv</who>
    <bug_when>2024-04-01 17:17:35 +0300</bug_when>
    <thetext>The next iteration of the parallelized install checks were deployed on loongarch64 girar instance last monday (2024-03-25). It works stably so far. We use 8 workers, as more install chroots would probably exhaust the free space at $TMPDIR. On heavy tasks with enough binary packages we see install checks became 3.5-6.5 times faster, the heavier the task is the better. On small tasks (e.g. updating one small noarch package), the install checks became slower for a few seconds, as some cache-related optimizations are now missing. Nevertheless, even now this seems like an good trade-off, and the optimization can be re-implemented in the future.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>