mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-20 20:22:46 +00:00
fix(worker): extended rsync memory limit to 512MB
This commit is contained in:
parent
6dd06c954c
commit
96f9db8bb8
@ -58,7 +58,7 @@ func (c *cgroupHook) preExec() error {
|
||||
if c.provider.Type() == provRsync || c.provider.Type() == provTwoStageRsync {
|
||||
gname := fmt.Sprintf("%s/%s", c.baseGroup, c.provider.Name())
|
||||
return sh.Command(
|
||||
"cgset", "-r", "memory.limit_in_bytes=128M", gname,
|
||||
"cgset", "-r", "memory.limit_in_bytes=512M", gname,
|
||||
).Run()
|
||||
}
|
||||
return nil
|
||||
|
@ -137,7 +137,7 @@ sleep 30
|
||||
if cgSubsystem == "memory" {
|
||||
memoLimit, err := ioutil.ReadFile(filepath.Join(cg.basePath, "memory", cg.baseGroup, provider.Name(), "memory.limit_in_bytes"))
|
||||
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()
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user