安装之后操作Gitlab网页端时候会有些卡顿,可以修改配置来改善性能:
提前说明:我的机器配置如下
两个40线程的处理器 160G内存
# //处理器CPU(s): 40 On-line CPU(s) list: 0-39Vendor ID: GenuineIntel Model name: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz CPU family: 6 Model: 79 Thread(s) per core: 2 Core(s) per socket: 10 Socket(s): 2# //内存条Memory block size: 2GTotal online memory: 160G
调整配置
修改配置文件sudo vim /etc/gitlab/gitlab.rb
# 设置数据库缓存postgresql['shared_buffers'] = "4GB"# 设置数据库并发数postgresql['max_worker_processes'] = 1# 设置puma 、nginx进程数puma['worker_processes'] = 8nginx['worker_processes'] = 2# 设置sidekiq并发数sidekiq['concurrency'] = 1sidekiq['max_concurrency'] = 1# 禁用监控prometheus_monitoring['enable'] = false# 关闭一些监控和性能基准相关的功能prometheus['enable'] = false#prometheus_monitoring['enable'] = falsealertmanager['enable'] = falsenode_exporter['enable'] = falseredis_exporter['enable'] = falsepostgres_exporter['enable'] = falsepgbouncer_exporter['enable'] = falsegitlab_exporter['enable'] = falsegrafana['enable'] = falsesidekiq['metrics_enabled'] = false# 设置gitlab_rails组件的内存消耗gitlab_rails['env'] = { 'MALLOC_CONF' => 'dirty_decay_ms:250,muzzy_decay_ms:250'}
最后重新加载配置:
sudo gitlab-ctl reconfigure
重新访问Gitlab,加载很丝滑~