[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] limit dom0 cpu resource

On Tue, Oct 13, 2015 at 6:47 AM, Qqblog Qqblog <qqblog@xxxxxxxxx> wrote:
> when i download 100G files (for transfering VM from other hosts) using sftp
> to dom0, the whole system and all VM are slowed down.
> could we limit the dom0 resource so as not to affect other VMs?

The direct answer to "can we limit the dom0 resource" is:

1. Be aware that limiting dom0 CPU usage will reduce the speed of data transfer
2. You can limit the number of vcpus given to dom0.  For instance, if
your system has 8 cores, you could set dom0_max_vcpus=4 in your xen
command-line and reboot.  You can also offline cpus on the running
system by doing "echo 0 > /sys/devices/system/cpu/cpu${n}/online",
where $n is the cpu number (starting at 0).

That said, it's a bit strange for a single network stream to be able
to saturate *all* cpus.  I would normally expect it to consume no more
than 2 -- one to handle the network copying, and one to handle
decryption (since you're using sftp). Have you run "xentop", and
verified that dom0 is actually consuming nearly all of the available
cpu time?

Are any of the other theories possible:
1. dom0 is already cpu starved, and this is slowing down the other VMs
because they are waiting on processes in dom0 -- for example, xenstore
or qemu -- to finish?  If this is the case, then reducing dom0 cpu
will make the problem worse.
2. the VMs themselves aren't slowed down, but *access* to them (via
ssh or vnc) is, because network traffic is now very high-latency due
to the sftp?  Again in this case limiting the cpu in dom0 will likely
not help, and may make the problem worse.

Another thing you might look into is whether you can do rate limiting
for sftp -- figure out your normal bandwidth and limit it to 50% or
25%.  If your issue is coming from the sftp copy, that should
alleviate most of your problems.


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.