git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Help troubleshoot performance regression cloning with depth: git 2.44 vs git 2.42
@ 2024-05-01  5:26 Dhruva Krishnamurthy
  2024-05-01 22:00 ` using tree as attribute source is slow, was " Jeff King
  0 siblings, 1 reply; 20+ messages in thread
From: Dhruva Krishnamurthy @ 2024-05-01  5:26 UTC (permalink / raw)
  To: git

Hello,
Cloning by specifying depth exhibits performance regression in
pack-objects (~20x). The repository I am cloning is on NFS (mounted
with NFSv3 & positive lookup cache enabled).

Ran under 'perf' command to capture profiling information to see if
something really stands out. There is a significant overhead in calls
to file open/open64, fstat64 & mmap/munmap in git 2.44 compared to git
2.42. Not sure if there is an increase in the number of calls or
something more is done.

Could someone please guide me on how to troubleshoot this better?

--- Details of the test environment and the clone commands with output ---
# There are 10 loose objects under objects/08
$ git count-objects -vH
count: 3627
size: 25.84 MiB
in-pack: 1108374
packs: 2
size-pack: 303.38 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

# Simple driver script to enable performance tracking for upload-pack only
$ cat trace-git-upload-pack
#!/usr/bin/env bash
export GIT_TRACE_PERFORMANCE=true
exec git-upload-pack "$@"

# git clone with 2.42: pack objects take 17s
$ /opt/git/bin/git clone --no-checkout --no-local --depth=500
--upload-pack=$(pwd)/trace-git-upload-pack .. prod
Cloning into 'prod'...
remote: Enumerating objects: 669941, done.
remote: Counting objects: 100% (669941/669941), done.
remote: Compressing objects: 100% (154988/154988), done.
Receiving objects: 100% (669941/669941), 144.54 MiB | 25.78 MiB/s, done.
remote: Total 669941 (delta 533745), reused 645666 (delta 512193), pack-reused 0
remote: 05:35:40.654828 trace.c:414             performance:
17.098198597 s: git command: git --shallow-file '' pack-objects --revs
--thin --stdout --shallow --progress --delta-base-offset --include-tag
        05:35:40.708162 trace.c:414             performance:
24.764812264 s: git command: git-upload-pack /large_repo/perf/..
Resolving deltas: 100% (533745/533745), done.
Checking connectivity: 669940, done.

# git clone with 2.44: pack objects take 325s
$ /opt/gitn/bin/git clone --no-checkout --no-local --depth=500
--upload-pack=$(pwd)/trace-git-upload-pack .. dev
Cloning into 'dev'...
remote: Enumerating objects: 669941, done.
remote: Counting objects: 100% (669941/669941), done.
remote: Compressing objects: 100% (154988/154988), done.
Receiving objects: 100% (669941/669941), 144.66 MiB | 29.08 MiB/s, done.
remote: Total 669941 (delta 533742), reused 645666 (delta 512193),
pack-reused 0 (from 0)
remote: 05:42:01.017156 trace.c:414             performance:
325.552424902 s: git command: git --shallow-file '' pack-objects
--revs --thin --stdout --shallow --progress --delta-base-offset
--include-tag
        05:42:01.063013 trace.c:414             performance:
330.965731114 s: git command: git-upload-pack /large_repo/perf/..
Resolving deltas: 100% (533742/533742), done.
Checking connectivity: 669940, done.

Best regards,
Dhruva

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-06-06 16:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-01  5:26 Help troubleshoot performance regression cloning with depth: git 2.44 vs git 2.42 Dhruva Krishnamurthy
2024-05-01 22:00 ` using tree as attribute source is slow, was " Jeff King
2024-05-01 22:37   ` rsbecker
2024-05-01 22:40   ` Junio C Hamano
2024-05-02  0:33   ` Taylor Blau
2024-05-02 17:33     ` Taylor Blau
2024-05-02 17:44       ` Junio C Hamano
2024-05-02 17:55         ` Taylor Blau
2024-05-02 19:01           ` Karthik Nayak
2024-05-02 21:08             ` Junio C Hamano
2024-05-03  5:37               ` Dhruva Krishnamurthy
2024-05-03 15:34                 ` Re* " Junio C Hamano
2024-05-03 17:46                   ` Jeff King
2024-05-06 20:28                     ` Taylor Blau
2024-05-13 20:16                   ` John Cai
2024-06-05 21:43                   ` [PATCH] attr.tree: HEAD:.gitattributes is no longer the default in a bare repo Junio C Hamano
2024-06-06  8:32                     ` Jeff King
2024-06-06 16:02                       ` Junio C Hamano
2024-05-02 18:34         ` using tree as attribute source is slow, was Re: Help troubleshoot performance regression cloning with depth: git 2.44 vs git 2.42 Dhruva Krishnamurthy
2024-05-02  0:45   ` Dhruva Krishnamurthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).