Skip to content

Commit

Permalink
Merge pull request #46 from mariux64/allow-overcommitting-memory-on-d…
Browse files Browse the repository at this point in the history
…esktops

Allow overcommitting memory on desktops
  • Loading branch information
donald authored May 17, 2018
2 parents e3496c9 + bbb602e commit fa6f502
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ mkdir -p "$DESTDIR$udev_helperdir"

install_exec make-automaps/make-automaps "$DESTDIR$usr_sbindir/make-automaps"
install_data misc_systemd_units/automount.service "$DESTDIR$systemdunitdir/automount.service"
install_data misc_systemd_units/enable_overcommit_memory.service "$DESTDIR$systemdunitdir/enable_overcommit_memory.service"
install_data misc_systemd_units/gdm.service "$DESTDIR$systemdunitdir/gdm.service"
install_data misc_systemd_units/lazy-umount-nfs.service "$DESTDIR$systemdunitdir/lazy-umount-nfs.service"
install_exec mkmotd/mkmotd.pl "$DESTDIR$usr_sbindir/mkmotd.pl"
Expand Down
13 changes: 13 additions & 0 deletions misc_systemd_units/enable_overcommit_memory.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Wants=startup-tags.service
After=startup-tags.service
ConditionPathExists=/node/tags/desktop

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/sysctl vm.overcommit_memory=0
ExecStop=/usr/sbin/sysctl vm.overcommit_memory=2

[Install]
WantedBy=graphical.target

0 comments on commit fa6f502

Please sign in to comment.