Skip to content

Commit

Permalink
Adjustment to Elastic sleeping engines that take into account the num…
Browse files Browse the repository at this point in the history
…ber of CPUs on the system. Should

improve server load management.

Changes to be committed:
	modified:   Base/Library/JRRsupport.py
  • Loading branch information
rapmd73 committed May 20, 2024
1 parent 4a1fa45 commit e8b1935
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Base/Library/JRRsupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,8 +749,8 @@ def ElasticSleep(s,Fuzzy=True):
if Fuzzy:
throttle=0
LoadAVG=GetLoadAVG()
d=float(max(LoadAVG[0],LoadAVG[1],LoadAVG[2]))
c=os.cpu_count()
d=float(max(LoadAVG[0],LoadAVG[1],LoadAVG[2]))/c
n=os.getpriority(os.PRIO_PROCESS,0)

# if load is greater then the number of cpus, the renice to the lowest priority
Expand Down

0 comments on commit e8b1935

Please sign in to comment.