set CPUSchedulingPolicy=fifo

This commit is contained in:
Alexey Avramov 2019-01-14 18:03:17 +09:00
parent 8192681b07
commit e62629d57d
3 changed files with 46 additions and 44 deletions

7
nohang
View File

@ -27,7 +27,7 @@ else:
wait_time = 14
max_sleep_time = 1
min_sleep_time = 0.05
min_sleep_time = 0.02
notify_helper_path = '/usr/bin/nohang_notify_helper'
@ -38,8 +38,10 @@ debug = False
stop_cont = True
print_states_debug = False
SC_CLK_TCK = os.sysconf(os.sysconf_names['SC_CLK_TCK'])
# SC_CLK_TCK = os.sysconf(os.sysconf_names['SC_CLK_TCK'])
##########################################################################
@ -488,6 +490,7 @@ def cont(stopped_list):
def print_states():
if print_states_debug:
print()
t1 = time()
print('non-S states:')

View File

@ -42,13 +42,13 @@
MemAvailable levels.
mem_min_sigterm = 10%
mem_min_sigkill = 5%
mem_min_sigterm = 200M
mem_min_sigkill = 100M
SwapFree levels.
swap_min_sigterm = 10%
swap_min_sigkill = 5%
swap_min_sigterm = 200M
swap_min_sigkill = 100M
Specifying the total share of zram in memory, if exceeded the
corresponding signals are sent. As the share of zram in memory
@ -118,7 +118,7 @@ min_badness = 30
Valid values are non-negative floating-point numbers.
min_delay_after_sigterm = 0.2
min_delay_after_sigkill = 0.8
min_delay_after_sigkill = 1
Процессы браузера chromium обычно имеют oom_score_adj
200 или 300. Это приводит к тому, что процессы хрома умирают
@ -132,7 +132,7 @@ min_delay_after_sigkill = 0.8
Valid values are True and False.
Values are case sensitive.
decrease_oom_score_adj = False
decrease_oom_score_adj = True
Valid values are integers from the range [0; 1000].
@ -160,7 +160,7 @@ oom_score_adj_max = 30
Valid values are True and False.
regex_matching = False
regex_matching = True
Syntax:
@ -184,7 +184,7 @@ regex_matching = False
A good option that allows fine adjustment.
re_match_cmdline = False
re_match_cmdline = True
@CMDLINE_RE 300 /// -childID|--type=renderer
@ -195,7 +195,7 @@ re_match_cmdline = False
The most slow option
re_match_uid = False
re_match_uid = True
@UID_RE -100 /// ^0$
@ -215,7 +215,7 @@ re_match_uid = False
Valid values are True and False.
execute_the_command = False
execute_the_command = True
The length of the process name can't exceed 15 characters.
The syntax is as follows: lines starting with keyword $ETC are
@ -258,7 +258,7 @@ $ETC firefox-esr /// kill -SEGV $PID
See also wiki.archlinux.org/index.php/Desktop_notifications
Valid values are True and False.
gui_notifications = False
gui_notifications = True
Enable GUI notifications about the low level of available memory.
Valid values are True and False.
@ -268,7 +268,7 @@ gui_low_memory_warnings = False
Минимальное время между отправками уведомлений в секундах.
Valid values are floating-point numbers from the range [1; 300].
min_time_between_warnings = 10
min_time_between_warnings = 15
Если значения MemAvailable и SwapFree одновременно будут ниже
соотвестствующих значений, то будут отправлены уведомления.
@ -301,7 +301,7 @@ print_config = False
Print memory check results.
Valid values are True and False.
print_mem_check_results = True
print_mem_check_results = False
Print sleep periods between memory checks.
Valid values are True and False.

View File

@ -5,19 +5,18 @@ Documentation=man:nohang(1) https://github.com/hakavlad/nohang
[Service]
ExecStart=/usr/sbin/nohang
Slice=nohang.slice
Restart=always
RestartSec=1
IOSchedulingClass=1
IOSchedulingPriority=0
Nice=-20
CPUSchedulingPolicy=rr
CPUSchedulingPriority=99
CPUSchedulingResetOnFork=true
ProtectSystem=strict
MemoryMax=100M
TasksMax=100
OOMScoreAdjust=-20
Slice=nohang.slice
OOMScoreAdjust=-10
Nice=-20
IOSchedulingClass=1
IOSchedulingPriority=0
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=99
CPUSchedulingResetOnFork=true
[Install]
WantedBy=multi-user.target