How to increase the I/O priority of processes
In Linux, you can increase or decrease I/O access priority per process with ionice, which displays and changes a process’s I/O scheduling class and priority. Command syntax
#ionice [-c] [-n] [-p] [COMMAND [ARG…]]
Where:
-c คือการกำหนด scheduling class โดยที่ 1 คือ real time, 2 คือ best-effort และ 3 คือ idle.
-n คือการกำหนด scheduling class data เป็นการ defines class data ซึ่งสามารถใช้ได้กับ -c1 และ -c2 เท่านั้น
หรือก็คือ real time และ best-effort โดยเรียงจาก 0-7 (0 จะมาค่า priority มากที่สุด)
-p คือค่า process id นั้นเอง แต่ถ้าไม่มีการกำหนดพารามิเตอร์ -c และ -n โปรแกรม ionice จะแสดง
รายละเอียดของค่าต่างๆ ใน process id นั้นแทน
ionice examples Set PID 89 to the idle I/O class:
ionice -c3 -p89
Run bash with best-effort scheduling and the highest priority:
ionice -c2 -n0 bash
Display only the scheduling class and priority parameters for PID 89: