Skip to content

Commit

Permalink
Set high priority for etcd process (nice -20, ionice -c 1 -n 0).
Browse files Browse the repository at this point in the history
You should avoid storing etcd data on the server along with other processes that make heavy use of the disk i/o and  CPU resources.
But, an etcd server can sometimes stably run alongside these processes when given a high priority.
  • Loading branch information
vitabaks committed Jan 13, 2020
1 parent d67313b commit 2f41e80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/etcd.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ User=etcd
ExecStart=/bin/bash -c "GOMAXPROCS=$(nproc) /usr/local/bin/etcd"
Restart=on-failure
LimitNOFILE=65536
IOSchedulingClass=best-effort
IOSchedulingClass=realtime
IOSchedulingPriority=0
Nice=-20

[Install]
WantedBy=multi-user.target

0 comments on commit 2f41e80

Please sign in to comment.