...
From a computing standpoint, often we have applications or services that are much more critical than other things on a system and they need all the help that they can get to be as responsive as possible.
This is going to involve a two-step process on Red Hat Enterprise Linux 7:
Isolate the CPUs that we want to dedicate for our application
Create the cgroups and unit files to make our application land on these CPUs
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
-bash-4.2$ cd /sys/fs/cgroup -bash-4.2$ ls blkio cpu,cpuacct freezer net_cls perf_event cpu cpuset hugetlb net_cls,net_prio pids cpuacct devices memory net_prio systemd -bash-4.2$ ls cpu cpu/ cpuacct/ cpu,cpuacct/ cpuset/ cpu cgroup.clone_children cpuacct.usage_percpu cpu.stat cgroup.event_control cpu.cfs_period_us notify_on_release cgroup.procs cpu.cfs_quota_us release_agent cgroup.sane_behavior cpu.rt_period_us tasks cpuacct.stat cpu.rt_runtime_us cpuacct.usage cpu.shares -bash-4.2$ ls cpuset/ cgroup.clone_children cpuset.memory_pressure_enabled cgroup.event_control control cpuset.memory_spread_page cgroup.procs procs cpuset.memory_spread_slab cgroup.sane_behavior behavior cpuset.mems cpuset.cpu_exclusive exclusive cpuset.sched_load_balance cpuset.cpus cpuset.sched_relax_domain_level cpuset.mem_exclusive exclusive notify_on_release cpuset.mem_hardwall p1 cpuset.memory_migrate release_agent cpuset.memory_pressure pressure tasks -bash-4.2$ -bash-4.2$ cd cpuset/p1 -bash-4.2$ ls cgroup.clone_children cpuset.mem_hardwall children cpuset.schedmemory_load_balancepressure cgroup.event_control cpuset.memory_migrate cpuset.sched_relax_domain_levelspread_page cgroup.procs cpuset.memory_pressure notify_on_releasespread_slab cpuset.cpu_exclusive cpuset.memory_spread_page tasksmems cpuset.cpus cpus cpuset.memorysched_spreadload_slabbalance cpuset.mem_exclusive cpuset.mems -bash-4.2$ cat cpuset.cpus 1,13sched_relax_domain_level cpuset.mem_hardwall notify_on_release cpuset.memory_migrate tasks -bash-4.2$ cat cpuset.memscpus 01,13 -bash-4.2$ cat tasks -bash-4.2$ |