# Git server memory requirements

2 messages from 2014-03-21 to 2014-03-21. Participants: Cliff Brake, Robin H. Johnson.
Thread: https://gitlist.dev/t/36268

## Cliff Brake, 2014-03-21 17:38

Subject: Git server memory requirements
Message-ID: <CAOd_LFwDQZGHo+gUhNKzvT2B8iavN_75KjwwC6P=W3z11d9zAw@mail.gmail.com>
URL: https://gitlist.dev/e/CAOd_LFwDQZGHo%2BgUhNKzvT2B8iavN_75KjwwC6P%3DW3z11d9zAw%40mail.gmail.com

```
I'm trying to get an idea how much memory is required for a git server
that is hosting linux kernel repos.

What we're seeing is that git uses around 1GB of RAM on the server
when a user does a clone of the Linux kernel source over ssh.  Does
this seem about right?  Is this amount fixed, or arbitrary (trade-off
memory for speed).  It seems subsequent concurrent clones use less
memory.

Is there any practical way to reduce the memory usage?  We're running
into occasional issues if there are multiple clones at once.

Is setting gc.auto=0 a good idea for large kernel repos?  The idea is
we can repack manually or in a cron on weekends rather than during
user operations.  However, manually running a git gc seems to use
about as much memory as a user clone.

It may be that our EC2 small instance (2.5GB) is not up to the task,
but would like to understand options (we can easily trade off some
speed for less memory if we can) before upgrading.

Thanks,
Cliff

```

## Robin H. Johnson, 2014-03-21 20:10

Subject: Re: Git server memory requirements
Message-ID: <20140321201027.GA2858@orbis-terrarum.net>
URL: https://gitlist.dev/e/20140321201027.GA2858%40orbis-terrarum.net
In-Reply-To: <CAOd_LFwDQZGHo+gUhNKzvT2B8iavN_75KjwwC6P=W3z11d9zAw@mail.gmail.com>

```
On Fri, Mar 21, 2014 at 01:38:01PM -0400,  Cliff Brake wrote:
> I'm trying to get an idea how much memory is required for a git server
> that is hosting linux kernel repos.
Speaking for Gentoo here, as we're working on our large repo migration,
and this was a concern originally. So far it's best mitigated by the
pack-bitmap patches in the next branch.

The initial clones become significantly faster and much less resource
intensive.

I'm hoping that the packed bitmap series lands soon in the master branch
and a formal release (a big +1 from me for it).

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Infrastructure Lead
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85

```
