Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Why BitBucket server has [gc] auto = 0 by default

Alexander Ashitkin December 12, 2017

Hi

please clarify why bb server has such value by default. As per Git gc documentation this turns off automatic garbage collection. Obviously, repository should has some housekeeping in place to avoid performance degradation. So several questions arise here:

1) What is the intention around the 0? Why it is 0?

2) What are implications of changing this value to non-zero value?

3) What is the recommended approach to repo housekeeping in bitbucket? 

Thanks in advance.

 

PS i've read the FAQ but the answer there looks a bit vague to me.

2 answers

1 accepted

1 vote
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 12, 2017

Hi Alexander,

Automatic garbage collection is disabled by default because Bitbucket Server manages garbage collection itself. Disabling auto-gc ensures that garbage collection does not interfere with users pushing new commits, or merging of pull requests.

Instead of relying on auto-gc, Bitbucket Server schedules garbage collection to happen asynchronously, which ensures that user operations are not unnecessarily slowed down.

> 2) What are implications of changing this value to non-zero value?

You should not change this value. Changing it can cause user operations to slow down.

> 3) What is the recommended approach to repo housekeeping in bitbucket? 

As said, Bitbucket takes care of the repository housekeeping, but doesn't use git's auto-gc to do it.

Hope this clears up things!

Cheers,

Michael

Alexander Ashitkin December 12, 2017

Thanks a lot Michael - very comprehensive and clear answer. 

0 votes
Yaron Norani March 12, 2018

Hi Michael, My repository is growing , and BB GC does not start.

The repository was about 30 GB. Now it is about 230 GB !

Only 'git gc' that was executed manually reduced the size to 38 GB.

How can I know when BB GC will be executed ?

Tim Black April 15, 2019

I have the same question as yaron n. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events