xen-netback: always fully coalesce guest Rx packets
Subsystems (3)
RFC PATCH 1/1 xen-netback: always fully coalesce guest Rx packets
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM) /unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
[1] http://lists.xen.org/archives/html/xen-devel/2015-01/msg01118.html
--- drivers/net/xen-netback/common.h | 1 - drivers/net/xen-netback/netback.c | 106 ++----------------------------------- 2 files changed, 3 insertions(+), 104 deletions(-)
drivers/net/xen-netback/common.h +0 -1
@@ -251,7 +251,6 @@ struct xenvif {struct xenvif_rx_cb {unsigned long expires;int meta_slots_used; -bool full_coalesce; };#define XENVIF_RX_CB (skb) ((struct xenvif_rx_cb *)(skb)->cb)
drivers/net/xen-netback/netback.c +3 -103
138 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Quoted 5 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
Good number.
Quoted 2 lines
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM)
Do you have figures before and after this change?
Quoted 7 lines
/unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
It the new path improves off-host RX on all Xen versions and doesn't degrade intrahost VM to VM RX that much, I think we should use it unconditionally. Is intrahost VM to VM RX important to XenServer?
I don't consider intrahost VM to VM RX a very important use case, at least not as important as off-host RX. I would expect in a could environment users would not count on their VMs reside on the same host. Plus, some could provider might deliberately route traffic off-host for various reasons even if VMs are on the same host. (Verizon for one, mentioned they do that during last year's Xen Summit IIRC).
Others might disagree. Let's wait for other people to chime in.
Quoted 7 lines
[1] http://lists.xen.org/archives/html/xen-devel/2015-01/msg01118.html
Signed-off-by David Vrabel <[email protected]>--- drivers/net/xen-netback/common.h | 1 - drivers/net/xen-netback/netback.c | 106 ++----------------------------------- 2 files changed, 3 insertions(+), 104 deletions(-)
Love the diffstat!
Wei.
Quoted 7 lines · Wei Liu
Quoted 5 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
Quoted 6 lines
Good number.
Quoted 2 lines
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM)
Do you have figures before and after this change?
Some better (more rigorous) results done by Jonathan Davies shows no regressions with full coalescing even without the grant copy optimization, and a big improvement to single stream receive.
baseline Full coalesce Interhost aggregate 24 Gb/s 24 Gb/s Interhost VM receive 7.2 Gb/s 11 Gb/s Intrahost single stream 14 Gb/s 14 Gb/s Intrahost aggregate 34 Gb/s 34 Gb/s
We do not measure the performance of dom0 to guest traffic but my ad-hoc measurements suggest this may be 5-10% slower. I don't think this is a very important use case though.
So...
Quoted 6 lines
Quoted 6 lines
/unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
...I think the answer to this is no.
Quoted 6 lines
Quoted 4 lines
--- drivers/net/xen-netback/common.h | 1 - drivers/net/xen-netback/netback.c | 106 ++----------------------------------- 2 files changed, 3 insertions(+), 104 deletions(-)Love the diffstat!
Yes, it's always nice when you delete code and it goes faster... :)
David
Quoted 25 lines · David Vrabel
Quoted 7 lines · Wei Liu
Quoted 5 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
Quoted 6 lines
Good number.
Quoted 2 lines
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM)
Do you have figures before and after this change?
Some better (more rigorous) results done by Jonathan Davies shows no regressions with full coalescing even without the grant copy optimization, and a big improvement to single stream receive.
baseline Full coalesce Interhost aggregate 24 Gb/s 24 Gb/s Interhost VM receive 7.2 Gb/s 11 Gb/s Intrahost single stream 14 Gb/s 14 Gb/s Intrahost aggregate 34 Gb/s 34 Gb/s
Quoted 3 lines
We do not measure the performance of dom0 to guest traffic but my ad-hoc measurements suggest this may be 5-10% slower. I don't think this is a very important use case though.
If you are updating your dom0 kernel to take advantage of this improvement and you care about dom0->domU performance too then also updating your Xen at the same is not a huge deal, I think. Or at least I don't consider it a blocker for making progress (certainly not progress of the order of 50% improvements!).
Quoted 10 lines
So...
Quoted 6 lines
Quoted 6 lines
/unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
...I think the answer to this is no.
Agreed.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
--- drivers/net/xen-netback/common.h | 1 - drivers/net/xen-netback/netback.c | 106 ++----------------------------------- 2 files changed, 3 insertions(+), 104 deletions(-)Love the diffstat!
Yes, it's always nice when you delete code and it goes faster... :)
Full-Ack to that ;-)
Ian.
Quoted 25 lines · David Vrabel
Quoted 7 lines · Wei Liu
Quoted 5 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
Quoted 6 lines
Good number.
Quoted 2 lines
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM)
Do you have figures before and after this change?
Some better (more rigorous) results done by Jonathan Davies shows no regressions with full coalescing even without the grant copy optimization, and a big improvement to single stream receive.
baseline Full coalesce Interhost aggregate 24 Gb/s 24 Gb/s Interhost VM receive 7.2 Gb/s 11 Gb/s Intrahost single stream 14 Gb/s 14 Gb/s Intrahost aggregate 34 Gb/s 34 Gb/s
Quoted 3 lines
We do not measure the performance of dom0 to guest traffic but my ad-hoc measurements suggest this may be 5-10% slower. I don't think this is a very important use case though.
If you are updating your dom0 kernel to take advantage of this improvement and you care about dom0->domU performance too then also updating your Xen at the same is not a huge deal, I think. Or at least I don't consider it a blocker for making progress (certainly not progress of the order of 50% improvements!).
Quoted 10 lines
So...
Quoted 6 lines
Quoted 6 lines
/unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
...I think the answer to this is no.
Agreed.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
--- drivers/net/xen-netback/common.h | 1 - drivers/net/xen-netback/netback.c | 106 ++----------------------------------- 2 files changed, 3 insertions(+), 104 deletions(-)Love the diffstat!
Yes, it's always nice when you delete code and it goes faster... :)
Full-Ack to that ;-)
Ian.
Quoted 19 lines · David Vrabel
Quoted 7 lines · Wei Liu
Quoted 5 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
Quoted 6 lines
Good number.
Quoted 2 lines
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM)
Do you have figures before and after this change?
Some better (more rigorous) results done by Jonathan Davies shows no regressions with full coalescing even without the grant copy optimization, and a big improvement to single stream receive.
Quoted 5 lines
baseline Full coalesce Interhost aggregate 24 Gb/s 24 Gb/s Interhost VM receive 7.2 Gb/s 11 Gb/s Intrahost single stream 14 Gb/s 14 Gb/s Intrahost aggregate 34 Gb/s 34 Gb/s
Do you have a third column to hand, for Full-coalesce w/ grant copy optimisation case? (Don't worry if not)
Ian.
Quoted 19 lines · David Vrabel
Quoted 7 lines · Wei Liu
Quoted 5 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
Quoted 6 lines
Good number.
Quoted 2 lines
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM)
Do you have figures before and after this change?
Some better (more rigorous) results done by Jonathan Davies shows no regressions with full coalescing even without the grant copy optimization, and a big improvement to single stream receive.
Quoted 5 lines
baseline Full coalesce Interhost aggregate 24 Gb/s 24 Gb/s Interhost VM receive 7.2 Gb/s 11 Gb/s Intrahost single stream 14 Gb/s 14 Gb/s Intrahost aggregate 34 Gb/s 34 Gb/s
Do you have a third column to hand, for Full-coalesce w/ grant copy optimisation case? (Don't worry if not)
Ian.
Quoted 7 lines · Wei Liu
Quoted 5 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
Quoted 6 lines
Good number.
Quoted 2 lines
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM)
Do you have figures before and after this change?
Some better (more rigorous) results done by Jonathan Davies shows no regressions with full coalescing even without the grant copy optimization, and a big improvement to single stream receive.
baseline Full coalesce Interhost aggregate 24 Gb/s 24 Gb/s Interhost VM receive 7.2 Gb/s 11 Gb/s Intrahost single stream 14 Gb/s 14 Gb/s Intrahost aggregate 34 Gb/s 34 Gb/s
We do not measure the performance of dom0 to guest traffic but my ad-hoc measurements suggest this may be 5-10% slower. I don't think this is a very important use case though.
So...
Quoted 6 lines
Quoted 6 lines
/unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
...I think the answer to this is no.
Quoted 6 lines
Quoted 4 lines
--- drivers/net/xen-netback/common.h | 1 - drivers/net/xen-netback/netback.c | 106 ++----------------------------------- 2 files changed, 3 insertions(+), 104 deletions(-)Love the diffstat!
Yes, it's always nice when you delete code and it goes faster... :)
David
Quoted 5 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
Good number.
Quoted 2 lines
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM)
Do you have figures before and after this change?
Quoted 7 lines
/unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
It the new path improves off-host RX on all Xen versions and doesn't degrade intrahost VM to VM RX that much, I think we should use it unconditionally. Is intrahost VM to VM RX important to XenServer?
I don't consider intrahost VM to VM RX a very important use case, at least not as important as off-host RX. I would expect in a could environment users would not count on their VMs reside on the same host. Plus, some could provider might deliberately route traffic off-host for various reasons even if VMs are on the same host. (Verizon for one, mentioned they do that during last year's Xen Summit IIRC).
Others might disagree. Let's wait for other people to chime in.
Quoted 7 lines
[1] http://lists.xen.org/archives/html/xen-devel/2015-01/msg01118.html
Signed-off-by David Vrabel <[email protected]>--- drivers/net/xen-netback/common.h | 1 - drivers/net/xen-netback/netback.c | 106 ++----------------------------------- 2 files changed, 3 insertions(+), 104 deletions(-)
Love the diffstat!
Wei.
Quoted 11 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM) /unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Quoted 6 lines
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
[1] http://lists.xen.org/archives/html/xen-devel/2015-01/msg01118.html
Signed-off-by David Vrabel <[email protected]>
Looks good to me, thanks. Based on that plus the conversation in the other subthread:
Quoted 15 lines · Ian Campbell
Quoted 14 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM) /unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
Quoted 8 lines
Quoted 3 lines
[1] http://lists.xen.org/archives/html/xen-devel/2015-01/msg01118.html
Signed-off-by David Vrabel <[email protected]>Looks good to me, thanks. Based on that plus the conversation in the other subthread:
Acked-by Ian Campbell <[email protected]>
Thanks. I'll resend with a better commit message.
David
Quoted 15 lines · Ian Campbell
Quoted 14 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM) /unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
Quoted 8 lines
Quoted 3 lines
[1] http://lists.xen.org/archives/html/xen-devel/2015-01/msg01118.html
Signed-off-by David Vrabel <[email protected]>Looks good to me, thanks. Based on that plus the conversation in the other subthread:
Acked-by Ian Campbell <[email protected]>
Thanks. I'll resend with a better commit message.
David
Quoted 11 lines · David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test).
However, this does increase the number of grant ops per packet which decreases performance with some workloads (intrahost VM to VM) /unless/ grant copy has been optimized for adjacent ops with the same source or destination (see "grant-table: defer releasing pages acquired in a grant copy"[1]).
Quoted 6 lines
Do we need to retain the existing path and make the always coalesce path conditional on a suitable version of Xen?
[1] http://lists.xen.org/archives/html/xen-devel/2015-01/msg01118.html
Signed-off-by David Vrabel <[email protected]>
Looks good to me, thanks. Based on that plus the conversation in the other subthread: