要改变hardlimit for nice,我可以修改/etc/security/limits.conf
user - nice -11
但是我怎样才能为ionice做同样的事情
ionice -c 1 -p 31828
我收到了错误
ionice: ioprio_set Failed: Operation not permitted
解决方法
此错误(EPERM)表示您没有足够的权限来执行该操作. ioprio_set():
An unprivileged process may only set the I/O
priority of a process whose real UID matches the real or effective UID
of the calling process. A process which has the CAP_SYS_NICE
capability can change the priority of any process.
因此,要么成为超级用户(使用sudo),要么在自己的一个进程上使用ionice.