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 Key: LmkThresholdLeave
78 Value: <threshold>[GMK]B
81 Comment: Specify the threshold or ratio for LMK stop.
82 Example: LmkThresholdLeave=160MB
84 Key: LmkMaxVictimPerOom
85 Value: <the number of max victims>
86 Comment: Specify the max victims per oom level during LMK.
87 Example: LmkMaxVictimPerOom=10
89 1.3 Section: MemoryAppTypeLimit
90 ===============================
91 Key: ServicePerAppLimitAction
92 Value: <limit>[GMK]B,<action>
93 Comment: Specify the memory limitation of services.
94 If <action> is specified, <action> overwrites the global action (reference section 1.5).
95 If <action> is not specified, action is decided by global action (i.e., MemoryLimitTrigger).
96 If <limit> size is smaller than app size during app loading time, the memory limit is not applied.
97 Example: ServicePerAppLimitAction=128MB
99 Key: WidgetPerAppLimitAction
100 Value: <limit>[GMK]B,<action>
101 Comment: Specify the memory limitation of widgets.
102 If <action> is specified, <action> overwrites the global action (reference section 1.5).
103 If <action> is not specified, action is decided by global action (i.e., MemoryLimitTrigger).
104 If <limit> size is smaller than app size during app loading time, the memory limit is not applied.
105 Example: WidgetPerAppLimitAction=160MB
107 Key: GUIPerAppLimitAction
108 Value: <limit>[GMK]B,<action>
109 Comment: Specify the memory limitation of GUIs.
110 If <action> is specified, <action> overwrites the global action (reference section 1.5).
111 If <action> is not specified, action is decided by global action (i.e., MemoryLimitTrigger).
112 If <limit> size is smaller than app size during app loading time, the memory limit is not applied.
113 Example: GUIPerAppLimitAction=160MB
115 1.4 Section: MemoryAppStatusLimit
116 =================================
117 Key: BackgroundPerAppLimitAction
118 Value: <limit>[GMK]B,<action>
119 Comment: Specify the memory limitation of background apps.
120 If <action> is specified, <action> overwrites the global action (reference section 1.5).
121 If <action> is not specified, action is decided by global action (i.e., MemoryLimitTrigger).
122 If <limit> size is smaller than app size during app loading time, the memory limit is not applied.
123 Example: BackgroundPerAppLimitAction=768MB
125 1.5 Section: MemoryLMKGovernor
126 =============================
127 Key: ForegroundAppListPostGovernor
128 Value: (yes|1|ok|on|no|0|off)
129 Comment: Specify whether LMK foregroud app list post governor is turned on or not.
130 If (yes|1|ok|on), rearrange LMK victim list according to the post governor.
131 If (no|0|off), skip the corresponding post governor.
133 Key: WorkingSetSizePostGovernor
134 Value: (yes|1|ok|on|no|0|off)
135 Comment: Specify whether LMK working set size post governor is turned on or not.
136 If (yes|1|ok|on), rearrange LMK victim list according to the post governor.
137 If (no|0|off), skip the corresponding post governor.
139 1.6 Section: MemoryLimitTrigger
140 ===============================
141 Key: MemoryLimitTrigger
142 Value: oom or threshold or others
143 Comment: Specify the type of memory limit trigger type.
144 oom: If memory usage reaches limit, then cgroup oom will handle the situation.
145 threshold: If memory usage reaches limit, then resourced will kill the target without page reclaim.
146 others: If 'MemLimit(Action)' is turned on, just set memory limit.
147 Example: MemoryLimitTrigger=oom
149 1.7 Section: CpuThrottling
150 ==========================
152 Value: <schedule scheme>
153 Comment: Specify the schedule scheme.
154 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
155 Example: CpuSched=idle
159 Comment: Specify the nice value.
160 <nice value> is an decimal integer value. (-20 ~ 19)
164 Value: <share amount>
165 Comment: Specify ratio(%) of quota cpu share(= Lowest cgroup/root cgroup * 100)
166 <share amount> is an decimal unsigned integer value.
170 Value: <cpu runtime>[ mu]?s
171 Comment: Specifies cfs_quota in milliseconds(m), microseconds(u) or seconds.
172 <cpu runtime> is an decimal unsigned integer value.
173 Example: CpuCFSRuntime=50000
176 Value: <cpu period>[ mu]?s
177 Comment: Specifies cfs_period in milliseconds(m), microseconds(u) or seconds.
178 <cpu period> is an decimal unsigned integer value.
179 Example: CpuCFSRuntime=50000
184 2.1 Section: MemorySwap
185 =======================
187 Value: (yes|1|ok|on|no|0|off)
188 Comment: Specify whether reclaim is needed at boot time.
189 If (yes|1|ok|on), resourced reclaims the swap at booting time.
190 If (no|0|off), no raclaim.
191 Example: ReclaimAtBoot=yes
194 Value: <swapping type>([+|]+<swapping type>)*
195 Comment: Specify the type of memory swapping.
196 <swapping type> can be: zram, file, zswap
197 Example: SwapType=zram|file
201 Key: BackgroundLruSwappiness=80
203 Comment: Specify memory swappiness value.
204 <swappiness> is an decimal integer value.
205 Default swappiness is 60.
206 If <swappiness> < 60, the tendency of the kernel of swapping process memory will be decreased.
207 (But 0 does not mean no swapping)
208 If <swappiness> > 60, the tendency of the kernel of swapping process memory will be increased.
209 If <swappiness> > 100, then the kernel can swap out a part of the pages in the address space in this cgroup.
210 Example: BackgroundLruSwappiness=80
212 2.2 Section: MemoryZram
213 =======================
216 Comment: Specify an algorithm for zram swap comparing algorithm.
217 <algorithm> string value will be written to "/sys/block/zram0/comp_algorithm"
218 The value for <algorithm> can be found by `cat /sys/block/zram0/comp_algorithm`, please choose one of them.
219 Example: CompAlgorithm=zstd
223 Comment: Specify the ratio of zram swap size. (ratio in total ram)
224 <ratio> is an float value, 0 to 1.
225 Example: ZramRatio=0.4
227 2.3 Section: MemoryZswap
228 ========================
231 Comment: Specify the max ratio which the zswap pool can use. (/sys/module/zswap/parameters/max_pool_percent)
232 <ratio> is a percentage value.
233 Example: PoolRatio=25
237 Comment: Specify the type of zswap pool. (/sys/module/zswap/parameters/zpool)
238 <type> is a string value of zswap pool type name.
241 Example: PoolType=z3fold
243 2.4 Section: MemoryDedup
244 ========================
246 Value: (yes|1|ok|on|no|0|off)
247 Comment: Dedup removes duplication on memory.
248 Specify whether dedup is needed at boot time
249 If (yes|1|ok|on), dedup will be activated at boot time.
250 If (no|0|off), no dedup at boot time.
251 Example: DedupAtBoot=yes
254 Value: (yes|1|ok|on|no|0|off)
255 Comment: Specify whether scanning for dedup is invoked by low memory event or periodic timer.
256 If (yes|1|ok|on), dedup is on.
257 If (no|0|off), no dedup.
258 Example: ScanOnLowmem=yes
260 2.5 Section: MemoryKsm
261 ======================
264 Comment: Specify KSM(Kernsl Same-page Merging, dedup) mode.
265 <mode> can be: oneshot, periodic
266 oneshot: The KSM daemon only performs deduplication.
267 periodic: The kernel manages all behaviors of deduplication.
268 Example: KsmMode=periodic
272 Comment: Specify the number of pages to scan for deduplication.
273 <pages> is an decimal integer value.
274 Example: PagesToScan=100
276 Key: PagesToScanWithBoost
278 Comment: Specify the number of pages to scan for boosting partial scan.
279 This value is normally larger than "PagesToScan" value.
280 <pages> is an decimal integer value.
281 Example: PagesToScanWithBoost=1000
283 2.6 Section: MemoryCompaction
284 =============================
287 Comment: Specify external fragmentation size of the kernel zone.
288 It determines when to trigger compaction.
289 <level> is an decimal integer value.
291 Example: FragLevel=800
293 2.7 Section: MemoryBackgroundReclaim
294 =============================
296 Value: (yes|1|ok|on|no|0|off)
297 Comment: Specify whether memory is reclaimed
298 from most recently used background app.
299 If value is (yes|1|ok|on), background reclaim on.
300 If value is (no|0|off), background reclaim off.
301 Example: AfterScreenDim=yes
303 2.8 Section: CpuSched
304 =====================
306 Value: <feature>([,]+<feature>)*
307 Comment: Specify cpu scheduling features.
308 <feature> can be: rt_runtime_share, no_rt_runtime_share
309 Multiple values can be used by separating them into ','.
310 Example: CpuSchedFeature=no_rt_runtime_share
313 Value: <cpu rt runtime>[ mu]?s
314 Comment: Specify cpu rt runtime in milliseconds(m), microseconds(u) or seconds.
315 <cpu rt runtime> is an decimal integer value.
316 Example: CpuRTRuntime=900ms
319 Value: <cpu rt period>[ mu]?s
320 Comment: Specify cpu rt period in milliseconds(m), microseconds(u) or seconds.
321 <cpu rt period> is an decimal integer value.
322 Example: CpuRTRuntime=900ms
324 2.9 Section: CpuAffinity
325 ========================
327 Value: (<core num>|<core range>)(,(<core num>|<core range>))*
328 Comment: Specify the cpu affinity of each core
329 <core num> is an decimal integer
330 <core range> is: <core num>-<core num>
331 Example: ForegroundApps=1,2,3-5
333 2.10 Section: CpuBoostingLevelStrong
334 ===================================
336 Value: <schedule scheme>
337 Comment: Specify the schedule scheme when the cpu boosting level is "strong".
338 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
343 Comment: Specify the nice value when the cpu boosting level is "strong".
344 <nice value> is an decimal integer value. (-20 ~ 19)
349 Comment: Specify the cpu rt priority when the cpu boosting level is "strong".
350 <priority> is an decimal integer value.
351 Example: CpuRTPriority=50
353 2.11 Section: CpuBoostingLevelMedium
354 ====================================
356 Value: <schedule scheme>
357 Comment: Specify the schedule scheme when the cpu boosting level is "medium".
358 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
363 Comment: Specify the nice value when the cpu boosting level is "medium".
364 <nice value> is an decimal integer value. (-20 ~ 19)
369 Comment: Specify the cpu rt priority when the cpu boosting level is "medium".
370 <priority> is an decimal integer value.
371 Example: CpuRTPriority=50
373 2.12 Section: CpuBoostingLevelWeak
374 ==================================
376 Value: <schedule scheme>
377 Comment: Specify the schedule scheme when the cpu boosting level is "weak".
378 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
383 Comment: Specify the nice value when the cpu boosting level is "weak".
384 <nice value> is an decimal integer value. (-20 ~ 19)
389 Comment: Specify the cpu rt priority when the cpu boosting level is "weak".
390 <priority> is an decimal integer value.
391 Example: CpuRTPriority=50
393 2.12 Section: CpuBoostingStallGovernor
394 ======================================
395 Key: CpuBoostingStallGovernor
396 Value: (yes|1|ok|on|no|0|off)
397 Comment: Specify whether cpu boosting stall governor is turned on or not.
398 If (yes|1|ok|on), decrease cpu boosting level according to the governor rule.
399 If (no|0|off), skip the corresponding governor.
406 Key: <device module name>
408 Comment: Specify logging is ON or OFF.
409 <device module name> can be: ABNORMAL, BATTERY, CPU, MEMORY, STORAGE
410 If value is ON, then logging for <device module name> is on.
411 else no logging for this module.
414 3.2 BATTERY_POWER_MODE
415 ======================
416 Key: POWER_NORMAL_MODE
418 Comment: Specify power for normal mode.
419 <power> is an integer value.
420 Example: POWER_NORMAL_MODE=676
422 Key: POWER_SAVING_MODE
424 Comment: Specify power for saving mode.
425 <power> is an integer value.
426 Example: POWER_SAVING_MODE=750
428 Key: ULTRA_SAVING_MODE
430 Comment: Specify power for ultra saving mode.
431 <power> is an integer value.
432 Example: ULTRA_SAVING_MODE=1947
434 3.3 BATTERY_<capacity>
435 ======================
438 Comment: Specify whether logic_v2 is suppoted or not.
443 Comment: Specify whether remaining usefull life (RUL) prediction logic is supported or not.
446 Key: BATTERY_CAPACITY
448 Comment: Specify the capacity of the battery.
449 Example: BATTERY_CAPACITY=12000
453 Comment: Specify the total time(min) taken when the device is discharging at fastest rate.
454 <time> is an integer value.
455 Example: DISCHARGE_FAST=700
459 Comment: Specify the total time(min) taken when the device is discharging at slowest rate.
460 <time> is an integer value.
461 Example: DISCHARGE_SLOW=12000
465 Comment: Specify the avarage power consumed in UPS mode.
466 <avg_pwr> is a float value.
467 Example: AVERAGE_PWR=35.0
469 Key: OCV_SOC_POLY_COEF
470 Value: <ocv degree(n)> <coef 1> ... <coef n>
471 Comment: Specify coefficients of polynomial expression for OCV, SOC.
472 Example: OCV_SOC_POLY_COEF=6 3402.664 42.031 -1.76745 0.034798 -0.00030516 0.0000010116
481 Comment: Specify whether favorite apps table is required or not.
482 Favorite apps will be specified in "PREDEFINED" (see below)
487 Comment: Specify favorite apps.
488 <app name> will be added to favorite apps table.
489 Example: PREDEFINED=app1
495 Comment: Specify whether the monitoring for home directory of users is required or not
496 If TRUE, monitoring on.
498 Example: activate=TRUE
501 Value: (ACCESS|READ|WRITE|DISABLE)
502 Comment: Specify monitoring mode.
507 Comment: Specify included package name.
508 Example: include=DOWNLOADABLE
512 Comment: Specify excluded package name.
513 Example: excluded=SLP_debug
517 Comment: Specify logging type.
518 <type> is a flag value, including: DLOG(0x1), FILE(0x2), DB(0x4).
519 If DLOG and DB type, then <type> is 5 (0x01 | 0x04).
522 4.3 ForegroundAppList
523 =====================
526 Comment: Specify a target app name to fix foreground status oom score.
527 Predefined value cannot be used. Please reference 'OomScore' in section 7.1.
528 Keep in mind If both 'OomScore' in Section 7.1 and this configuration are set,
529 then resourced ignores 'OomScore' configuration.
530 Example: App=org.tizen.setting
531 App=com.samsung.browser
534 5. limiter.conf.d/*.conf
535 ========================
539 Key: App|Service|SERVICE|Process|PROCESS
541 Comment: Specify the name of app/service/process.
542 One per one Private section.
543 Example: Service=dbus.service
544 Example: App=org.tizen.<app>
547 Value: <limit>[GMK]B,<action>
548 Comment: Specify the memory limitation of this app/service/process.
549 If <action> is specified, <action> overwrites the global action (reference section 1.5).
550 If <action> is not specified, action is decided by global action (i.e., MemoryLimitTrigger).
551 If <limit> size is smaller than app size during app loading time, the memory limit is not applied.
552 If <limit> size is -1, then this app has no memory limitations (reference section 1.3 and 1.4)
553 Example: MemLimitAction=4096KB
555 Key: MemoryBackgroundLru
556 Value: (yes|1|ok|on|no|0|off)
557 Comment: Specify whether put the process or service in BackgroundLru memory cgroup.
558 If (yes|1|ok|on), put the process or service in BackgroundLru.
559 If (no|0|off), do not put the process or service in BackgroundLru.
560 Example: MemoryBackgroundLru=yes
563 Value: (yes|1|ok|on|no|0|off)
564 Comment: Specify whether the cpu throttling is enabled.
565 If (yes|1|ok|on), enable cpu throttling.
566 If (no|0|off), disable cpu throttling.
567 Example: CpuThrottling=yes
569 Key: LmkKillException
570 Value: (yes|1|ok|on|no|0|off)
571 Comment: Specify whether the corresponding process is excluded from LMK victim list.
572 If (yes|1|ok|on), the process is removed from the list.
573 If (no|0|off), the process is not removed from the list.
574 Only app is supported, but service and process are not supported.
575 (system services with System, System::Privileged, and User attrs are
576 already removed from the list in LMK)
577 Example: LmkKillException=yes
579 6. optimizer.conf.d/*.conf
580 ==========================
584 Key: App|Service|SERVICE|Process|PROCESS
586 Comment: Specify the name of app/service/process.
587 One per one Private section.
588 Example: Service=dbus.service
589 Example: App=org.tizen.<app>
592 Value: <schedule scheme>
593 Comment: Specify the schedule scheme.
594 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
595 Example: CpuSched=idle
599 Comment: Specify the nice value.
600 <nice value> is an decimal integer value. (-20 ~ 19)
605 Comment: Specify the cpu rt priority.
606 <priority> is an decimal integer value.
607 Example: CpuRTPriority=50
609 Key: CpuBoostingLevel
610 Value: (strong|medium|weak)
611 Comment: Specify the boosting level of this app/service/process.
612 Example: CpuBoostingLevel=medium
615 Value: (cpu id|min cpu id-max cpu id|cpu_id,cpu_id)
616 Comment: Specify the cpu affinity of this app
617 Example: CpuAffinity=1,3-5,8
619 7. process.conf.d/*.conf
620 ========================
624 Key: App|Service|SERVICE|Process|PROCESS
626 Comment: Specify the name of app/service/process.
627 One per one Private section.
628 Example: Service=dbus.service
629 Example: App=org.tizen.<app>
633 Comment: Specify an action on failure.
634 <action> can be: reboot
635 If <action> is reboot, then this app|service|process will be added to the watchdog.
636 If this app|service|process was killed, then the system will reboot.
637 It does same thing as ActionOnFailure in the Private|VIP_GROUP section of vip-process.conf.d.
638 Example: ActionOnFailure=reboot
642 Comment: Specify an action for watchdog.
643 <action> can be: ignore, kill
644 Example: WatchdogAction=ignore
647 Value: <oom_score_adj>
648 Comment: Specify the fixed oom_score_adj.
649 oom_score_adj is an integer value between -900 to 250.
650 Predefined values cannot be used.
652 -900 : The lowest oom score value in resourced.
653 0 : Initial value for services and processes.
654 100 : Initial value for apps.
655 150 : Foreground status when it is cpu-locked(prevents sleep).
656 200 : Foreground status when it is cpu-unlocked(sleep available).
657 230 : Perceptible apps (background)
658 250 : Background status when it is cpu-locked(prevents sleep).
659 Example: OomScore=125
661 8. vip-process.d/*.conf
662 =======================
664 8.1 Section: Private|VIP_GROUP
665 ==============================
666 Key: App|Service|SERVICE|Process|PROCESS
668 Comment: Specify the name of app/service/process.
669 One per one Private section.
670 Example: Service=dbus.service
671 Example: App=org.tizen.<app>
673 Key: ACTION_ON_FAILURE
675 Comment: Specify an action on failure.
676 <action> can be: reboot
677 If <action> is reboot, then this app|service|process will be added to the watchdog.
678 If this app|service|process was killed, then the system will reboot.
679 It does same thing as ActionOnFailure in the Private section of process.conf.d.
680 Example: ACTION_ON_FAILURE=reboot