装了一个 gitlab,在配置一般的云服务器上怎样提升打开页面的速度

2016-06-28 21:08:19 +08:00
 maemo
买了一台云服务器,单核 1G 的配置,带宽 1M 。
在上面配置好了 gitlab ,用的是 nginx 。
域名解析本来用万网自己的,感觉有点慢,换了 dnspod, 好像速度都差不多。

请教在资源有限的情况下有没有其它办法优化访问速度
9579 次点击
所在节点    程序员
27 条回复
powergx
2016-06-28 21:11:01 +08:00
我本地的,远端访问都飞快
visonnn
2016-06-28 21:30:57 +08:00
配置太低了,我这边用双核 4G ,速度飞起来。
visonnn
2016-06-28 21:31:53 +08:00
噢没看仔细楼主说资源有限,抱歉抱歉,忽略我。
tczzjin
2016-06-28 21:55:57 +08:00
服务器的配置太低了。。。 gitlab 现在非常臃肿的。。至少 4 核起吧。。。
maemo
2016-06-28 22:16:37 +08:00
@tczzjin gitlab 确实有点臃肿,有哪些其它类似 gitlab 的可推荐一下
owt5008137
2016-06-28 22:24:42 +08:00
@maemo 以前看到的,当时功能还没 gitlab 完整,现在不清楚怎么样了。 https://gogs.io
DesignerSkyline
2016-06-28 22:25:09 +08:00
买一台国外的独服(国内的太贵了),内存 ≥ 4G
再买一台国内的 VPS 来反代,就 OK 了,绝对能提高打开速度。。。。。
unfurl
2016-06-28 22:40:00 +08:00
gogs 吧,感觉比较轻
tczzjin
2016-06-28 22:53:57 +08:00
@maemo 可以试试 gogs 。纯 go 写的功能少占用也低
maemo
2016-06-28 23:28:28 +08:00
@DesignerSkyline 这个思路不错哦

@unfurl @tczzjin 也可以试试 gogs ,谢谢推荐哈
lujiajing1126
2016-06-28 23:32:53 +08:00
ror 很吃资源。。而且 gitlab 起的 sidekiq 也是吃资源大户。。如果资源足够可以试试 http2 打开速度有帮助
imswing
2016-06-28 23:44:05 +08:00
我在同样配置下,老是会莫名其妙 500 ,后来加了一 G 的 swap 好点了。
lslqtz
2016-06-28 23:47:18 +08:00
@DesignerSkyline 国内也不贵啊 淘宝一堆垃圾 vps 。。
那些云都是出来坑爹的。
maemo
2016-06-28 23:51:48 +08:00
@imswing 我也是加了 1G 的 swap 才没有 500 的
maemo
2016-06-28 23:54:56 +08:00
@lslqtz 淘宝 vps 靠谱吗
lslqtz
2016-06-28 23:57:03 +08:00
@maemo 做好备份妥妥的靠谱呀,按月买。
dzxx36gyy
2016-06-29 00:16:00 +08:00
@lslqtz 你让楼主去买淘宝那些超售到爆炸动不动就跑路丢数据的 vps 真的好吗……
hanxiV2EX
2016-06-29 08:16:02 +08:00
装本地,在 vps 上装 ngrok 反代。
sxul07
2016-06-29 08:40:34 +08:00
配置太低了。。我之前也是这个配置装的 挺卡的 多加 1CPU 1G 内存会好很多
pH
2016-06-29 10:04:03 +08:00
借地问一下,实验室布了个 gitlab ,有公网 ip ,为啥教育网之外就不能访问。下面是 iptables 的输出
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- 192.168.1.0/24 anywhere
ACCEPT icmp -- anywhere anywhere icmp echo-reply
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp fragmentation-needed
ACCEPT icmp -- anywhere anywhere icmp source-quench
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp parameter-problem
ACCEPT icmp -- anywhere anywhere icmp timestamp-reply
ACCEPT icmp -- anywhere anywhere icmp type 16
ACCEPT icmp -- anywhere anywhere icmp address-mask-reply
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http


我感觉没问题啊

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/288955

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX