Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

very slow repository access over web and very slow startup #1091

Closed
airot opened this issue Jun 24, 2016 · 7 comments
Closed

very slow repository access over web and very slow startup #1091

airot opened this issue Jun 24, 2016 · 7 comments

Comments

@airot
Copy link

airot commented Jun 24, 2016

Hi,

we have around 60 repositories whom weight around 12GB.
Server startup: 2016-06-23 22:23:53 [INFO ] Started @174304ms
accessing repository with 8,083 changes 671 tags in past 2 years takes around 20 seconds,
by accessing I mean going to summary page. This repository weights around 700MB.
We've tried to move tickets into redis, but it didn't help so we switched back to file based.

What can we change to make it faster? Is it possible at all in gitblit?

Box is CentOS 6 with 2 CPUs and 4GB of RAM. Current version is 1.8.0
few of settings from gitblit.properties are:
git.cacheRepositoryList = true
git.enableGarbageCollection = false
git.garbageCollectionHour = 0
git.defaultGarbageCollectionThreshold = 500k
git.defaultGarbageCollectionPeriod = 7
git.mirrorPeriod = 30 mins
git.packedGitWindowSize = 8k
git.packedGitLimit = 1500m
git.deltaBaseCacheLimit = 10m
git.packedGitOpenFiles = 256
git.streamFileThreshold = 50m
git.maxObjectSizeLimit = 0
git.maxPackSizeLimit = -1
tickets.service = com.gitblit.tickets.FileTicketService
tickets.perPage = 25

@andy-nicholas
Copy link

andy-nicholas commented Jun 26, 2016

Try replacing the JGIT java package with the latest one (I think it's around 4.4). We had the same problem. Insane slowness to do anything if the repo was large. After replacing JGIT it's super-fast. The current version of JGIT should be updated to include the better version of JGIT from the Eclipse guys.

https://eclipse.org/jgit/

Good luck.

@airot
Copy link
Author

airot commented Jun 26, 2016

Simply remove jgit* from ext and put latest one will do the trick?

@paulsputer
Copy link
Collaborator

paulsputer commented Jun 26, 2016

Good to hear the latest JGit resolves this, Ticket #1030 will be addressing the latest JGit update in due course. It introduces support for handling .gitattribute files and its own mechanism for handling LFS and as such requires more integration effort hence not squeezed into the 1.8.0 release.

Do you use the LFS/Filestore capabilities?

@airot
Copy link
Author

airot commented Jun 27, 2016

Ok, how to update JGIT to be sure nothing breaks?

@airot
Copy link
Author

airot commented Jun 27, 2016

I've changed the ext/jgit extension from old to latest 4.4 version. From lsof I see that it's loaded:
java 52777 root mem REG 253,0 2357398 2663106 /opt/gitblit-1.8.0/ext/org.eclipse.jgit-4.4.0.201606070830-r.jar
java 52777 root mem REG 253,0 97067 2663107 /opt/gitblit-1.8.0/ext/org.eclipse.jgit.http.server-4.4.0.201606070830-r.jar
java 52777 root 35r REG 253,0 97067 2663107 /opt/gitblit-1.8.0/ext/org.eclipse.jgit.http.server-4.4.0.201606070830-r.jar
java 52777 root 36r REG 253,0 2357398 2663106 /opt/gitblit-1.8.0/ext/org.eclipse.jgit-4.4.0.201606070830-r.jar

no change in performance. Still takes LOTS of time to load. Any other hints?

@gitblit
Copy link
Owner

gitblit commented Jun 29, 2016

The repo Summary page and the project/root Dashboard pages are the most expensive pages to generate.

Things you could try to improve server loading speed....

  1. shorten commit cache window (web.activityCacheDays = 3, web.activityDuration = 3)
  2. disable commit caching altogether (web.activityCacheDays = 0)
  3. disable repo size calculations (web.showRepositorySizes = false)

Things you could try to improve repo Summary page speed...

  1. disable repo summary metrics & activity graph (web.generateActivityGraph = false)

@flaix
Copy link
Collaborator

flaix commented Nov 27, 2019

Closing this as Fixed, since updating JGit seems to do the trick. Gitblit was updated to JGit 4.5.
eaaf99e

@flaix flaix closed this as completed Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants