Debian: kernel build takes ~9 minutes to compress the source code archive

Bug #1988442 reported by M. Vefa Bicakci
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
M. Vefa Bicakci

Bug Description

Brief Description
-----------------
In my 12-CPU build VM, Debian-based StarlingX build takes about 9~10 minutes to compress the kernel's source code archive with a single-threaded instance of "xz". Having to wait 9 minutes for this, at least in my opinion, is not acceptable, especially given that the kernel's compilation procedure takes an additional 20~25 minutes in the same build VM.

Ideally, the xz compression should be made multi-threaded, so that the compression ratio is not affected, but the compression time is reduced.

Severity
--------
Minor: A build issue affecting the build's duration only.

Note
----
I already have a patch for this, and I am opening this bug report as a placeholder to refer to. This is why I did not answer all of the questions in the bug report template.

Changed in starlingx:
assignee: nobody → M. Vefa Bicakci (vbicakci)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kernel (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/kernel/+/855520

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kernel (master)

Reviewed: https://review.opendev.org/c/starlingx/kernel/+/855520
Committed: https://opendev.org/starlingx/kernel/commit/da523dc2d06d193c6f2704fb43b7a851246172ba
Submitter: "Zuul (22348)"
Branch: master

commit da523dc2d06d193c6f2704fb43b7a851246172ba
Author: M. Vefa Bicakci <email address hidden>
Date: Fri Jul 29 19:11:55 2022 +0000

    Debian: kernel: Parallelize xz archive compression

    Without this commit, a 12-CPU build VM used by the author takes between
    9 and 10 minutes to compress the standard/non-preempt-rt kernel's
    linux-source-5.10.tar.xz source archive.

    This commit parallelizes the compression operation, and this reduces the
    compression time to about 1 minute, saving about 8 minutes during the
    build procedure.

    During the preparation of this commit, reduction of the compression
    ratio was also experimented with, but was not opted for due to the
    increased need for disk space.

    Some of the measurements that were acquired with the same 12-CPU build
    VM can be seen in the table below:

                            Archive size Compression time
                            (Bytes)
    baseline 120687336 9~10 min
    --threads=0 " ~55 sec
    --threads=0 -3 142357736 ~21 sec
    --threads=0 -0 174808508 ~ 7 sec

    Verification
    - "build-pkgs -c -b rt,std -p linux,linux-rt" rebuilds the kernel
      successfully, but takes a shorter duration of time.
    - This commit has been in the author's local repository for more than a
      month, and no issues were observed during the kernel rebuilds carried
      out during the author's day-to-day work.

    Closes-Bug: 1988442
    Change-Id: Ib7c701f3f690d6120dc5aca1d0d42862151a2fc0
    Signed-off-by: M. Vefa Bicakci <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
tags: added: stx.8.0 stx.build stx.debian
Changed in starlingx:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.