Git development
 help / color / mirror / Atom feed
From: Tamir Duberstein <tamird@gmail.com>
To: git@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>,
	Junio C Hamano <gitster@pobox.com>,  Jeff King <peff@peff.net>,
	Tamir Duberstein <tamird@gmail.com>
Subject: [PATCH v3 0/2] ci: use cmp and align job-count selection
Date: Wed, 30 Sep 2026 10:20:33 -0400	[thread overview]
Message-ID: <20260930-ci-large-test-resources-v3-0-d65ac7c21b5f@gmail.com> (raw)
In-Reply-To: <20260925-ci-large-test-resources-v2-0-f632cf319756@gmail.com>

The first patch uses cmp for the huge commit-message output comparison.
On this input, GNU diffutils 3.8 on Linux arm64 takes 5.276 seconds with
4,199,924 KiB peak RSS for diff, versus 0.506 seconds and 1,264 KiB for
cmp. Patch 1 includes the fixture and measurement details.

The second patch uses twice the detected CPU count for Make and prove
on both GitHub Actions and GitLab CI. This replaces GitHub's fixed ten
jobs and doubles GitLab's job count. The GitHub measurements in patch 2
favor 2*N over N, with mixed results against ten jobs. GitLab runtime and
resource use have not been measured.

Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
The table in patch 2 uses attempts 1-5 of each linked run. Its rows
aggregate ten Linux jobs, three macOS jobs, and a Windows build plus ten
test shards. Failed steps are excluded. Each job has five samples,
except one CPU-count Windows shard and one 2x-CPU Linux job with four.

Five further attempts per policy for osx-clang on three-CPU macOS
runners gave these successful build/test-step medians (minutes:seconds):

  Jobs                3       6       10
  Median          48:10   36:44    38:05.5
  Passed              5       5        4
  Cancelled           0       0        1

Six jobs had lower times than three in each block. The ten-job
cancellation followed six hours in the build/test step; its cause is
unknown. It is excluded from the successful-duration median above.
These are attempts 6-10 of the runs linked in patch 2, separate from its
earlier full CI matrix measurements. Neither experiment measured peak
memory or disk use.

Changes in v3:
- Use twice the CPU count on both providers, instead of adopting
  GitLab's existing one-job-per-CPU policy.
- Include CI timings and their tradeoffs in patch 2's commit message,
  and explain the use of sysctl directly.
- Patch 1 is unchanged.
- Link to v2: https://patch.msgid.link/20260925-ci-large-test-resources-v2-0-f632cf319756@gmail.com

Changes in v2:
- Replace the unavailable CI failure reference with comparison runtime
  and peak RSS measurements.
- Drop the file removal; following tests overwrite expect and actual.
- Share job-count selection between GitHub Actions and GitLab CI.
- Use native CPU-count queries on macOS and Windows.
- Link to v1: https://patch.msgid.link/20260923-ci-large-test-resources-v1-0-c28416d59475@gmail.com

---
Tamir Duberstein (2):
      t4205: compare huge output without diff
      ci: use twice the CPU count on both providers

 ci/lib.sh                     | 17 +++++++++++++----
 t/t4205-log-pretty-formats.sh |  2 +-
 2 files changed, 14 insertions(+), 5 deletions(-)

---
Range-diff versus v2:

1:  5cf348a75c = 1:  4a15b8f17d t4205: compare huge output without diff
2:  3b9bd2c495 ! 2:  d444411070 ci: align job counts across CI providers
    @@ Metadata
     Author: Tamir Duberstein <tamird@gmail.com>
     
      ## Commit message ##
    -    ci: align job counts across CI providers
    +    ci: use twice the CPU count on both providers
     
         GitHub Actions sets JOBS to ten regardless of runner size, while
    -    GitLab CI uses the detected CPU count. Use the CPU count for Make and
    -    prove on both providers, selecting JOBS after the operating system
    -    is identified.
    +    GitLab CI uses the detected CPU count. Use twice the CPU count for
    +    Make and prove on both providers, doubling GitLab's job count.
     
    -    Use nproc on Linux and NUMBER_OF_PROCESSORS on Windows. On macOS, use
    -    sysctl to avoid requiring nproc before the dependency installer has run;
    -    GitHub macOS images need not provide GNU coreutils.
    +    Five GitHub Actions attempts per policy, with the long tests enabled,
    +    gave these sums of per-job median successful build/test-step times
    +    (minutes; four or five samples per job) [1-3]:
    +
    +                          Fixed 10   CPU count   2x CPU count
    +      Linux Make             278.9       273.9          259.9
    +      macOS Make              94.5       119.1           99.8
    +      Windows Make           102.2       103.8          100.8
    +
    +    Workflow overhead is excluded; Windows runner images varied.
    +
    +    Use twice the CPU count to scale concurrency with runner size while
    +    avoiding the larger macOS slowdown observed with one job per CPU.
    +    Compared with ten jobs, this trades a lower Linux total for a higher
    +    macOS total.
    +
    +    Keep GitLab's Linux and Windows CPU queries. On macOS, use the native
    +    sysctl command on both providers so CPU detection does not depend on
    +    GNU coreutils.
    +
    +    Link: https://github.com/tamird/git/actions/runs/36070869894/attempts/1 [1]
    +    Link: https://github.com/tamird/git/actions/runs/36070867524/attempts/1 [2]
    +    Link: https://github.com/tamird/git/actions/runs/36070867647/attempts/1 [3]
     
         Assisted-by: LLM
         Signed-off-by: Tamir Duberstein <tamird@gmail.com>
    @@ ci/lib.sh: else
     +	JOBS=$(nproc)
     +	;;
     +esac
    ++JOBS=$((2 * JOBS))
     +
      MAKEFLAGS="$MAKEFLAGS --jobs=$JOBS"
      GIT_PROVE_OPTS="--timer --jobs $JOBS"

---
base-commit: 3bc0341126508f78f5869cbfc0005e987efdf0c7
change-id: 20260923-ci-large-test-resources-349cdc95f7f8


  parent reply	other threads:[~2026-09-30 14:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 17:13 [PATCH 0/2] ci: reduce pressure from large test fixtures Tamir Duberstein
2026-09-23 17:13 ` [PATCH 1/2] t4205: compare huge output without diff Tamir Duberstein
2026-09-24  6:13   ` Patrick Steinhardt
2026-09-24 20:41     ` Tamir Duberstein
2026-09-25  0:13       ` Jeff King
2026-09-25  6:41         ` Junio C Hamano
2026-09-28  6:36       ` Patrick Steinhardt
2026-09-23 17:13 ` [PATCH 2/2] ci: match Linux jobs to available CPUs Tamir Duberstein
2026-09-24  6:13   ` Patrick Steinhardt
2026-09-25 15:03     ` Tamir Duberstein
2026-09-23 18:36 ` [PATCH 0/2] ci: reduce pressure from large test fixtures Tamir Duberstein
2026-09-25 16:35 ` [PATCH v2 0/2] ci: use cmp and align job-count selection Tamir Duberstein
2026-09-25 16:35   ` [PATCH v2 1/2] t4205: compare huge output without diff Tamir Duberstein
2026-09-28  6:36     ` Patrick Steinhardt
2026-09-25 16:35   ` [PATCH v2 2/2] ci: align job counts across CI providers Tamir Duberstein
2026-09-28  6:36     ` Patrick Steinhardt
2026-09-28 10:16       ` Tamir Duberstein
2026-09-28 11:14         ` Patrick Steinhardt
2026-09-30 14:20   ` Tamir Duberstein [this message]
2026-09-30 14:20     ` [PATCH v3 1/2] t4205: compare huge output without diff Tamir Duberstein
2026-09-30 14:20     ` [PATCH v3 2/2] ci: use twice the CPU count on both providers Tamir Duberstein
2026-09-30 14:45       ` Patrick Steinhardt
2026-09-30 14:45     ` [PATCH v3 0/2] ci: use cmp and align job-count selection Patrick Steinhardt
2026-09-30 14:58       ` Tamir Duberstein
2026-09-30 18:04         ` Junio C Hamano

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=20260930-ci-large-test-resources-v3-0-d65ac7c21b5f@gmail.com \
    --to=tamird@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox