From this comment I understand the "IFEO" system that enables the WS setting requires admin rights, but is there perhaps another way to let non-admin users configure this setting?
Context
I am looking for a way to let regular users set a memory limit on their (mostly python) processes without letting the process crash. The latter happens when users set the --maxmem or --maxjobmem option for their process. However, setting the --maxws works beautifully if a user has admin rights.
Can I somehow grant rights to set WS, without making the users admin?
In case clarification is needed, this is an example of how I would like to use this functionality (currently fails with ERROR: A required privilege is not held by the client. (0x80004005) for non-admin users):
# %%
import os
from random import random
import psutil
print(os.getpid())
print(f"Memory (MB): {psutil.Process(os.getpid()).memory_info().rss / 1024**2:.2f}")
os.system(f"procgov64 --nowait --minws 10M --maxws 120M -p {os.getpid()}")
# %% Limit memory
huge = [random() for x in range(1, 1_000_000)]
result = []
for i in range(0, 100):
print(f"{i}: Memory (MB): {psutil.Process(os.getpid()).memory_info().rss / 1024**2:.2f}")
result.extend(huge)
From this comment I understand the "IFEO" system that enables the WS setting requires admin rights, but is there perhaps another way to let non-admin users configure this setting?
Context
I am looking for a way to let regular users set a memory limit on their (mostly python) processes without letting the process crash. The latter happens when users set the
--maxmemor--maxjobmemoption for their process. However, setting the--maxwsworks beautifully if a user has admin rights.Can I somehow grant rights to set WS, without making the users admin?
In case clarification is needed, this is an example of how I would like to use this functionality (currently fails with
ERROR: A required privilege is not held by the client. (0x80004005)for non-admin users):