This commit is contained in:
Alexey Avramov 2019-06-12 18:52:38 +09:00
parent fdf65fddc4
commit 5c0744dbe5
2 changed files with 11 additions and 45 deletions

44
nohang
View File

@ -10,7 +10,7 @@ from re import search
from sre_constants import error as invalid_re
from signal import signal, SIGKILL, SIGTERM, SIGINT, SIGQUIT, SIGHUP
#from subprocess import Popen
##########################################################################
@ -887,42 +887,6 @@ def send_notification(title, body):
cmd = '{} --uid {} --time {} &'.format(notify_helper_path, self_uid, t000)
exe(cmd)
#t5 = time()
#Popen([notify_helper_path, '--uid', str(self_uid), '--time', str(t000)])
#print(time() - t5)
@ -2094,16 +2058,18 @@ actions_time_dict['action_handled'] = [time(), victim_id]
v_dict = dict()
# {SIGTERM: timestamp, SIGKILL: timestamp}
# {SIGTERM: timestamp, SIGKILL: timestamp, 'last_action_ts': ts}
a_dict = dict()
a_dict['last_action_ts'] = a_dict[SIGTERM] = a_dict[SIGKILL] = time()
# print(a_dict)

View File

@ -101,15 +101,15 @@ psi_path = /proc/pressure/memory
some_avg10 is most sensitive.
psi_metrics = some_avg10
psi_metrics = full_avg10
sigterm_psi_threshold = 60
sigkill_psi_threshold = 90
sigterm_psi_threshold = 85
sigkill_psi_threshold = 95
>= 0, float
psi_excess_duration = 40
psi_excess_duration = 60
psi_post_action_delay = 20
psi_post_action_delay = 120
###############################################################################
@ -289,7 +289,7 @@ swap_min_warnings = 50 %
zram_max_warnings = 40 %
psi_avg_warnings = 60
psi_avg_warnings = 100
Valid values are floating-point numbers from the range [1; 300].