mirror of
https://github.com/rancher/os.git
synced 2025-08-16 05:54:51 +00:00
Optimize out of memory handling logic
- Use oom_score_adj value -250 for user docker - Use oom_score_adj for console container
This commit is contained in:
parent
bb62c58b2b
commit
b6b68dd1ad
@ -11,6 +11,12 @@ func (d *DockerConfig) FullArgs() []string {
|
||||
args := []string{}
|
||||
args = append(args, generateEngineOptsSlice(d.EngineOpts)...)
|
||||
args = append(args, d.ExtraArgs...)
|
||||
|
||||
// Make sure that OOM killer will kill containers before user docker
|
||||
// https://github.com/burmilla/os/issues/33
|
||||
args = append(args, "--oom-score-adjust")
|
||||
args = append(args, "-250")
|
||||
|
||||
if d.TLS {
|
||||
args = append(args, d.TLSArgs...)
|
||||
}
|
||||
|
@ -251,6 +251,7 @@ rancher:
|
||||
pid: host
|
||||
ipc: host
|
||||
privileged: true
|
||||
oom_score_adj: -100
|
||||
restart: always
|
||||
volumes_from:
|
||||
- all-volumes
|
||||
|
Loading…
Reference in New Issue
Block a user