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 1.3 Section: MemoryAppTypeLimit
85 ===============================
86 Key: ServicePerAppLimitAction
87 Value: <limit>[GMK]B,<action>
88 Comment: Specify the memory limitation of services.
89 <action> specifies an action to be performed when the limit is crossed.
90 <action> can be: broadcast, reclaim, kill, ignore
91 Example: ServicePerAppLimitAction=128MB,kill
93 Key: WidgetPerAppLimitAction
94 Value: <limit>[GMK]B,<action>
95 Comment: Specify the memory limitation of widgets.
96 <action> specifies an action to be performed when the limit is crossed.
97 <action> can be: broadcast, reclaim, kill, ignore
98 Example: WidgetPerAppLimitAction=160MB,kill
100 Key: GUIPerAppLimitAction
101 Value: <limit>[GMK]B,<action>
102 Comment: Specify the memory limitation of GUIs.
103 <action> specifies an action to be performed when the limit is crossed.
104 <action> can be: broadcast, reclaim, kill, ignore
105 Example: GUIPerAppLimitAction=160MB,kill
107 1.4 Section: MemoryAppStatusLimit
108 =================================
109 Key: BackgroundPerAppLimitAction
110 Value: <limit>[GMK]B,<action>
111 Comment: Specify the memory limitation of background apps.
112 <action> specifies an action to be performed when the limit is crossed.
113 <action> can be: broadcast, reclaim, kill, ignore
114 Example: BackgroundPerAppLimitAction=768MB,kill
116 1.5 Section: MemoryLimitTrigger
117 ===============================
118 Key: MemoryLimitTrigger
119 Value: oom or threshold or others
120 Comment: Specify the type of memory limit trigger type.
121 oom: If memory usage reaches limit, then cgroup oom will handle the situation.
122 threshold: If memory usage reaches limit, then resourced will kill the target without page reclaim.
123 others: If 'MemLimit(Action)' is turned on, just set memory limit.
124 Example: MemoryLimitTrigger=oom
126 1.6 Section: CpuThrottling
127 ==========================
129 Value: <schedule scheme>
130 Comment: Specify the schedule scheme.
131 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
132 Example: CpuSched=idle
136 Comment: Specify the nice value.
137 <nice value> is an decimal integer value. (-20 ~ 19)
141 Value: <share amount>
142 Comment: Specify ratio(%) of quota cpu share(= Lowest cgroup/root cgroup * 100)
143 <share amount> is an decimal unsigned integer value.
147 Value: <cpu runtime>[ mu]?s
148 Comment: Specifies cfs_quota in milliseconds(m), microseconds(u) or seconds.
149 <cpu runtime> is an decimal unsigned integer value.
150 Example: CpuCFSRuntime=50000
153 Value: <cpu period>[ mu]?s
154 Comment: Specifies cfs_period in milliseconds(m), microseconds(u) or seconds.
155 <cpu period> is an decimal unsigned integer value.
156 Example: CpuCFSRuntime=50000
161 2.1 Section: MemorySwap
162 =======================
164 Value: (yes|1|ok|on|no|0|off)
165 Comment: Specify whether reclaim is needed at boot time.
166 If (yes|1|ok|on), resourced reclaims the swap at booting time.
167 If (no|0|off), no raclaim.
168 Example: ReclaimAtBoot=yes
171 Value: <swapping type>([+|]+<swapping type>)*
172 Comment: Specify the type of memory swapping.
173 <swapping type> can be: zram, file, zswap
174 Example: SwapType=zram|file
178 Key: BackgroundLruSwappiness=80
180 Comment: Specify memory swappiness value.
181 <swappiness> is an decimal integer value.
182 Default swappiness is 60.
183 If <swappiness> < 60, the tendency of the kernel of swapping process memory will be decreased.
184 (But 0 does not mean no swapping)
185 If <swappiness> > 60, the tendency of the kernel of swapping process memory will be increased.
186 If <swappiness> > 100, then the kernel can swap out a part of the pages in the address space in this cgroup.
187 Example: BackgroundLruSwappiness=80
189 2.2 Section: MemoryZram
190 =======================
193 Comment: Specify an algorithm for zram swap comparing algorithm.
194 <algorithm> string value will be written to "/sys/block/zram0/comp_algorithm"
195 The value for <algorithm> can be found by `cat /sys/block/zram0/comp_algorithm`, please choose one of them.
196 Example: CompAlgorithm=zstd
200 Comment: Specify the ratio of zram swap size. (ratio in total ram)
201 <ratio> is an float value, 0 to 1.
202 Example: ZramRatio=0.4
204 2.3 Section: MemoryZswap
205 ========================
208 Comment: Specify the max ratio which the zswap pool can use. (/sys/module/zswap/parameters/max_pool_percent)
209 <ratio> is a percentage value.
210 Example: PoolRatio=25
214 Comment: Specify the type of zswap pool. (/sys/module/zswap/parameters/zpool)
215 <type> is a string value of zswap pool type name.
218 Example: PoolType=z3fold
220 2.4 Section: MemoryDedup
221 ========================
223 Value: (yes|1|ok|on|no|0|off)
224 Comment: Dedup removes duplication on memory.
225 Specify whether dedup is needed at boot time
226 If (yes|1|ok|on), dedup will be activated at boot time.
227 If (no|0|off), no dedup at boot time.
228 Example: DedupAtBoot=yes
231 Value: (yes|1|ok|on|no|0|off)
232 Comment: Specify whether scanning for dedup is invoked by low memory event or periodic timer.
233 If (yes|1|ok|on), dedup is on.
234 If (no|0|off), no dedup.
235 Example: ScanOnLowmem=yes
237 2.5 Section: MemoryKsm
238 ======================
241 Comment: Specify KSM(Kernsl Same-page Merging, dedup) mode.
242 <mode> can be: oneshot, periodic
243 oneshot: The KSM daemon only performs deduplication.
244 periodic: The kernel manages all behaviors of deduplication.
245 Example: KsmMode=periodic
249 Comment: Specify the number of pages to scan for deduplication.
250 <pages> is an decimal integer value.
251 Example: PagesToScan=100
253 Key: PagesToScanWithBoost
255 Comment: Specify the number of pages to scan for boosting partial scan.
256 This value is normally larger than "PagesToScan" value.
257 <pages> is an decimal integer value.
258 Example: PagesToScanWithBoost=1000
260 2.6 Section: MemoryCompaction
261 =============================
264 Comment: Specify external fragmentation size of the kernel zone.
265 It determines when to trigger compaction.
266 <level> is an decimal integer value.
268 Example: FragLevel=800
270 2.7 Section: MemoryBackgroundReclaim
271 =============================
273 Value: (yes|1|ok|on|no|0|off)
274 Comment: Specify whether memory is reclaimed
275 from most recently used background app.
276 If value is (yes|1|ok|on), background reclaim on.
277 If value is (no|0|off), background reclaim off.
278 Example: AfterScreenDim=yes
280 2.8 Section: CpuSched
281 =====================
283 Value: <feature>([,]+<feature>)*
284 Comment: Specify cpu scheduling features.
285 <feature> can be: rt_runtime_share, no_rt_runtime_share
286 Multiple values can be used by separating them into ','.
287 Example: CpuSchedFeature=no_rt_runtime_share
290 Value: <cpu rt runtime>[ mu]?s
291 Comment: Specify cpu rt runtime in milliseconds(m), microseconds(u) or seconds.
292 <cpu rt runtime> is an decimal integer value.
293 Example: CpuRTRuntime=900ms
296 Value: <cpu rt period>[ mu]?s
297 Comment: Specify cpu rt period in milliseconds(m), microseconds(u) or seconds.
298 <cpu rt period> is an decimal integer value.
299 Example: CpuRTRuntime=900ms
301 2.9 Section: CpuAffinity
302 ========================
304 Value: (<core num>|<core range>)(,(<core num>|<core range>))*
305 Comment: Specify the cpu affinity of each core
306 <core num> is an decimal integer
307 <core range> is: <core num>-<core num>
308 Example: ForegroundApps=1,2,3-5
310 2.10 Section: CpuBoostingLevelStrong
311 ===================================
313 Value: <schedule scheme>
314 Comment: Specify the schedule scheme when the cpu boosting level is "strong".
315 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
320 Comment: Specify the nice value when the cpu boosting level is "strong".
321 <nice value> is an decimal integer value. (-20 ~ 19)
326 Comment: Specify the cpu rt priority when the cpu boosting level is "strong".
327 <priority> is an decimal integer value.
328 Example: CpuRTPriority=50
330 2.11 Section: CpuBoostingLevelMedium
331 ====================================
333 Value: <schedule scheme>
334 Comment: Specify the schedule scheme when the cpu boosting level is "medium".
335 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
340 Comment: Specify the nice value when the cpu boosting level is "medium".
341 <nice value> is an decimal integer value. (-20 ~ 19)
346 Comment: Specify the cpu rt priority when the cpu boosting level is "medium".
347 <priority> is an decimal integer value.
348 Example: CpuRTPriority=50
350 2.12 Section: CpuBoostingLevelWeak
351 ==================================
353 Value: <schedule scheme>
354 Comment: Specify the schedule scheme when the cpu boosting level is "weak".
355 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
360 Comment: Specify the nice value when the cpu boosting level is "weak".
361 <nice value> is an decimal integer value. (-20 ~ 19)
366 Comment: Specify the cpu rt priority when the cpu boosting level is "weak".
367 <priority> is an decimal integer value.
368 Example: CpuRTPriority=50
375 Key: <device module name>
377 Comment: Specify logging is ON or OFF.
378 <device module name> can be: ABNORMAL, BATTERY, CPU, MEMORY, STORAGE
379 If value is ON, then logging for <device module name> is on.
380 else no logging for this module.
383 3.2 BATTERY_POWER_MODE
384 ======================
385 Key: POWER_NORMAL_MODE
387 Comment: Specify power for normal mode.
388 <power> is an integer value.
389 Example: POWER_NORMAL_MODE=676
391 Key: POWER_SAVING_MODE
393 Comment: Specify power for saving mode.
394 <power> is an integer value.
395 Example: POWER_SAVING_MODE=750
397 Key: ULTRA_SAVING_MODE
399 Comment: Specify power for ultra saving mode.
400 <power> is an integer value.
401 Example: ULTRA_SAVING_MODE=1947
403 3.3 BATTERY_<capacity>
404 ======================
407 Comment: Specify whether logic_v2 is suppoted or not.
412 Comment: Specify whether remaining usefull life (RUL) prediction logic is supported or not.
415 Key: BATTERY_CAPACITY
417 Comment: Specify the capacity of the battery.
418 Example: BATTERY_CAPACITY=12000
422 Comment: Specify the total time(min) taken when the device is discharging at fastest rate.
423 <time> is an integer value.
424 Example: DISCHARGE_FAST=700
428 Comment: Specify the total time(min) taken when the device is discharging at slowest rate.
429 <time> is an integer value.
430 Example: DISCHARGE_SLOW=12000
434 Comment: Specify the avarage power consumed in UPS mode.
435 <avg_pwr> is a float value.
436 Example: AVERAGE_PWR=35.0
438 Key: OCV_SOC_POLY_COEF
439 Value: <ocv degree(n)> <coef 1> ... <coef n>
440 Comment: Specify coefficients of polynomial expression for OCV, SOC.
441 Example: OCV_SOC_POLY_COEF=6 3402.664 42.031 -1.76745 0.034798 -0.00030516 0.0000010116
450 Comment: Specify whether favorite apps table is required or not.
451 Favorite apps will be specified in "PREDEFINED" (see below)
456 Comment: Specify favorite apps.
457 <app name> will be added to favorite apps table.
458 Example: PREDEFINED=app1
464 Comment: Specify whether the monitoring for home directory of users is required or not
465 If TRUE, monitoring on.
467 Example: activate=TRUE
470 Value: (ACCESS|READ|WRITE|DISABLE)
471 Comment: Specify monitoring mode.
476 Comment: Specify included package name.
477 Example: include=DOWNLOADABLE
481 Comment: Specify excluded package name.
482 Example: excluded=SLP_debug
486 Comment: Specify logging type.
487 <type> is a flag value, including: DLOG(0x1), FILE(0x2), DB(0x4).
488 If DLOG and DB type, then <type> is 5 (0x01 | 0x04).
491 5. limiter.conf.d/*.conf
492 ========================
496 Key: App|Service|SERVICE|Process|PROCESS
498 Comment: Specify the name of app/service/process.
499 One per one Private section.
500 Example: Service=dbus.service
501 Example: App=org.tizen.<app>
504 Value: <limit>[GMK]B,<action>
505 Comment: Specify the memory limitation of this app/service/process.
506 <action> specifies an action to be performed when the limit is crossed.
507 <action> can be: broadcast, reclaim, kill, ignore
508 Example: MemLimitAction=4096KB,kill
510 Key: MemoryBackgroundLru
511 Value: (yes|1|ok|on|no|0|off)
512 Comment: Specify whether put the process or service
513 in BackgroundLru memory cgroup.
514 If (yes|1|ok|on), put the process or service in BackgroundLru.
515 If (no|0|off), do not put the process or service in BackgroundLru.
516 Example: MemoryBackgroundLru=yes
519 Value: (yes|1|ok|on|no|0|off)
520 Comment: Specify whether the cpu throttling is enabled.
521 If (yes|1|ok|on), enable cpu throttling.
522 If (no|0|off), disable cpu throttling.
523 Example: CpuThrottling=yes
525 Key: LmkKillException
526 Value: (yes|1|ok|on|no|0|off)
527 Comment: Specify whether the corresponding process is excluded from LMK victim list.
528 If (yes|1|ok|on), the process is removed from the list.
529 If (no|0|off), the process is not removed from the list.
530 Only app is supported, but service and process are not supported.
531 (system services with System, System::Privileged, and User attrs are
532 already removed from the list in LMK)
533 Example: LmkKillException=yes
535 6. optimizer.conf.d/*.conf
536 ==========================
540 Key: App|Service|SERVICE|Process|PROCESS
542 Comment: Specify the name of app/service/process.
543 One per one Private section.
544 Example: Service=dbus.service
545 Example: App=org.tizen.<app>
548 Value: <schedule scheme>
549 Comment: Specify the schedule scheme.
550 <schedule schedule> can be: idle, other, batch, fifo, rr, deadline
551 Example: CpuSched=idle
555 Comment: Specify the nice value.
556 <nice value> is an decimal integer value. (-20 ~ 19)
561 Comment: Specify the cpu rt priority.
562 <priority> is an decimal integer value.
563 Example: CpuRTPriority=50
565 Key: CpuBoostingLevel
566 Value: (strong|medium|weak)
567 Comment: Specify the boosting level of this app/service/process.
568 Example: CpuBoostingLevel=medium
571 Value: (cpu id|min cpu id-max cpu id|cpu_id,cpu_id)
572 Comment: Specify the cpu affinity of this app
573 Example: CpuAffinity=1,3-5,8
575 7. process.conf.d/*.conf
576 ========================
580 Key: App|Service|SERVICE|Process|PROCESS
582 Comment: Specify the name of app/service/process.
583 One per one Private section.
584 Example: Service=dbus.service
585 Example: App=org.tizen.<app>
589 Comment: Specify an action on failure.
590 <action> can be: reboot
591 Example: ActionOnFailure=reboot
595 Comment: Specify an action for watchdog.
596 <action> can be: ignore, kill
597 Example: WatchdogAction=ignore
600 Value: <oom_score_adj>
601 Comment: Specify the oom_score_adj.
602 oom_score_adj is an integer value between -900 to 250.
603 Predefined values cannot be used.
604 Predefined values are: -900, 0, 100, 150, 200, 230, 250
605 (Please refer to procfs.h)
606 Example: OomScore=125
608 8. vip-process.d/*.conf
609 =======================
611 8.1 Section: Private|VIP_GROUP
612 ==============================
613 Key: App|Service|SERVICE|Process|PROCESS
615 Comment: Specify the name of app/service/process.
616 One per one Private section.
617 Example: Service=dbus.service
618 Example: App=org.tizen.<app>
620 Key: ACTION_ON_FAILURE
622 Comment: Specify an action on failure.
623 <action> can be: reboot
624 Example: ACTION_ON_FAILURE=reboot