Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
4998f4e2
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4998f4e2
编写于
1月 15, 2020
作者:
G
GitLab Bot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add latest changes from gitlab-org/gitlab@master
上级
c9bd888d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
61 addition
and
6 deletion
+61
-6
app/assets/javascripts/diffs/components/app.vue
app/assets/javascripts/diffs/components/app.vue
+10
-3
doc/administration/operations/puma.md
doc/administration/operations/puma.md
+46
-0
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/javascripts/diffs/components/app_spec.js
spec/javascripts/diffs/components/app_spec.js
+5
-0
未找到文件。
app/assets/javascripts/diffs/components/app.vue
浏览文件 @
4998f4e2
...
...
@@ -163,9 +163,6 @@ export default {
},
isLoading
:
'
adjustView
'
,
showTreeList
:
'
adjustView
'
,
retrievingBatches
(
newVal
)
{
if
(
!
newVal
)
this
.
unwatchDiscussions
();
},
},
mounted
()
{
this
.
setBaseConfig
({
...
...
@@ -198,6 +195,16 @@ export default {
()
=>
`
${
this
.
diffFiles
.
length
}
:
${
this
.
$store
.
state
.
notes
.
discussions
.
length
}
`
,
()
=>
this
.
setDiscussions
(),
);
this
.
unwatchRetrievingBatches
=
this
.
$watch
(
()
=>
`
${
this
.
retrievingBatches
}
:
${
this
.
$store
.
state
.
notes
.
discussions
.
length
}
`
,
()
=>
{
if
(
!
this
.
retrievingBatches
&&
this
.
$store
.
state
.
notes
.
discussions
.
length
)
{
this
.
unwatchDiscussions
();
this
.
unwatchRetrievingBatches
();
}
},
);
},
beforeDestroy
()
{
eventHub
.
$off
(
'
fetchDiffData
'
,
this
.
fetchData
);
...
...
doc/administration/operations/puma.md
0 → 100644
浏览文件 @
4998f4e2
# Switching to Puma
## Puma
GitLab plans to use
[
Puma
](
https://github.com/puma/puma
)
to replace
[
Unicorn
](
https://bogomips.org/unicorn/
)
.
## Why switch to Puma?
Puma has a multi-thread architecture which uses less memory than a multi-process
application server like Unicorn.
Most Rails applications requests normally include a proportion of I/O wait time.
During I/O wait time MRI Ruby will release the GVL (Global VM Lock) to other threads.
Multi-threaded Puma can therefore still serve more requests than a single process.
## Performance caveat when using Puma with Rugged
For deployments where NFS is used to store Git repository, we allow GitLab to use
[
Direct Git Access
](
../gitaly/#direct-git-access-in-gitlab-rails
)
to improve performance via usage of
[
Rugged
](
https://github.com/libgit2/rugged
)
.
Rugged usage is automatically enabled if Direct Git Access is present, unless it
is disabled by
[
feature flags
](
../../development/gitaly.md#legacy-rugged-code
)
.
MRI Ruby uses a GVL. This allows MRI Ruby to be multi-threaded, but running at
most on a single core. Since Rugged can use a thread for long periods of
time (due to intensive I/O operations of Git access), this can starve other threads
that might be processing requests. This is not a case for Unicorn or Puma running
in a single thread mode, as concurrently at most one request is being processed.
We are actively working on removing Rugged usage. Even though performance without Rugged
is acceptable today, in some cases it might be still beneficial to run with it.
Given the caveat of running Rugged with multi-threaded Puma, and acceptable
performance of Gitaly, we are disabling Rugged usage if Puma multi-threaded is
used (when Puma is configured to run with more than one thread).
This default behavior may not be the optimal configuration in some situations. If Rugged
plays an important role in your deployment, we suggest you benchmark to find the
optimal configuration:
-
The safest option is to start with single-threaded Puma. When working with
Rugged, single-threaded Puma does work the same as Unicorn.
-
To force Rugged auto detect with multi-threaded Puma, you can use
[
feature
flags
](
../../development/gitaly.md#legacy-rugged-code
)
.
locale/gitlab.pot
浏览文件 @
4998f4e2
...
...
@@ -10959,9 +10959,6 @@ msgstr ""
msgid "List"
msgstr ""
msgid "List Label"
msgstr ""
msgid "List Settings"
msgstr ""
...
...
spec/javascripts/diffs/components/app_spec.js
浏览文件 @
4998f4e2
...
...
@@ -77,6 +77,7 @@ describe('diffs/components/app', () => {
beforeEach
(
done
=>
{
const
fetchResolver
=
()
=>
{
store
.
state
.
diffs
.
retrievingBatches
=
false
;
store
.
state
.
notes
.
discussions
=
'
test
'
;
return
Promise
.
resolve
({
real_size
:
100
});
};
spyOn
(
window
,
'
requestIdleCallback
'
).
and
.
callFake
(
fn
=>
fn
());
...
...
@@ -87,6 +88,7 @@ describe('diffs/components/app', () => {
spyOn
(
wrapper
.
vm
,
'
setDiscussions
'
);
spyOn
(
wrapper
.
vm
,
'
startRenderDiffsQueue
'
);
spyOn
(
wrapper
.
vm
,
'
unwatchDiscussions
'
);
spyOn
(
wrapper
.
vm
,
'
unwatchRetrievingBatches
'
);
store
.
state
.
diffs
.
retrievingBatches
=
true
;
store
.
state
.
diffs
.
diffFiles
=
[];
wrapper
.
vm
.
$nextTick
(
done
);
...
...
@@ -240,6 +242,7 @@ describe('diffs/components/app', () => {
expect
(
wrapper
.
vm
.
fetchDiffFilesBatch
).
not
.
toHaveBeenCalled
();
expect
(
wrapper
.
vm
.
unwatchDiscussions
).
toHaveBeenCalled
();
expect
(
wrapper
.
vm
.
diffFilesLength
).
toEqual
(
100
);
expect
(
wrapper
.
vm
.
unwatchRetrievingBatches
).
toHaveBeenCalled
();
done
();
});
...
...
@@ -258,6 +261,7 @@ describe('diffs/components/app', () => {
expect
(
wrapper
.
vm
.
fetchDiffFilesBatch
).
toHaveBeenCalled
();
expect
(
wrapper
.
vm
.
unwatchDiscussions
).
toHaveBeenCalled
();
expect
(
wrapper
.
vm
.
diffFilesLength
).
toEqual
(
100
);
expect
(
wrapper
.
vm
.
unwatchRetrievingBatches
).
toHaveBeenCalled
();
done
();
});
});
...
...
@@ -274,6 +278,7 @@ describe('diffs/components/app', () => {
expect
(
wrapper
.
vm
.
fetchDiffFilesBatch
).
toHaveBeenCalled
();
expect
(
wrapper
.
vm
.
unwatchDiscussions
).
toHaveBeenCalled
();
expect
(
wrapper
.
vm
.
diffFilesLength
).
toEqual
(
100
);
expect
(
wrapper
.
vm
.
unwatchRetrievingBatches
).
toHaveBeenCalled
();
done
();
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录