Skip to content

Instantly share code, notes, and snippets.

@zacksiri
Forked from PyYoshi/_.md
Created March 13, 2016 13:46
Show Gist options
  • Save zacksiri/20f9ccaacad67bd29343 to your computer and use it in GitHub Desktop.
Save zacksiri/20f9ccaacad67bd29343 to your computer and use it in GitHub Desktop.
Set overcommit_memory=1 on CoreOS
$ sudo -i
# vim /etc/systemd/system/overcommit_memory_1.service
# systemctl enable overcommit_memory_1
# systemctl start overcommit_memory_1
# systemctl status overcommit_memory_1
# cat /proc/sys/vm/overcommit_memory
[Unit]
Description=Set overcommit_memory=1 on CoreOS
[Service]
Type=oneshot
ExecStart=/usr/bin/sh -c "echo 1 > /proc/sys/vm/overcommit_memory"
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment