Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » Memory consumption for DirCacheCheckout(Getting OutOfMemory on moderate-sized Git repostories)
Memory consumption for DirCacheCheckout [message #1871787] Thu, 10 October 2024 13:24 Go to next message
Eclipse UserFriend
I have a Git repo that's about 25M in size:
$ du -sb prj1
26878375        prj1

It has about 6700 files in about 1500 folders.

git clone uses about 17M of RAM max:
$ /usr/bin/time -v git clone mygitserver.com/prj1
...
        Maximum resident set size (kbytes): 16532


But jgit (7.0.0) runs out of memory on my microservice with -Xmx256m (it does so even if I do -Xmx350m)

It seems that DirCacheCheckout holds 57M in updated field, and 63M in builder.

Baseline for the microservice is about 85M, so it looks that to checkout this repo jgit needs more than ~160M.

Is there a way to improve memory usage or tell jgit a cache limit??
Re: Memory consumption for DirCacheCheckout [message #1871790 is a reply to message #1871787] Thu, 10 October 2024 18:43 Go to previous messageGo to next message
Eclipse UserFriend
How can the updated hashmap end up with 271k elements when checking out 6.7k files (folders aren't tracked in the git index) ?
Can you retry and create a heap dump when the OOM strikes and analyze that using memory analyzer ?

This forum and also Bugzilla were deprecated by the Eclipse Foundation and will be shutdown. Hence we moved to
our GitHub mirror at https://github.com/eclipse-jgit/jgit for discussions and issue tracking.
Re: Memory consumption for DirCacheCheckout [message #1871805 is a reply to message #1871790] Fri, 11 October 2024 10:27 Go to previous message
Eclipse UserFriend
Conversation moved to https://github.com/eclipse-jgit/jgit/discussions/97
Previous Topic:CVE-2023-4759 workaround for JGit 4.1.1
Next Topic:authentication not supported (when accessing Git repository from Overleaf)
Goto Forum:
  


Current Time: Mon May 12 15:26:32 EDT 2025

Powered by FUDForum. Page generated in 1.16650 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top