* Windows: ~1 GB RAM per git process, many concurrent (2.56.0.windows.1)
@ 2026-10-02 11:04 Pierre Bruno
2026-10-02 19:28 ` brian m. carlson
2026-10-02 22:19 ` Jeff King
0 siblings, 2 replies; 3+ messages in thread
From: Pierre Bruno @ 2026-10-02 11:04 UTC (permalink / raw)
To: git@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
Hi,
On Windows, git status-type commands use about 1 GB of RAM per
process, and dozens run at once when I use coding agents (OpenCode and
Oh My Pi) in a repository. CPU is near 0%, disk I/O is steady, and the
total is several GB. Since two unrelated tools cause it, I suspect git
or my repo.
Expected: a few short-lived git processes with far less memory.
git version 2.56.0.windows.1 (commit 49d759b698127791a5f3f2759c69b983846711dd,
fsmonitor--daemon enabled), Windows <version>
Repo: <N files / GB>, <N> untracked files
Manual 'git status' with no other tool running: <fast/slow, memory>
Stable 2.55.0: <same/different>
Command line seen in Task Manager: <paste>
Is ~1 GB per process expected here, and is there a recommended config to
reduce it? Full 'git bugreport' attached.
Thanks,
Pierre Bruno
[-- Attachment #2: Screenshot 2026-10-02 130341.png --]
[-- Type: image/png, Size: 117065 bytes --]
[-- Attachment #3: Screenshot 2026-10-02 124754.png --]
[-- Type: image/png, Size: 138173 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Windows: ~1 GB RAM per git process, many concurrent (2.56.0.windows.1)
2026-10-02 11:04 Windows: ~1 GB RAM per git process, many concurrent (2.56.0.windows.1) Pierre Bruno
@ 2026-10-02 19:28 ` brian m. carlson
2026-10-02 22:19 ` Jeff King
1 sibling, 0 replies; 3+ messages in thread
From: brian m. carlson @ 2026-10-02 19:28 UTC (permalink / raw)
To: Pierre Bruno; +Cc: git@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1693 bytes --]
On 2026-10-02 at 11:04:00, Pierre Bruno wrote:
> Hi,
>
> On Windows, git status-type commands use about 1 GB of RAM per
> process, and dozens run at once when I use coding agents (OpenCode and
> Oh My Pi) in a repository. CPU is near 0%, disk I/O is steady, and the
> total is several GB. Since two unrelated tools cause it, I suspect git
> or my repo.
>
> Expected: a few short-lived git processes with far less memory.
>
> git version 2.56.0.windows.1 (commit 49d759b698127791a5f3f2759c69b983846711dd,
> fsmonitor--daemon enabled), Windows <version>
> Repo: <N files / GB>, <N> untracked files
> Manual 'git status' with no other tool running: <fast/slow, memory>
> Stable 2.55.0: <same/different>
> Command line seen in Task Manager: <paste>
>
> Is ~1 GB per process expected here, and is there a recommended config to
> reduce it? Full 'git bugreport' attached.
I think you omitted the attachment, but in any event, I would say that
this is not normally expected for `git status`. We'd really need to
know what the command line of those processes is for us to know what
they're for; for instance, you may be triggering maintenance on the
repository, in which case packing a large repository could legitimately
use that much memory. Similarly, if you're using a file system monitor
process, that could consume a large amount of memory in a large
repository.
I don't personally use Windows, so I'm afraid I can't tell you how to
get that information there. Once you have it, though, it should be
clearer if that's a reasonable amount of memory to be using given the
size of your repository.
--
brian m. carlson (they/them)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 325 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Windows: ~1 GB RAM per git process, many concurrent (2.56.0.windows.1)
2026-10-02 11:04 Windows: ~1 GB RAM per git process, many concurrent (2.56.0.windows.1) Pierre Bruno
2026-10-02 19:28 ` brian m. carlson
@ 2026-10-02 22:19 ` Jeff King
1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2026-10-02 22:19 UTC (permalink / raw)
To: Pierre Bruno; +Cc: git@vger.kernel.org
On Fri, Oct 02, 2026 at 11:04:00AM +0000, Pierre Bruno wrote:
> On Windows, git status-type commands use about 1 GB of RAM per
> process, and dozens run at once when I use coding agents (OpenCode and
> Oh My Pi) in a repository. CPU is near 0%, disk I/O is steady, and the
> total is several GB. Since two unrelated tools cause it, I suspect git
> or my repo.
Is that counting shared, mmap'd memory? Git will mmap the on-disk
packfiles (or on Windows, CreateFileMapping/MapViewOfFile). So if your
repository has a 1GB packfile, that could explain it. And it can lead to
two unintuitive conclusions:
1. If you have several git-status processes, they're sharing all of
those pages. So it's still only 1GB of memory use.
2. Git will make a large map and assume the OS will fault in only the
pages that are needed. So you may see a large virtual memory size,
but a lower resident size (these are the terms I'd expect from
"top" on Linux; I don't know what terms you might see on Windows).
You may also see a large resident size if the OS has faulted in all of
those pages (e.g., due to other commands). Ironically this is a sign
that you _don't_ have a lot of memory pressure (otherwise, the unused
pages would have been dropped). Again, this is coming from the Linux
side of things; I don't know how aggressively (or not) Windows is about
faulting in or releasing pages from mapped files.
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-02 22:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02 11:04 Windows: ~1 GB RAM per git process, many concurrent (2.56.0.windows.1) Pierre Bruno
2026-10-02 19:28 ` brian m. carlson
2026-10-02 22:19 ` Jeff King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox