OpenVZ Forum


Home » General » Support » "strong" Disk I/O prioritisation
"strong" Disk I/O prioritisation [message #29238] Wed, 09 April 2008 11:45 Go to previous message
gnutered is currently offline  gnutered
Messages: 12
Registered: April 2008
Junior Member
I want to be able to give absolute I/O priority to one (or a few) VE, and have it so that all I/O for other VEs gets serviced only when idle.

I tried using the "set ... --ioprio" option, as per below, but found that in rough tests, it only slews things slightly in favour of my preferred VE.

Am I doing something wrong? Is this as good as it gets?

As a workaround, I tried using ionice within the VE. Even after adding the sys_admin and sys_nice capabilities, I still got

# ionice -c3 id
ioprio_set: Operation not permitted


I could perhaps live with running ionice within my low priority VEs if I could get it to work.

Detail...

Kernel: Linux sodium 2.6.18-028stab053.tl20080408 (my compile of OVZ's latest vanilla kernel + latest stable patch)

urand is a 512MB cat of /dev/urandom in the root directory of each of VEs 100 and 200 (different file)

By themselves, it takes about 8 seconds to cat the file:
tony@sodium:~$ sudo vzctl exec 100 time cat /urand \> /dev/null

real    0m7.754s
user    0m0.052s
sys     0m0.524s
tony@sodium:~$ sudo vzctl exec 200 time cat /urand \> /dev/null

real    0m7.803s
user    0m0.044s
sys     0m0.520s


I start running one in a constant loop:
tony@sodium:~$ while true; do sudo vzctl exec 100 time cat /urand \> /dev/null ; done


Then in another terminal I cat the file on the other VE. This shows that IO is roughly shared between VEs at the moment:
tony@sodium:~$ sudo vzctl exec 200 time cat /urand \> /dev/null

real    0m17.745s
user    0m0.068s
sys     0m0.504s


Now I set the priorities:
tony@sodium:~$ sudo vzctl set 100 --ioprio 0 --save
Saved parameters for VE 100
tony@sodium:~$ sudo vzctl set 200 --ioprio 7 --save
Saved parameters for VE 200


And restart the loop. In the other VE, I run once:
tony@sodium:~$ sudo vzctl exec 200 time cat /urand \> /dev/null

real    0m13.341s
user    0m0.080s
sys     0m0.488s


I was hoping this figure would be a lot closer to the original 8 seconds. Can I do better than this in brutally prioritising one VE over another?

My rationale for this is to protect my production webserver (two heavily used phpbb websites) from my other VEs. Currently (linux-vserver, Ubuntu 6.06), simply copying a file of moderate size (more than 500MB) brings the prod webserver to its knees for minutes, which makes me unpopular.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: WebVZ 1.5. is released (Control Panel)
Next Topic: OpenVZ and Lustre
Goto Forum:
  


Current Time: Sun Jul 14 04:14:12 GMT 2024

Total time taken to generate the page: 0.02092 seconds