Difference between revisions of "User:Unikum/Ulatencyd"

From ArchWiki
Jump to: navigation, search
m (Alad moved page Ulatencyd to User:Unikum/Ulatencyd without leaving a redirect: Project deprecated in Arch, move to original author page)
 
(15 intermediate revisions by 9 users not shown)
Line 1: Line 1:
[[Category:Daemons and system services (English)]]
+
{{Out of date|Broken with recent Arch versions, no plans to fix it}}
 +
 
 
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 6: Line 7:
 
It strongly supports the lua scripting language for writing rules and the
 
It strongly supports the lua scripting language for writing rules and the
 
scheduler code.
 
scheduler code.
 +
 +
{{warning|With systemd 21x Ulatencyd cannot be successfully run on Arch Linux. The problem has been further described in the AUR [https://aur.archlinux.org/packages/ulatencyd-git/ comments].}}
  
 
== Installation ==
 
== Installation ==
Line 23: Line 26:
 
  CONFIG_CFQ_GROUP_IOSCHED=y
 
  CONFIG_CFQ_GROUP_IOSCHED=y
  
It is provided both in ArchAudio/testing repository and AUR:
+
Install {{AUR|ulatencyd}} from the [[AUR]] or the ArchAudio/testing repository.
  
{{cli|# yaourt -S ulatencyd}}
+
You may wish to get the latest fixes and rules from Git with {{AUR|ulatencyd-git}}.
  
 
To start ulatencyd:
 
To start ulatencyd:
{{cli|# /etc/rc.d/ulatencyd start}}
+
{{bc|# systemctl start ulatencyd.service}}
  
If you want ulatencyd start on boot add ulatencyd in DAEMONS section in /etc/rc.conf.
+
If you want ulatencyd start on boot, enable the service file as follows:
 +
{{bc|# systemctl enable ulatencyd.service}}
  
 
To verify that it works:
 
To verify that it works:
{{Command| ulatency tree|
+
{{hc|ulatency tree|
 
  /sys/fs/cgroup/cpu
 
  /sys/fs/cgroup/cpu
 
  └─┬»cpu«
 
  └─┬»cpu«
Line 48: Line 52:
  
 
Some settings are adjustable in /etc/ulatencyd/ulatencyd.conf and the cgroups that will be used can be changed in /etc/ulatencyd/cgroups.conf
 
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
  
 
== See also ==
 
== See also ==
Line 53: Line 62:
 
*[https://github.com/poelzi/ulatencyd/ Home page]
 
*[https://github.com/poelzi/ulatencyd/ Home page]
 
*[https://github.com/poelzi/ulatencyd/wiki/Faq FAQ]
 
*[https://github.com/poelzi/ulatencyd/wiki/Faq FAQ]
 +
*[https://github.com/poelzi/ulatencyd/wiki/Writing-Rules <nowiki>[HOWTO]</nowiki>Writing Rules]

Latest revision as of 10:45, 7 December 2014

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: Broken with recent Arch versions, no plans to fix it (Discuss in User talk:Unikum/Ulatencyd#)

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.

Warning: With systemd 21x Ulatencyd cannot be successfully run on Arch Linux. The problem has been further described in the AUR comments.

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.

To start ulatencyd:

# systemctl start ulatencyd.service

If you want ulatencyd start on boot, enable the service file as follows:

# systemctl enable ulatencyd.service

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

See also