开发者

Are there any Java libraries for adjusting IO scheduler priority on linux

I have a Java program running on开发者_如何学编程 a linux system, which I would like to give a higher IO Scheduler priority. Is there a library JNI/JNA based that would allow me to do that from within my code?


You could spawn and external command and call ionice on your process.


You can get the PID of the Java Process by using the Java Management API, at least when using the Sun JVM. Have a look at the actual implementations of the management objects, one returns the pid (don't know which for the moment).

Then I would use jnative to call the linux function, so you don't have to rely on ionice to be installed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜