Keep deep sharing generation within host memory guards
This commit is contained in:
+3
-2
@@ -109,8 +109,9 @@ class StreamingLM:
|
||||
rate = (count-self.swap_observation[1])*4096/elapsed
|
||||
self.swap_pressure_windows = self.swap_pressure_windows+1 if rate > 4*1024**2 else 0
|
||||
own_swap_kib = int(status.get('VmSwap', '0 kB').split()[0])
|
||||
if self.swap_pressure_windows >= 3 and (
|
||||
available < 384*1024 or own_swap_kib > self.process_swap_limit_kib):
|
||||
over_process_limit = (self.process_swap_limit_kib is not None
|
||||
and own_swap_kib > self.process_swap_limit_kib)
|
||||
if self.swap_pressure_windows >= 3 and (available < 384*1024 or over_process_limit):
|
||||
raise MemoryError(f'Sustained host swap pressure plus constrained memory: available={available} KiB, process_swap={own_swap_kib} KiB')
|
||||
self.swap_observation = (now,count)
|
||||
if rss_kib > 512*1024 or available < 256*1024:
|
||||
|
||||
Reference in New Issue
Block a user