Difference between revisions of "User:Unikum/Ulatencyd"
(→Configuration) |
m (Re category) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category: | + | [[Category:Kernel]] |
Ulatency is a daemon that controls how the Linux kernel will spend it's | Ulatency is a daemon that controls how the Linux kernel will spend it's | ||
resources on the running processes. It uses dynamic cgroups to give the kernel | resources on the running processes. It uses dynamic cgroups to give the kernel | ||
Line 23: | Line 23: | ||
CONFIG_CFQ_GROUP_IOSCHED=y | CONFIG_CFQ_GROUP_IOSCHED=y | ||
− | + | Install {{AUR|ulatencyd}} from the [[AUR]] or the ArchAudio/testing repository. | |
− | {{bc|# | + | You may wish to get the latest fixes and rules from Git with {{AUR|ulatencyd-git}}. |
+ | |||
+ | There are some important fixes that haven't yet been merged for kernels > 3.2.0, for blkio weight: | ||
+ | {{bc|# curl https://raw.github.com/poelzi/ulatencyd/157bb03ee39024f49416c12ae727b171f2011233/conf/scheduler/20-desktop.lua > /etc/ulatencyd/scheduler/20-desktop.lua | ||
+ | # curl https://raw.github.com/poelzi/ulatencyd/157bb03ee39024f49416c12ae727b171f2011233/conf/scheduler/30-game.lua > /etc/ulatencyd/scheduler/30-game.lua | ||
+ | # curl https://raw.github.com/poelzi/ulatencyd/157bb03ee39024f49416c12ae727b171f2011233/conf/scheduler/30-single-task.lua > /etc/ulatencyd/scheduler/30-single-task.lua}} | ||
To start ulatencyd: | To start ulatencyd: |
Revision as of 11:36, 16 December 2012
Ulatency is a daemon that controls how the Linux kernel will spend it's resources on the running processes. It uses dynamic cgroups to give the kernel hints and limitations on processes.
It strongly supports the lua scripting language for writing rules and the scheduler code.
Installation
Kernel options requires:
PROC_EVENTS=y CONFIG_CGROUPS=y CONFIG_CGROUP_FREEZER=y CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_MEM_RES_CTLR=y CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED=y CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y CONFIG_RT_GROUP_SCHED=y CONFIG_BLK_CGROUP=y CONFIG_CFQ_GROUP_IOSCHED=y
Install ulatencydAUR from the AUR or the ArchAudio/testing repository.
You may wish to get the latest fixes and rules from Git with ulatencyd-gitAUR.
There are some important fixes that haven't yet been merged for kernels > 3.2.0, for blkio weight:
# curl https://raw.github.com/poelzi/ulatencyd/157bb03ee39024f49416c12ae727b171f2011233/conf/scheduler/20-desktop.lua > /etc/ulatencyd/scheduler/20-desktop.lua # curl https://raw.github.com/poelzi/ulatencyd/157bb03ee39024f49416c12ae727b171f2011233/conf/scheduler/30-game.lua > /etc/ulatencyd/scheduler/30-game.lua # curl https://raw.github.com/poelzi/ulatencyd/157bb03ee39024f49416c12ae727b171f2011233/conf/scheduler/30-single-task.lua > /etc/ulatencyd/scheduler/30-single-task.lua
To start ulatencyd:
# /etc/rc.d/ulatencyd start
If you want ulatencyd start on boot add ulatencyd in DAEMONS section in /etc/rc.conf.
To verify that it works:
$ ulatency tree
/sys/fs/cgroup/cpu └─┬»cpu« ├ 2 kthreadd ├─┬»s_ul« │ └ 4975 ulatencyd ├─┬»sys_bg« │ └ 1928 cron ├─┬»sys_idle« │ └ 3036 preload ...
Configuration
Some settings are adjustable in /etc/ulatencyd/ulatencyd.conf and the cgroups that will be used can be changed in /etc/ulatencyd/cgroups.conf
Ulatencyd by default changes the io scheduler for all devices to cfq, to disable this behavior (for if you configure your schedulers yourself), simply edit /etc/ulatencyd/rules/io.lua and comment out the lines:
if self.first_run == true then self:set_scheduler(dev, ulatency.get_config("io", "scheduler") or "cfq") end