Open ieugen opened 8 years ago
I see you are loading 12 repos. How large are they? Are you serving your repos from a network share? What hardware are you running Gitblit on? How much memory does your box have? What is your Java heap setting?
Hello,
Thank you for the quick response. The repositories are not large - but why should that count? Are you pre-loading the repos? This should be done lazy, no?
I'm running on Debian - Digital Ocean droplet - SSD with 1gb of RAM. Restarted gitblit to watch RAM usage - stayed at 392 MB. Files are local.
The strange thing is that now it works ok. I have no idea what changed. I did reboot the machine to fix it but it was still loading slow.
Now, I logged to get information for a response and decided to restart the service just because. Now it loads fast.
It might do some network checks when it starts and the network was running slow, and now it's ok?
$ cat /etc/default/gitblit
MODE=service
#-Dlog4j.configuration=file:/opt/gitblit/data/log4j.properties
JAVA_OPTS="-Xmx128M -Dcom.unboundid.ldap.sdk.debug.enabled=true -Dcom.unboundid.ldap.sdk.debug.level=DEBUG"
$ cat /etc/systemd/system/gitblit.service
[Unit]
Description= Gitblit server
After=network.target remote-fs.target
[Service]
User=gitblit
WorkingDirectory=/opt/gitblit/current
EnvironmentFile=/etc/default/gitblit
ExecStart=/usr/bin/java $JAVA_OPTS -jar /opt/gitblit/current/gitblit.jar --baseFolder /opt/gitblit/data --shutdownPort=-1
ExecStop=/usr/bin/java $JAVA_OPTS -jar /opt/gitblit/current/gitblit.jar --baseFolder /opt/gitblit/data --stop
[Install]
WantedBy=multi-user.target
p.s. You can use the files for systemd config examples. p.s. The reason I'm restarting the service is that I'm working on LDAP auth and things don't seem to work ok so I'm updating configs and restart - to login.
The repositories are not large - but why should that count? Are you pre-loading the repos?
Yes. Pre-loading & caching. This is to reduce request processing time.
Could you do that in a worker thread or lazy during startup?
Possibly, but we have not identified this as the source of your slowdown.
True :). Thanks again for the support.
Hi, Thanks to this thread I now understand my server's slowness. Preloading & caching >300 repo, some quite large can be VERY lengthy.
Any way to shorten the loading time?
web.activityCacheDays
read notes!)I'm pretty sure something's messed up with caching. On a fresh install (with the existing several hundred repos) it's like half a minute. Then eventually it slows down. Now I clocked it, 18 minutes.
Then I changed web.activityCacheDays to 3 (from the default 14), and it went down to 16 seconds. From 1113 seconds. Speaking of nonlinear...
Hello,
I have configured gitblit on my machine and all was well until now. It seems whenever I start /restart the service it takes very long time to start SSH Manger and the web gui.
As you can see, it takes
Started @136214ms
to start =136 seconds