VT-d scalability issue
Keir,
I have found a VT-d scalability issue and want to some feed backs.
When I assign a pass-through NIC to a linux VM and increase the num of VMs, the iperf throughput for each VM drops greatly. Say, start 8 VM running on a machine with 8 physical cpus, start 8 iperf client to connect each of them, the final result is only 60% of 1 VM.
Further investigation shows vcpu migration cause "cold" cache for pass-through domain.
following code in vmx_do_resume try to invalidate orig processor's cache when 14 migration if this domain has pass-through device and no support for wbinvd vmexit.
16 if ( has_arch_pdevs(v->domain) && !cpu_has_wbinvd_exiting )
{
int cpu = v->arch.hvm_vmx.active_cpu;
if ( cpu != -1 )
on_selected_cpus(cpumask_of_cpu(cpu), wbinvd_ipi, NULL, 1,}
So we want to pin vcpu to free processor for domains with pass-through device in creation process, just like what we did for NUMA system.
What do you think of it? Or have other ideas?
Thanks,
Signature · 2 lines
best rgds, edwin
Quoted 1 line
When I assign a pass-through NIC to a linux VM and increase the num of
VMs, the
Quoted 2 lines
iperf throughput for each VM drops greatly. Say, start 8 VM running on a machine with 8 physical cpus, start 8 iperf client to connect each
of them, the
Quoted 3 lines
final result is only 60% of 1 VM.
Further investigation shows vcpu migration cause "cold" cache for
pass-
Quoted 1 line
through domain.
Just so I understand the experiment, does each VM have a pass-through NIC, or just one?
Quoted 10 lines
following code in
vmx_do_resumetry to invalidate orig processor's cache when
14 migration if this domain has pass-through device and no support for wbinvd vmexit.
16 if (has_arch_pdevs(v->domain)&& !cpu_has_wbinvd_exiting ){ int cpu = v->arch.hvm_vmx.active_cpu; if ( cpu != -1 ) on_selected_cpus(cpumask_of_cpu(cpu), wbinvd_ipi, NULL, 1,
Quoted 4 lines
}
So we want to pin vcpu to free processor for domains with pass-through device in creation process, just like what we did for NUMA system.
What pinning functionality would we need beyond what's already there?
Thanks,
Ian
Quoted 13 lines
What do you think of it? Or have other ideas?
Thanks,
--
best rgds,
edwin_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 9 lines · Edwin
following code in
vmx_do_resumetry to invalidate orig processor's cache when 14 migration if this domain has pass-through device and no support for wbinvd vmexit.
16 if (has_arch_pdevs(v->domain)&& !cpu_has_wbinvd_exiting ){ int cpu = v->arch.hvm_vmx.active_cpu; if ( cpu != -1 ) on_selected_cpus(cpumask_of_cpu(cpu), wbinvd_ipi, NULL, 1,
Quoted 5 lines
}
So we want to pin vcpu to free processor for domains with pass-through device in
creation process, just like what we did for NUMA system.
(a) pinning support already exists.Maybe list this as 'best practice' but I don't see any need for xend changes, for example.
(b) presumably your upcoming (and existing current?) processors support wbinvd exiting anyway?
-- Keir
Quoted 5 lines · Ian Pratt
Quoted 1 line
When I assign a pass-through NIC to a linux VM and increase the num of
VMs, the
Quoted 2 lines
iperf throughput for each VM drops greatly. Say, start 8 VM running on a machine with 8 physical cpus, start 8 iperf client to connect each
of them, the
Quoted 8 lines
Quoted 3 lines
final result is only 60% of 1 VM.
Further investigation shows vcpu migration cause "cold" cache for
pass-
Quoted 1 line
through domain.
Just so I understand the experiment, does each VM have a pass-through NIC, or just one?
Each VM have a pass-through device.
Quoted 11 lines
Quoted 11 lines
following code in
vmx_do_resumetry to invalidate orig processor's cache when
14 migration if this domain has pass-through device and no support for wbinvd vmexit.
16 if (has_arch_pdevs(v->domain)&& !cpu_has_wbinvd_exiting ){ int cpu = v->arch.hvm_vmx.active_cpu; if ( cpu != -1 ) on_selected_cpus(cpumask_of_cpu(cpu), wbinvd_ipi, NULL, 1,
Quoted 6 lines
Quoted 4 lines
}
So we want to pin vcpu to free processor for domains with pass-through device in creation process, just like what we did for NUMA system.
What pinning functionality would we need beyond what's already there?
I think you mean the "cpus" in config file for vcpu affinity.
It requires extra efforts from end user. We just want to pin vcpu for VTd domain automatically in xend, like we pin vcpu to a free node in NUMA system.
Quoted 19 lines
Thanks,
IanQuoted 13 lines
What do you think of it? Or have other ideas?
Thanks,
--
best rgds,
edwin_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Signature · 2 lines
best rgds, edwin
Quoted 14 lines · Keir Fraser
Quoted 9 lines · Edwin
following code in
vmx_do_resumetry to invalidate orig processor's cache when 14 migration if this domain has pass-through device and no support for wbinvd vmexit.
16 if (has_arch_pdevs(v->domain)&& !cpu_has_wbinvd_exiting ){ int cpu = v->arch.hvm_vmx.active_cpu; if ( cpu != -1 ) on_selected_cpus(cpumask_of_cpu(cpu), wbinvd_ipi, NULL, 1,
Quoted 8 lines
Quoted 5 lines
}
So we want to pin vcpu to free processor for domains with pass-through device in
creation process, just like what we did for NUMA system.(a) pinning support already exists.Maybe list this as 'best practice' but I don't see any need for xend changes, for example.
So end user need explicitly call "xm vcpu-pin" for VTd domain. But where to put this 'best practice'?
Quoted 2 lines
(b) presumably your upcoming (and existing current?) processors support wbinvd exiting anyway?
Yes, but exist system has such problem.
Quoted 4 lines
-- Keir
Signature · 2 lines
best rgds, edwin
Quoted 4 lines · Edwin
Quoted 2 lines
(b) presumably your upcoming (and existing current?) processors support wbinvd exiting anyway?
Yes, but exist system has such problem.
Is any significant number of people really using VT-d yet? I must say I'm skeptical as to whether the existing hardware base really matters all that much.
-- Keir
Quoted 10 lines · Edwin
Quoted 2 lines
Quoted 2 lines
(b) presumably your upcoming (and existing current?) processors
support
Quoted 3 lines
Quoted 1 line
wbinvd exiting anyway?
Yes, but exist system has such problem.
Is any significant number of people really using VT-d yet? I must say I'm skeptical as to whether the existing hardware base really matters
all
Quoted 1 line
that much.
Which of the current shipping CPUs do support wbinvd exiting?
Not even Wikipedia knows the answer to that question and it's usually the best source of information about Intel CPU, certainly more help than the Intel web site :-)
Ian
Quoted 8 lines
-- Keir
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Not regarding the other questions/objections in this thread for a moment --- what kind of performance improvments are we talking of here if the vcpus are pinned? Is it close to 1 VM or is there still some performance degradation due to IOTLB pressure?
[And talking of IOTLB pressure, why can't Intel document the IOTLB sizes in the chipset docs? Or even better, why can't these values be queried from the chipset?]
eSk
[Edwin Zhai]
Quoted 38 lines
Keir,
I have found a VT-d scalability issue and want to some feed backs.When I assign a pass-through NIC to a linux VM and increase the num of VMs, the iperf throughput for each VM drops greatly. Say, start 8 VM running on a machine with 8 physical cpus, start 8 iperf client to connect each of them, the final result is only 60% of 1 VM.
Further investigation shows vcpu migration cause "cold" cache for pass-through domain. following code in
vmx_do_resumetry to invalidate orig processor's cache when 14 migration if this domain has pass-through device and no support for wbinvd vmexit.16 if (
has_arch_pdevs(v->domain)&& !cpu_has_wbinvd_exiting ){ int cpu = v->arch.hvm_vmx.active_cpu; if ( cpu != -1 ) on_selected_cpus(cpumask_of_cpu(cpu), wbinvd_ipi, NULL, 1,}
So we want to pin vcpu to free processor for domains with pass-through device in creation process, just like what we did for NUMA system.
What do you think of it? Or have other ideas?
Thanks,
Signature · 7 lines
best rgds, edwin _______________________________________________ Xen-devel mailing list [email protected] http://lists.xensource.com/xen-devel
Quoted 4 lines · Espen Skoglund
Not regarding the other questions/objections in this thread for a moment --- what kind of performance improvments are we talking of here if the vcpus are pinned? Is it close to 1 VM or is there still some performance degradation due to IOTLB pressure?
Definitely performance will degrade due to IOTLB pressure when there are many VMs which exhausts IOTLB.
Randy (Weidong)
Quoted 52 lines
[And talking of IOTLB pressure, why can't Intel document the IOTLB sizes in the chipset docs? Or even better, why can't these values be queried from the chipset?]
eSk
[Edwin Zhai]
Quoted 29 lines
Keir,
I have found a VT-d scalability issue and want to some feed backs.When I assign a pass-through NIC to a linux VM and increase the num of VMs, the iperf throughput for each VM drops greatly. Say, start 8 VM running on a machine with 8 physical cpus, start 8 iperf client to connect each of them, the final result is only 60% of 1 VM.
Further investigation shows vcpu migration cause "cold" cache for pass-through domain. following code in
vmx_do_resumetry to invalidate orig processor's cache when 14 migration if this domain has pass-through device and no support for wbinvd vmexit.16 if ( has_arch_pdevs(v->domain) && !cpu_has_wbinvd_exiting ) { int cpu = v->arch.hvm_vmx.active_cpu; if ( cpu != -1 ) on_selected_cpus(cpumask_of_cpu(cpu), wbinvd_ipi, NULL, 1,}
So we want to pin vcpu to free processor for domains with pass-through device in creation process, just like what we did for NUMA system.
What do you think of it? Or have other ideas?
Thanks,
Quoted 8 lines
--
best rgds,
edwin_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
[Weidong Han]
Quoted 8 lines
Quoted 4 lines · Espen Skoglund
Not regarding the other questions/objections in this thread for a moment --- what kind of performance improvments are we talking of here if the vcpus are pinned? Is it close to 1 VM or is there still some performance degradation due to IOTLB pressure?
Definitely performance will degrade due to IOTLB pressure when there are many VMs which exhausts IOTLB.
But how much of the degradation is due to IOTLB pressure and how much is due to vcpu pinning? If vcpu pinning doesn't give you much then why add the automatic pinning just to get a little improvement on older CPUs hooked up to a VT-d chipset?
eSk
Quoted 54 lines
Randy (Weidong)
Quoted 52 lines
[And talking of IOTLB pressure, why can't Intel document the IOTLB sizes in the chipset docs? Or even better, why can't these values be queried from the chipset?]
eSk
[Edwin Zhai]
Quoted 29 lines
Keir,
I have found a VT-d scalability issue and want to some feed backs.When I assign a pass-through NIC to a linux VM and increase the num of VMs, the iperf throughput for each VM drops greatly. Say, start 8 VM running on a machine with 8 physical cpus, start 8 iperf client to connect each of them, the final result is only 60% of 1 VM.
Further investigation shows vcpu migration cause "cold" cache for pass-through domain. following code in
vmx_do_resumetry to invalidate orig processor's cache when 14 migration if this domain has pass-through device and no support for wbinvd vmexit.16 if (
has_arch_pdevs(v->domain)&& !cpu_has_wbinvd_exiting ) { int cpu =v->arch.hvm_vmx.active_cpu;
if ( cpu != -1 )
on_selected_cpus(cpumask_of_cpu(cpu),wbinvd_ipi, NULL, 1,}
So we want to pin vcpu to free processor for domains with pass-through device in creation process, just like what we did for NUMA system.
What do you think of it? Or have other ideas?
Thanks,
Quoted 8 lines
--
best rgds,
edwin_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 7 lines · Espen Skoglund
[Weidong Han]
Quoted 5 lines
Quoted 4 lines · Espen Skoglund
Not regarding the other questions/objections in this thread for a moment --- what kind of performance improvments are we talking of here if the vcpus are pinned? Is it close to 1 VM or is there still some performance degradation due to IOTLB pressure?
Quoted 8 lines
Quoted 2 lines
Definitely performance will degrade due to IOTLB pressure when there are many VMs which exhausts IOTLB.
But how much of the degradation is due to IOTLB pressure and how much is due to vcpu pinning? If vcpu pinning doesn't give you much then why add the automatic pinning just to get a little improvement on older CPUs hooked up to a VT-d chipset?
I don't know the performance data about this. I think Edwin can answer this.
Randy (weidong)
Quoted 58 lines
eSk
Quoted 55 lines
Randy (Weidong)
Quoted 53 lines
[And talking of IOTLB pressure, why can't Intel document the IOTLB sizes in the chipset docs? Or even better, why can't these values be queried from the chipset?]
eSk
[Edwin Zhai]
Quoted 30 lines
Keir,
I have found a VT-d scalability issue and want to some feed backs.When I assign a pass-through NIC to a linux VM and increase the num of VMs, the iperf throughput for each VM drops greatly. Say, start 8 VM running on a machine with 8 physical cpus, start 8 iperf client to connect each of them, the final result is only 60% of 1 VM.
Further investigation shows vcpu migration cause "cold" cache for pass-through domain. following code in
vmx_do_resumetry to invalidate orig processor's cache when 14 migration if this domain has pass-through device and no support for wbinvd vmexit.16 if (
has_arch_pdevs(v->domain)&& !cpu_has_wbinvd_exiting ) { int cpu =v->arch.hvm_vmx.active_cpu;
if ( cpu != -1 )
on_selected_cpus(cpumask_of_cpu(cpu),wbinvd_ipi, NULL, 1,}
So we want to pin vcpu to free processor for domains with pass-through device in creation process, just like what we did for NUMA system.
What do you think of it? Or have other ideas?
Thanks,
Quoted 8 lines
--
best rgds,
edwin_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 7 lines · Espen Skoglund
[Weidong Han]
Quoted 5 lines
Quoted 4 lines · Espen Skoglund
Not regarding the other questions/objections in this thread for a moment --- what kind of performance improvments are we talking of here if the vcpus are pinned? Is it close to 1 VM or is there still some performance degradation due to IOTLB pressure?
Quoted 7 lines
Quoted 2 lines
Definitely performance will degrade due to IOTLB pressure when there are many VMs which exhausts IOTLB.
But how much of the degradation is due to IOTLB pressure and how much is due to vcpu pinning? If vcpu pinning doesn't give you much then why add the automatic pinning just to get a little improvement on older CPUs hooked up to a VT-d chipset?
Say, throughput of 1 pass-through domain is 100%,
if not pin vcpu, average throughput of 8 pass-through domain is 59%. If pin vcpu, average is 95%.
So you can see how much vcpu pinning contribute to the performance.
Quoted 60 lines
eSk
Quoted 54 lines
Randy (Weidong)
Quoted 52 lines
[And talking of IOTLB pressure, why can't Intel document the IOTLB sizes in the chipset docs? Or even better, why can't these values be queried from the chipset?]
eSk
[Edwin Zhai]
Quoted 29 lines
Keir,
I have found a VT-d scalability issue and want to some feed backs.When I assign a pass-through NIC to a linux VM and increase the num of VMs, the iperf throughput for each VM drops greatly. Say, start 8 VM running on a machine with 8 physical cpus, start 8 iperf client to connect each of them, the final result is only 60% of 1 VM.
Further investigation shows vcpu migration cause "cold" cache for pass-through domain. following code in
vmx_do_resumetry to invalidate orig processor's cache when 14 migration if this domain has pass-through device and no support for wbinvd vmexit.16 if (
has_arch_pdevs(v->domain)&& !cpu_has_wbinvd_exiting ) { int cpu =v->arch.hvm_vmx.active_cpu;
if ( cpu != -1 )
on_selected_cpus(cpumask_of_cpu(cpu),wbinvd_ipi, NULL, 1,}
So we want to pin vcpu to free processor for domains with pass-through device in creation process, just like what we did for NUMA system.
What do you think of it? Or have other ideas?
Thanks,
Quoted 8 lines
--
best rgds,
edwin_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Signature · 2 lines
best rgds, edwin
Quoted 1 line
Quoted 1 line
But how much of the degradation is due to IOTLB pressure and how
much
Quoted 9 lines
Quoted 3 lines
is due to vcpu pinning? If vcpu pinning doesn't give you much then why add the automatic pinning just to get a little improvement on older CPUs hooked up to a VT-d chipset?
Say, throughput of 1 pass-through domain is 100%,
if not pin vcpu, average throughput of 8 pass-through domain is 59%. If pin vcpu, average is 95%.So you can see how much vcpu pinning contribute to the performance.
For comparison, what are the results if you use a penryn with wbinvd exit support?
Thanks,
Ian
Quoted 8 lines
Quoted 8 lines
eSk
Quoted 4 lines
Randy (Weidong)
Quoted 2 lines
[And talking of IOTLB pressure, why can't Intel document the
IOTLB
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
sizes in the chipset docs? Or even better, why can't these
values
Quoted 9 lines
be
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
queried from the chipset?]
eSk
[Edwin Zhai]
Quoted 2 lines
Keir,
I have found a VT-d scalability issue and want to some feed
Quoted 11 lines
backs.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
When I assign a pass-through NIC to a linux VM and increase the
num
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
of VMs, the iperf throughput for each VM drops greatly. Say,
start 8
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
VM running on a machine with 8 physical cpus, start 8 iperf
client
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
to connect each of them, the final result is only 60% of 1 VM.
Further investigation shows vcpu migration cause "cold" cache
for
Quoted 47 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
pass-through domain. following code in
vmx_do_resumetry to invalidate orig processor's cache when 14 migration if thisdomain
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
has pass-through device and no support for wbinvd vmexit.
16 if (
has_arch_pdevs(v->domain)&& !cpu_has_wbinvd_exiting ) { int cpu =v->arch.hvm_vmx.active_cpu;
if ( cpu != -1 )
on_selected_cpus(cpumask_of_cpu(cpu),wbinvd_ipi, NULL, 1,}
So we want to pin vcpu to free processor for domains with pass-through device in creation process, just like what we did
for
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 15 lines
NUMA system.
What do you think of it? Or have other ideas?
Thanks,
--
best rgds,
edwin_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-develQuoted 6 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel--
best rgds,
edwin_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 6 lines · Ian Pratt
Quoted 1 line
Quoted 1 line
But how much of the degradation is due to IOTLB pressure and how
much
Quoted 4 lines
Quoted 3 lines
is due to vcpu pinning? If vcpu pinning doesn't give you much then why add the automatic pinning just to get a little improvement on older CPUs hooked up to a VT-d chipset?
Quoted 8 lines
Quoted 5 lines
Say, throughput of 1 pass-through domain is 100%,
if not pin vcpu, average throughput of 8 pass-through domain is 59%. If pin vcpu, average is 95%.So you can see how much vcpu pinning contribute to the performance.
For comparison, what are the results if you use a penryn with wbinvd exit support?
The penryn system has no much processor for scalability test, so I have no data:(
Quoted 86 lines
Thanks,
IanQuoted 8 lines
Quoted 8 lines
eSk
Quoted 4 lines
Randy (Weidong)
Quoted 2 lines
[And talking of IOTLB pressure, why can't Intel document the
IOTLB
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
sizes in the chipset docs? Or even better, why can't these
values
Quoted 9 lines
be
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
queried from the chipset?]
eSk
[Edwin Zhai]
Quoted 2 lines
Keir,
I have found a VT-d scalability issue and want to some feedQuoted 11 lines
backs.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
When I assign a pass-through NIC to a linux VM and increase the
num
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
of VMs, the iperf throughput for each VM drops greatly. Say,
start 8
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
VM running on a machine with 8 physical cpus, start 8 iperf
client
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
to connect each of them, the final result is only 60% of 1 VM.
Further investigation shows vcpu migration cause "cold" cache
for
Quoted 47 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
pass-through domain. following code in
vmx_do_resumetry to invalidate orig processor's cache when 14 migration if thisdomain
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
has pass-through device and no support for wbinvd vmexit.
16 if (
has_arch_pdevs(v->domain)&& !cpu_has_wbinvd_exiting ) { int cpu =v->arch.hvm_vmx.active_cpu;
if ( cpu != -1 )
on_selected_cpus(cpumask_of_cpu(cpu),wbinvd_ipi, NULL, 1,}
So we want to pin vcpu to free processor for domains with pass-through device in creation process, just like what we did
for
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 15 lines
NUMA system.
What do you think of it? Or have other ideas?
Thanks,
--
best rgds,
edwin_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-develQuoted 6 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel--
best rgds,
edwin_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Signature · 2 lines
best rgds, edwin