Can I tell Linux not to swap out a particular processes' memory?

后端 未结 7 1990
孤城傲影
孤城傲影 2020-12-02 13:29

Is there a way to tell Linux that it shouldn\'t swap out a particular processes\' memory to disk?

Its a Java app, so ideally I\'m hoping for a way to do this from th

7条回答
  •  半阙折子戏
    2020-12-02 13:50

    As super user you can 'nice' it to the highest priority level -20 and hope that's enough to keep it from being swapped out. It usually is. Positive numbers lower scheduling priority. Normal users cannot nice upwards (negative nos.)

提交回复
热议问题