Skip to content

Commit 380e1bf

Browse files
committed
feat(controller): disable swap usage if there is a memory limit
1 parent 3a69974 commit 380e1bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

controller/scheduler/fleet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def _create_container(self, name, image, command, unit, **kwargs):
129129
# prepare memory limit for the container type
130130
mem = kwargs.get('memory', {}).get(l['c_type'], None)
131131
if mem:
132-
l.update({'memory': '-m {}'.format(mem.lower())})
132+
l.update({'memory': '-m {} --memory-swap=-1'.format(mem.lower())})
133133
else:
134134
l.update({'memory': ''})
135135
# prepare memory limit for the container type

0 commit comments

Comments
 (0)