All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>,
	Doug Goldstein <cardoe@cardoe.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 01/11] ci: prevent grub unpacking initramfs
Date: Sat, 5 Apr 2025 02:28:19 +0200	[thread overview]
Message-ID: <Z_B5I-cKaLU0xcxL@mail-itl> (raw)
In-Reply-To: <d832f7c5-5a59-46c5-b5c6-109dd13a77e3@citrix.com>

[-- Attachment #1: Type: text/plain, Size: 3014 bytes --]

On Thu, Apr 03, 2025 at 12:39:11PM +0100, Andrew Cooper wrote:
> On 03/04/2025 12:29 pm, Jan Beulich wrote:
> > On 03.04.2025 13:04, Marek Marczykowski-Górecki wrote:
> >> It fails on larger initramfs (~250MB one) and sometimes even smaller
> >> depending on memory size/memory map, let Linux do it.
> > Iirc grub only unpacks gzip-ed modules, so wouldn't a yet better approach
> > be to use a better compressing algorithm, which simply as a side effect
> > would keep grub from decompressing it, while at the same time moving
> > farther away from any critical boundaries?
> 
> Yes and no.
> 
> This is going to change anyway when I (or a delgee) moves initrd
> generation from the test step itself into the test artefacts repo.

Out of curiosity, I tried this:
https://gitlab.com/xen-project/people/marmarek/xen/-/commit/51b5fde816806206e6e0c72ec0146c5ab3da4351
pipeline:
https://gitlab.com/xen-project/people/marmarek/xen/-/pipelines/1753304751

It avoids repacking base alpine initrd, but it still needs to pack
per-job stuff (test script, but also toolstack). The gains are not
great, that step still takes over a minute. The overall job time went
down by just 40-50s (for example from 6m50s to 6m03s). This isn't very
surprising, because the base initrd.cpio.gz is 60MB and the final one is
over 200MB, so the part that was needlessly re-compressed is about 30%.
The numbers checks out, as the (debug) build artifacts zip is about
150MB.

One further idea would be to produce cpio.gz archive as part of the
build artifact, to avoid zip (used by gitlab for artifacts) -> cpio.gz
recompression. But that either makes build artifacts bigger for every
job, or need setting a variable for jobs that are used later for tests.
Unless we decide to store toolstack _only_ as cpio.gz in artifacts?

I tried the latter idea here:
https://gitlab.com/xen-project/people/marmarek/xen/-/commit/a4774213d83ca05c0b0b0fff80e49cf3aa32b67b
pipeline:
https://gitlab.com/xen-project/people/marmarek/xen/-/pipelines/1753312631

This helped quite a bit more. The 1m of compressing initrd is gone now.
Compressing remaining test-specific files and concatenating it all
together takes 2-3s. Now that 6m50s job is down to 3m40s. I'm not
exactly sure where that extra minute went (maybe related to number of
files in the build artifact? Fetching/extracting artifacts seems to be
faster a bit), but those times are not very consistent anyway, so it
could be also just random fluctuation. 

Looking further at the test log, some time is used for fetching
artifacts. I've looked into gitlab docs if those can be cached on the
runner, but I haven't found a solution that would really help (you can
cache arbitrary paths, including artifacts, but it doesn't prevent
re-downloading them and unpacking over the cached version...).
So, I'll stop here, polish the above patches and submit them in v2 of
this series.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2025-04-05  0:28 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03 11:04 [PATCH v1 00/11] Several CI cleanups and improvements, plus yet another new runner Marek Marczykowski-Górecki
2025-04-03 11:04 ` [PATCH v1 01/11] ci: prevent grub unpacking initramfs Marek Marczykowski-Górecki
2025-04-03 11:29   ` Jan Beulich
2025-04-03 11:36     ` Marek Marczykowski-Górecki
2025-04-03 11:39     ` Andrew Cooper
2025-04-03 12:03       ` Jan Beulich
2025-04-05  0:28       ` Marek Marczykowski-Górecki [this message]
2025-04-04  0:16   ` Stefano Stabellini
2025-04-03 11:04 ` [PATCH v1 02/11] ci: increase timeout for hw tests Marek Marczykowski-Górecki
2025-04-03 11:32   ` Jan Beulich
2025-04-03 12:25     ` Marek Marczykowski-Górecki
2025-04-04  0:21       ` Stefano Stabellini
2025-04-04  0:35         ` Marek Marczykowski-Górecki
2025-04-03 11:04 ` [PATCH v1 03/11] ci: enable XHCI console in Xen debug build on Alpine Marek Marczykowski-Górecki
2025-04-04  0:22   ` Stefano Stabellini
2025-04-03 11:04 ` [PATCH v1 04/11] ci: include domU kernel messages in the console output log Marek Marczykowski-Górecki
2025-04-04  0:23   ` Stefano Stabellini
2025-04-03 11:04 ` [PATCH v1 05/11] ci: increase verbosity of starting a domain Marek Marczykowski-Górecki
2025-04-04  0:33   ` Stefano Stabellini
2025-04-03 11:04 ` [PATCH v1 06/11] ci: consistently use DOCKER_CMD in makefiles Marek Marczykowski-Górecki
2025-04-04  0:35   ` Stefano Stabellini
2025-04-03 11:04 ` [PATCH v1 07/11] ci: wait for the network interface in PCI passthrough tests Marek Marczykowski-Górecki
2025-04-04  0:36   ` Stefano Stabellini
2025-04-03 11:04 ` [PATCH v1 09/11] ci: adjust resolving network interface into PCI device Marek Marczykowski-Górecki
2025-04-04  0:45   ` Stefano Stabellini
2025-04-03 11:04 ` [PATCH v1 10/11] ci: add AMD Zen 4 HW runner Marek Marczykowski-Górecki
2025-04-04  0:46   ` Stefano Stabellini
2025-04-03 11:04 ` [PATCH v1 11/11] [DO NOT MERGE] container Marek Marczykowski-Górecki
     [not found] ` <612750de76202364b749bda6cdd30c1daa81f79d.1743678257.git-series.marmarek@invisiblethingslab.com>
     [not found]   ` <alpine.DEB.2.22.394.2504031737290.3529306@ubuntu-linux-20-04-desktop>
2025-04-04 11:13     ` [PATCH v1 08/11] ci: switch test kernel from 6.1.19 to 6.12.21 Marek Marczykowski-Górecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_B5I-cKaLU0xcxL@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=jbeulich@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.