如何配置Gogs以快速加载大型Git仓库?

huangapple go评论100阅读模式
英文:

How can gogs be configured to load large git repositories fast?

问题

我在我的DigitalOcean虚拟机上使用1个CPU、1GB RAM和30GB SSD安装了gogs。它在小型存储库上运行良好,一切都很迅捷。为了测试gogs如何处理较大的存储库,我将git存储库克隆/导入到了我的gogs安装中。每次通过Web界面打开存储库时,加载时间至少需要5秒,CPU使用率保持在95%,内存使用率为900MB。所以我认为我的虚拟机资源不足。于是我调整了虚拟机的大小,给它分配了8个CPU核心和16GB的RAM。然而,加载git存储库仍然需要大约5秒的时间。我猜测这可能是一个配置问题,或者是gogs本身以及它处理git存储库的方式的问题。有没有办法让gogs在处理大型存储库时运行更快?

英文:

I setup gogs on my DigitalOcean virtual machine with 1 cpu, 1GB RAM and a 30GB SSD. It works well with small repositories and everything is snappy. To test how gogs handles larger repositories, I cloned/imported the git repository to my gogs installation. Everytime I open the repository through the web interface, it takes at least 5 seconds to load and CPU usage hovers at 95% and memory at 900MB. So i assumed my virtual machine resources were insufficient. So I resized the virtual machine and gave it 8 CPU cores and 16GB of RAM. Yet, loading the git repository still takes around 5 seconds. My guess is that it's either a configuration issue or a problem with gogs itself and the way it handles git repositories. Is there a way to get gogs to work fast with large repositories?

答案1

得分: 0

这是 gogs 的已知限制。该问题可以在这里进行跟踪。
可以通过构建一个缓存系统来解决这个问题,用于存储 git 仓库的数据。

英文:

This is a known limitation of gogs. The issue can be tracked here.
This issue can be rectified by building a cache system for git repository data.

huangapple
  • 本文由 发表于 2016年4月11日 02:24:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/36533727.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定