1 Resourced Configurations
2 ========================
6 1. limiter.conf : configurations to limit resources
7 2. optimizer.conf : configurations to optimize resources
8 3. monitor.conf : configurations to monitor resources
9 4. process.conf : configurations to manage process
10 5. proc.conf : configurations to specify the oom_score_adj for each app
11 6. limiter.conf.d/*.conf : configurations to limit resources, for each app
12 7. optimizer.conf.d/*.conf : configurations to optimize resources, for each app
13 8. process.conf.d/*.conf : configurations to manage process, for each app
14 9. vip-process.d/*.conf : configurations to manage vip-process, for each app
18 Config file consists of two parts: section names and key-value pairs.
19 Section name should be located between '[' and ']'. (ex: [MemoryLevelThreshold])
20 The range of a section is: From the first appearance of section name to the EOF or the line before the next section starts
21 Example: [MemoryBackgroundLru]
22 BackgroundLruLimit=80%
23 Lines beginning with '#' are ignored.
27 Value format will be described as regular expression form.
28 Names enclosed with clamps(<...>) can be replaced with some value which described inside clamps.
33 1.1 Section: MemoryBackgroundLru
34 =============================
35 Key: BackgroundLruLimit
36 Value: <limit ratio in percentage>%
37 Comment: Specify the memory cgroup BackgroundLru limit ratio in percentage.
38 Example: BackgroundLruLimit=80%
40 1.2 Section: MemoryLevelThreshold
41 =================================
43 Value: (yes|1|ok|on|no|0|off)
44 Comment: Specify whether a popup is needed or not when the process is killed by LMK or proactive killer.
45 If (yes|1|ok|on), resoruced will request system popup when OOM occurred.
46 If (no|0|off), resoruced will not request system popup when OOM occurred.
50 Value: <threshold>[GMK]B
53 Comment: Specify the threshold or ratio for memory level medium.
54 Example: MediumLevel=400MB
57 Value: <threshold>[GMK]B
60 Comment: Specify the threshold or ratio for memory level low.
61 Example: LowLevel=300MB
64 Value: <threshold>[GMK]B
67 Comment: Specify the threshold or ratio for memory level critical.
68 Example: LowLevel=200MB
71 Value: <threshold>[GMK]B
74 Comment: Specify the threshold or ratio for memory level oom(out of memory).
75 Example: OomLevel=160MB
77 1.3 Section: MemoryAppTypeLimit
78 ===============================
79 Key: ServicePerAppLimitAction
80 Value: <limit>[GMK]B,<action>
81 Comment: Specify the memory limitation of services.
82 <action> specifies an action to be performed when the limit is crossed.
83 <action> can be: broadcast, reclaim, kill, ignore
84 Example: ServicePerAppLimitAction=128MB,kill
86 Key: WidgetPerAppLimitAction
87 Value: <limit>[GMK]B,<action>
88 Comment: Specify the memory limitation of widgets.
89 <action> specifies an action to be performed when the limit is crossed.
90 <action> can be: broadcast, reclaim, kill, ignore
91 Example: WidgetPerAppLimitAction=160MB,kill
93 Key: GUIPerAppLimitAction
94 Value: <limit>[GMK]B,<action>
95 Comment: Specify the memory limitation of GUIs.
96 <action> specifies an action to be performed when the limit is crossed.
97 <action> can be: broadcast, reclaim, kill, ignore
98 Example: GUIPerAppLimitAction=160MB,kill
100 1.4 Section: MemoryAppStatusLimit
101 =================================
102 Key: BackgroundPerAppLimitAction
103 Value: <limit>[GMK]B,<action>
104 Comment: Specify the memory limitation of background apps.
105 <action> specifies an action to be performed when the limit is crossed.
106 <action> can be: broadcast, reclaim, kill, ignore
107 Example: BackgroundPerAppLimitAction=768MB,kill
109 1.5 Section: MemoryLimitTrigger
110 ===============================
111 Key: MemoryLimitTrigger
112 Value: oom or threshold or others
113 Comment: Specify the type of memory limit trigger type.
114 oom: If memory usage reaches limit, then cgroup oom will handle the situation.
115 threshold: If memory usage reaches limit, then resourced will kill the target without page reclaim.
116 others: If 'MemLimit(Action)' is turned on, just set memory limit.
117 Example: MemoryLimitTrigger=oom
119 1.6 Section: CpuThrottling
120 ==========================
122 Value: <schedule scheme>
123 Comment: Specify the schedule scheme.
124 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
125 Example: CpuSched=idle
129 Comment: Specify the nice value.
130 <nice value> is an decimal integer value. (-20 ~ 19)
134 Value: <share amount>
135 Comment: Specify ratio(%) of quota cpu share(= Lowest cgroup/root cgroup * 100)
136 <share amount> is an decimal unsigned integer value.
140 Value: <cpu runtime>[ mu]?s
141 Comment: Specifies cfs_quota in milliseconds(m), microseconds(u) or seconds.
142 <cpu runtime> is an decimal unsigned integer value.
143 Example: CpuCFSRuntime=50000
146 Value: <cpu period>[ mu]?s
147 Comment: Specifies cfs_period in milliseconds(m), microseconds(u) or seconds.
148 <cpu period> is an decimal unsigned integer value.
149 Example: CpuCFSRuntime=50000
154 2.1 Section: MemorySwap
155 =======================
157 Value: (yes|1|ok|on|no|0|off)
158 Comment: Specify whether reclaim is needed at boot time.
159 If (yes|1|ok|on), resourced reclaims the swap at booting time.
160 If (no|0|off), no raclaim.
161 Example: ReclaimAtBoot=yes
164 Value: <swapping type>([+|]+<swapping type>)*
165 Comment: Specify the type of memory swapping.
166 <swapping type> can be: zram, file, zswap
167 Example: SwapType=zram|file
171 Key: BackgroundLruSwappiness=80
173 Comment: Specify memory swappiness value.
174 <swappiness> is an decimal integer value.
175 Default swappiness is 60.
176 If <swappiness> < 60, the tendency of the kernel of swapping process memory will be decreased.
177 (But 0 does not mean no swapping)
178 If <swappiness> > 60, the tendency of the kernel of swapping process memory will be increased.
179 If <swappiness> > 100, then the kernel can swap out a part of the pages in the address space in this cgroup.
180 Example: BackgroundLruSwappiness=80
182 2.2 Section: MemoryZram
183 =======================
186 Comment: Specify an algorithm for zram swap comparing algorithm.
187 <algorithm> string value will be written to "/sys/block/zram0/comp_algorithm"
188 The value for <algorithm> can be found by `cat /sys/block/zram0/comp_algorithm`, please choose one of them.
189 Example: CompAlgorithm=zstd
193 Comment: Specify the ratio of zram swap size. (ratio in total ram)
194 <ratio> is an float value, 0 to 1.
195 Example: ZramRatio=0.4
197 2.3 Section: MemoryZswap
198 ========================
201 Comment: Specify the max ratio which the zswap pool can use. (/sys/module/zswap/parameters/max_pool_percent)
202 <ratio> is a percentage value.
203 Example: PoolRatio=25
207 Comment: Specify the type of zswap pool. (/sys/module/zswap/parameters/zpool)
208 <type> is a string value of zswap pool type name.
211 Example: PoolType=z3fold
213 2.4 Section: MemoryDedup
214 ========================
216 Value: (yes|1|ok|on|no|0|off)
217 Comment: Dedup removes duplication on memory.
218 Specify whether dedup is needed at boot time
219 If (yes|1|ok|on), dedup will be activated at boot time.
220 If (no|0|off), no dedup at boot time.
221 Example: DedupAtBoot=yes
224 Value: (yes|1|ok|on|no|0|off)
225 Comment: Specify whether scanning for dedup is invoked by low memory event or periodic timer.
226 If (yes|1|ok|on), dedup is on.
227 If (no|0|off), no dedup.
228 Example: ScanOnLowmem=yes
230 2.5 Section: MemoryKsm
231 ======================
234 Comment: Specify KSM(Kernsl Same-page Merging, dedup) mode.
235 <mode> can be: oneshot, periodic
236 oneshot: The KSM daemon only performs deduplication.
237 periodic: The kernel manages all behaviors of deduplication.
238 Example: KsmMode=periodic
242 Comment: Specify the number of pages to scan for deduplication.
243 <pages> is an decimal integer value.
244 Example: PagesToScan=100
246 Key: PagesToScanWithBoost
248 Comment: Specify the number of pages to scan for boosting partial scan.
249 This value is normally larger than "PagesToScan" value.
250 <pages> is an decimal integer value.
251 Example: PagesToScanWithBoost=1000
253 2.6 Section: MemoryCompaction
254 =============================
257 Comment: Specify external fragmentation size of the kernel zone.
258 It determines when to trigger compaction.
259 <level> is an decimal integer value.
261 Example: FragLevel=800
263 2.7 Section: MemoryBackgroundReclaim
264 =============================
266 Value: (yes|1|ok|on|no|0|off)
267 Comment: Specify whether memory is reclaimed
268 from most recently used background app.
269 If value is (yes|1|ok|on), background reclaim on.
270 If value is (no|0|off), background reclaim off.
271 Example: AfterScreenDim=yes
273 2.8 Section: CpuSched
274 =====================
276 Value: <feature>([,]+<feature>)*
277 Comment: Specify cpu scheduling features.
278 <feature> can be: rt_runtime_share, no_rt_runtime_share
279 Multiple values can be used by separating them into ','.
280 Example: CpuSchedFeature=no_rt_runtime_share
283 Value: <cpu rt runtime>[ mu]?s
284 Comment: Specify cpu rt runtime in milliseconds(m), microseconds(u) or seconds.
285 <cpu rt runtime> is an decimal integer value.
286 Example: CpuRTRuntime=900ms
289 Value: <cpu rt period>[ mu]?s
290 Comment: Specify cpu rt period in milliseconds(m), microseconds(u) or seconds.
291 <cpu rt period> is an decimal integer value.
292 Example: CpuRTRuntime=900ms
294 2.9 Section: CpuAffinity
295 ========================
297 Value: (<core num>|<core range>)(,(<core num>|<core range>))*
298 Comment: Specify the cpu affinity of each core
299 <core num> is an decimal integer
300 <core range> is: <core num>-<core num>
301 Example: ForegroundApps=1,2,3-5
303 2.10 Section: CpuBoostingLevelStrong
304 ===================================
306 Value: <schedule scheme>
307 Comment: Specify the schedule scheme when the cpu boosting level is "strong".
308 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
313 Comment: Specify the nice value when the cpu boosting level is "strong".
314 <nice value> is an decimal integer value. (-20 ~ 19)
319 Comment: Specify the cpu rt priority when the cpu boosting level is "strong".
320 <priority> is an decimal integer value.
321 Example: CpuRTPriority=50
323 2.11 Section: CpuBoostingLevelMedium
324 ====================================
326 Value: <schedule scheme>
327 Comment: Specify the schedule scheme when the cpu boosting level is "medium".
328 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
333 Comment: Specify the nice value when the cpu boosting level is "medium".
334 <nice value> is an decimal integer value. (-20 ~ 19)
339 Comment: Specify the cpu rt priority when the cpu boosting level is "medium".
340 <priority> is an decimal integer value.
341 Example: CpuRTPriority=50
343 2.12 Section: CpuBoostingLevelWeak
344 ==================================
346 Value: <schedule scheme>
347 Comment: Specify the schedule scheme when the cpu boosting level is "weak".
348 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
353 Comment: Specify the nice value when the cpu boosting level is "weak".
354 <nice value> is an decimal integer value. (-20 ~ 19)
359 Comment: Specify the cpu rt priority when the cpu boosting level is "weak".
360 <priority> is an decimal integer value.
361 Example: CpuRTPriority=50
368 Key: <device module name>
370 Comment: Specify logging is ON or OFF.
371 <device module name> can be: ABNORMAL, BATTERY, CPU, MEMORY, STORAGE
372 If value is ON, then logging for <device module name> is on.
373 else no logging for this module.
376 3.2 BATTERY_POWER_MODE
377 ======================
378 Key: POWER_NORMAL_MODE
380 Comment: Specify power for normal mode.
381 <power> is an integer value.
382 Example: POWER_NORMAL_MODE=676
384 Key: POWER_SAVING_MODE
386 Comment: Specify power for saving mode.
387 <power> is an integer value.
388 Example: POWER_SAVING_MODE=750
390 Key: ULTRA_SAVING_MODE
392 Comment: Specify power for ultra saving mode.
393 <power> is an integer value.
394 Example: ULTRA_SAVING_MODE=1947
396 3.3 BATTERY_<capacity>
397 ======================
400 Comment: Specify whether logic_v2 is suppoted or not.
405 Comment: Specify whether remaining usefull life (RUL) prediction logic is supported or not.
408 Key: BATTERY_CAPACITY
410 Comment: Specify the capacity of the battery.
411 Example: BATTERY_CAPACITY=12000
415 Comment: Specify the total time(min) taken when the device is discharging at fastest rate.
416 <time> is an integer value.
417 Example: DISCHARGE_FAST=700
421 Comment: Specify the total time(min) taken when the device is discharging at slowest rate.
422 <time> is an integer value.
423 Example: DISCHARGE_SLOW=12000
427 Comment: Specify the avarage power consumed in UPS mode.
428 <avg_pwr> is a float value.
429 Example: AVERAGE_PWR=35.0
431 Key: OCV_SOC_POLY_COEF
432 Value: <ocv degree(n)> <coef 1> ... <coef n>
433 Comment: Specify coefficients of polynomial expression for OCV, SOC.
434 Example: OCV_SOC_POLY_COEF=6 3402.664 42.031 -1.76745 0.034798 -0.00030516 0.0000010116
443 Comment: Specify whether favorite apps table is required or not.
444 Favorite apps will be specified in "PREDEFINED" (see below)
449 Comment: Specify favorite apps.
450 <app name> will be added to favorite apps table.
451 Example: PREDEFINED=app1
457 Comment: Specify whether the monitoring for home directory of users is required or not
458 If TRUE, monitoring on.
460 Example: activate=TRUE
463 Value: (ACCESS|READ|WRITE|DISABLE)
464 Comment: Specify monitoring mode.
469 Comment: Specify included package name.
470 Example: include=DOWNLOADABLE
474 Comment: Specify excluded package name.
475 Example: excluded=SLP_debug
479 Comment: Specify logging type.
480 <type> is a flag value, including: DLOG(0x1), FILE(0x2), DB(0x4).
481 If DLOG and DB type, then <type> is 5 (0x01 | 0x04).
484 5. limiter.conf.d/*.conf
485 ========================
489 Key: App|Service|SERVICE|Process|PROCESS
491 Comment: Specify the name of app/service/process.
492 One per one Private section.
493 Example: Service=dbus.service
494 Example: App=org.tizen.<app>
497 Value: <limit>[GMK]B,<action>
498 Comment: Specify the memory limitation of this app/service/process.
499 <action> specifies an action to be performed when the limit is crossed.
500 <action> can be: broadcast, reclaim, kill, ignore
501 Example: MemLimitAction=4096KB,kill
503 Key: MemoryBackgroundLru
504 Value: (yes|1|ok|on|no|0|off)
505 Comment: Specify whether put the process or service
506 in BackgroundLru memory cgroup.
507 If (yes|1|ok|on), put the process or service in BackgroundLru.
508 If (no|0|off), do not put the process or service in BackgroundLru.
509 Example: MemoryBackgroundLru=yes
512 Value: (yes|1|ok|on|no|0|off)
513 Comment: Specify whether the cpu throttling is enabled.
514 If (yes|1|ok|on), enable cpu throttling.
515 If (no|0|off), disable cpu throttling.
516 Example: CpuThrottling=yes
518 Key: LmkKillException
519 Value: (yes|1|ok|on|no|0|off)
520 Comment: Specify whether the corresponding process is excluded from LMK victim list.
521 If (yes|1|ok|on), the process is removed from the list.
522 If (no|0|off), the process is not removed from the list.
523 Only app is supported, but service and process are not supported.
524 (system services with System, System::Privileged, and User attrs are
525 already removed from the list in LMK)
526 Example: LmkKillException=yes
528 6. optimizer.conf.d/*.conf
529 ==========================
533 Key: App|Service|SERVICE|Process|PROCESS
535 Comment: Specify the name of app/service/process.
536 One per one Private section.
537 Example: Service=dbus.service
538 Example: App=org.tizen.<app>
541 Value: <schedule scheme>
542 Comment: Specify the schedule scheme.
543 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
544 Example: CpuSched=idle
548 Comment: Specify the nice value.
549 <nice value> is an decimal integer value. (-20 ~ 19)
554 Comment: Specify the cpu rt priority.
555 <priority> is an decimal integer value.
556 Example: CpuRTPriority=50
558 Key: CpuBoostingLevel
559 Value: (strong|medium|weak)
560 Comment: Specify the boosting level of this app/service/process.
561 Example: CpuBoostingLevel=medium
564 Value: (cpu id|min cpu id-max cpu id|cpu_id,cpu_id)
565 Comment: Specify the cpu affinity of this app
566 Example: CpuAffinity=1,3-5,8
568 7. process.conf.d/*.conf
569 ========================
573 Key: App|Service|SERVICE|Process|PROCESS
575 Comment: Specify the name of app/service/process.
576 One per one Private section.
577 Example: Service=dbus.service
578 Example: App=org.tizen.<app>
582 Comment: Specify an action on failure.
583 <action> can be: reboot
584 Example: ActionOnFailure=reboot
588 Comment: Specify an action for watchdog.
589 <action> can be: ignore, kill
590 Example: WatchdogAction=ignore
593 Value: <oom_score_adj>
594 Comment: Specify the oom_score_adj.
595 oom_score_adj is an integer value between -900 to 250.
596 Predefined values cannot be used.
597 Predefined values are: -900, 0, 100, 150, 200, 230, 250
598 (Please refer to procfs.h)
599 Example: OomScore=125
601 8. vip-process.d/*.conf
602 =======================
604 8.1 Section: Private|VIP_GROUP
605 ==============================
606 Key: App|Service|SERVICE|Process|PROCESS
608 Comment: Specify the name of app/service/process.
609 One per one Private section.
610 Example: Service=dbus.service
611 Example: App=org.tizen.<app>
613 Key: ACTION_ON_FAILURE
615 Comment: Specify an action on failure.
616 <action> can be: reboot
617 Example: ACTION_ON_FAILURE=reboot