镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-08 07:26:47 +00:00
fix(worker): extended rsync memory limit to 512MB
这个提交包含在:
@@ -58,7 +58,7 @@ func (c *cgroupHook) preExec() error {
|
|||||||
if c.provider.Type() == provRsync || c.provider.Type() == provTwoStageRsync {
|
if c.provider.Type() == provRsync || c.provider.Type() == provTwoStageRsync {
|
||||||
gname := fmt.Sprintf("%s/%s", c.baseGroup, c.provider.Name())
|
gname := fmt.Sprintf("%s/%s", c.baseGroup, c.provider.Name())
|
||||||
return sh.Command(
|
return sh.Command(
|
||||||
"cgset", "-r", "memory.limit_in_bytes=128M", gname,
|
"cgset", "-r", "memory.limit_in_bytes=512M", gname,
|
||||||
).Run()
|
).Run()
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ sleep 30
|
|||||||
if cgSubsystem == "memory" {
|
if cgSubsystem == "memory" {
|
||||||
memoLimit, err := ioutil.ReadFile(filepath.Join(cg.basePath, "memory", cg.baseGroup, provider.Name(), "memory.limit_in_bytes"))
|
memoLimit, err := ioutil.ReadFile(filepath.Join(cg.basePath, "memory", cg.baseGroup, provider.Name(), "memory.limit_in_bytes"))
|
||||||
So(err, ShouldBeNil)
|
So(err, ShouldBeNil)
|
||||||
So(strings.Trim(string(memoLimit), "\n"), ShouldEqual, strconv.Itoa(128*1024*1024))
|
So(strings.Trim(string(memoLimit), "\n"), ShouldEqual, strconv.Itoa(512*1024*1024))
|
||||||
}
|
}
|
||||||
cg.postExec()
|
cg.postExec()
|
||||||
})
|
})
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户