...
Core 10 and 11 were isolated from the OS using the isolcpus argument to grub command line and using virsh to Pin the vCPUs to those cores (Requires KVM acceleration):
Code Block |
---|
$ virsh vcpupin test 0 10 $ virsh vcpupin test 1 11 |
To check for KVM acceleration see that the response to the command below is > 0:
Code Block |
---|
$ cat /proc/cpuinfo | egrep -c '(vmx|svm)' |
without KVM acceleration you will need to taskset the qemu threads to the isolated cores:
Code Block |
---|
$ grep pid /var/run/libvirt/qemu/test.xml
<domstatus state='running' pid='4907'>
$ grep Cpus_allowed_list /proc/4907/task/*/status
/proc/4907/task/4916/status:Cpus_allowed_list: 4
/proc/4907/task/4917/status:Cpus_allowed_list: 5
/proc/4907/task/4918/status:Cpus_allowed_list: 6
/proc/4907/task/4919/status:Cpus_allowed_list: 7
</section> |
To taskset the process + tasks repeat the following for the PID and the subtasks:
Code Block |
---|
$ taskset -pc 4 4907... |
Guest
OS: Ubuntu 16.04.2 LTS
Install collectd and stress
...
Code Block |
---|
Hostname "ubuntu_vm" <LoadPlugin cpu> Interval 1 </LoadPlugin> LoadPlugin network <Plugin cpu> ReportByCpu true ReportByState false ValuesPercentage false </Plugin> <Plugin network> # # client setup: Server "<HOST IP>" "28597" <Server "<HOST IP>" "28597"> </Server> </Plugin> |
Check the uptime on the host
Code Block |
---|
$ uptime
12:20:22 up 5 days, 2:29, 5 users, load average: 0.84, 0.79, 0.62
|
and the guest before running any workloads
Code Block |
---|
$ uptime
12:21:27 up 9 min, 2 users, load average: 1.13, 1.89, 1.41
|
Start collectd on the host and the guest
...