Skip to content

Commit

Permalink
Actually run at a higherpriority
Browse files Browse the repository at this point in the history
Nice values don't mean much with modern versions of linux and systemd. This change runs systemd-swap at a higher priority than any other service on most systems (meaning that we really should improve the performance of the script in the main loop).
Currently after running for around 6 minutes systemd-swap uses 1.38s CPU time on my laptop.
  • Loading branch information
vilgotf committed Jun 11, 2020
1 parent ed09391 commit 1ac16cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions systemd-swap.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Type=forking
ExecStart=/usr/bin/systemd-swap start
ExecStop=/usr/bin/systemd-swap stop
TimeoutStopSec=600
Nice=-19
OOMScoreAdjust=-1000
CPUAccounting=true
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=20
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_SYS_MODULE
DeviceAllow=block-zram rwm
IPAddressDeny=any
Expand Down

0 comments on commit 1ac16cb

Please sign in to comment.