Skip to content

Commit

Permalink
feat: set CPU guarantee depending on limit
Browse files Browse the repository at this point in the history
Sets a CPU guarantee equal to 1 if limit is <= 4, equal to 2 if larger
limit.

Related: https://support.d4science.org/issues/25331
  • Loading branch information
enolfc committed Jul 4, 2023
1 parent 26fed8c commit 44d98de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions egi_notebooks_hub/d4science.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,9 @@ def profile_list(self, spawner):
cut_info = []
if "Cores" in p["Cut"]:
override["cpu_limit"] = float(p["Cut"]["Cores"])
override["cpu_guarantee"] = (
1 if override["cpu_limit"] <= 4 else 2
)
cut_info.append(f"{p['Cut']['Cores']} Cores")
if "Memory" in p["Cut"]:
override["mem_limit"] = (
Expand Down

0 comments on commit 44d98de

Please sign in to comment.