You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux version 5.15.90.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Jan 27 02:56:13 UTC 2023
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
Unable to be nice on WSL.
Adding user - nice -19 to /etc/security/limits.conf doesn't take effect. Rebooting or rerunning the shell and also adding pam_limits.so module into /etc/pam.d/common-session doesn't work either.
One can run nice --1 ls for a quick sanity check and see if the permission denied message pops up.
One can be nice on normal Ubuntu servers, be it hypervisors or baremetal, just not WSL2 and probably WSL too.
Expected Behavior
Able to be nice and run processes at higher priority (or lower).
A temporary fix for anyone encountering the issue:
su $USER
ulimit -e 39
This indirectly address the problem by allowing the user to change their thread max priority to 39, hence allowing nice level to go to -19.
Actual Behavior
WSL is unable to be nice and processes can only work at the priority dictated by the default configuration (unless you run your process in root, which is a bad idea).
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered:
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Windows Version
Microsoft Windows [Version 10.0.22621.2428]
WSL Version
WSL version: 1.2.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 5.15.90.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Jan 27 02:56:13 UTC 2023
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
Unable to be nice on WSL.
Adding
user - nice -19
to/etc/security/limits.conf
doesn't take effect. Rebooting or rerunning the shell and also addingpam_limits.so
module into/etc/pam.d/common-session
doesn't work either.One can run
nice --1 ls
for a quick sanity check and see if thepermission denied
message pops up.One can be nice on normal Ubuntu servers, be it hypervisors or baremetal, just not WSL2 and probably WSL too.
Expected Behavior
Able to be nice and run processes at higher priority (or lower).
A temporary fix for anyone encountering the issue:
This indirectly address the problem by allowing the user to change their thread max priority to 39, hence allowing nice level to go to -19.
Actual Behavior
WSL is unable to be nice and processes can only work at the priority dictated by the default configuration (unless you run your process in root, which is a bad idea).
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: