Mediate disk io with ionice
http://blog.prgmr.com/xenophobia/2008/06/using-ionice1-to-mediate-disk.html
first, find the heavy user with iostat or the like.
this will give you a device mapper name. dm-xx
xx is the minor number you see in ls -l /dev/mapper
[root@chariot ~]# ls -l /dev/mapper|grep " 51 " brw-rw---- 1 root disk 252, 51 Sep 11 23:22 guests-lvname
Then find the lvname in /etc/xen
grep lvname /etc/xen/* /etc/xen/username: 'phy:/dev/guests/lvname,xvda,w',
First, look at the console. Is it spinning on an oom-kiler? in that case, it's probably alrealdy messed up for the user, so just reboot it.
Next, if it's okay, they are just using a lot of I/O, you can make I/O only suck for them with ionice.
look up the domain ID now, in this case, it's 52
[root@chariot ~]# xm list username Name ID Mem VCPUs State Time(s) weightech 52 1024 2 -b---- 454832.8
[root@chariot ~]# ps ax |grep blkback.52.xvd 2745 ? S< 1:54 [blkback.52.xvda] 2746 ? S< 0:00 [blkback.52.xvde] 2747 ? S< 0:00 [blkback.52.xvdf] 26608 pts/9 R+ 0:00 grep blkback.52.xvd [root@chariot ~]#
in my case, almost everything is xvda.
[root@chariot ~]# ionice -p 2745 -c 2 -n 7
limited, I think? it only kinda works.
[root@chariot ~]# ionice -p 2745 -c 3
now, it's really limited. Note, it sucks to be that guest, but that guest was making it suck for everyone else, so we need a better policy on this.