4

Can I use single-threaded compression in Git for large repositories and usual parallelized one for small ones? Like "pack.threads=1" if don't easily fit in momory and "pack.threads=4" otherwise.

As I heart somewhere, multithreaded "git gc" requires a lot memory and thrashes (or just fails) longer that singlethreaded.

I want it to work fast for small repos and don't fail on big repos.

Vi.
  • 37,014
  • 18
  • 93
  • 148
  • Is the performance of this setting impacted by the repository size? I thought it was only related to number of cores? – Arafangion Mar 09 '11 at 23:22
  • @Arafangion, Multiple threads => much more memory needed (may be even proportionally). Lack of memory => swapping => slow. – Vi. Mar 10 '11 at 09:30

1 Answers1

4

You can configure pack.threads per repository, but I doubt that there is a setting to do this automatically depending on the size of the repository.

Lars Noschinski
  • 3,667
  • 16
  • 29