diff options
author | Ben Pfaff <blp@nicira.com> | 2012-03-15 21:15:38 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-03-15 21:15:38 -0700 |
commit | d2b9f5b017df990087cd00fe5f195b829c243b73 (patch) | |
tree | 54a1c7889494be4a55012abf5357629067c88e20 /include/sparse | |
parent | 33500edd53fd76a304766812fd0829e7f3ab222f (diff) | |
download | openvswitch-d2b9f5b017df990087cd00fe5f195b829c243b73.tar.gz |
netlink-socket: Increase Netlink socket receive buffer size.
Open vSwitch userspace can set up flows at a high rate, but it is somewhat
"bursty" in opportunities to set up flows, by which I mean that OVS sets up
a batch of flows, then goes off and does some other work for a while, then
sets up another batch of flows, and so on. The result is that, if a large
number of packets that need flow setups come in all at once, then some of
them can overflow the relatively small kernel-to-user buffers.
This commit increases the kernel-to-user buffers from the default of
approximately 120 kB each to 1 MB each. In one somewhat synthetic test
case that I ran based on an "hping3" that generated a load of about 20,000
new flows per second (including both requests and replies), this reduced
the packets dropped at the kernel-to-user interface from about 30% to none.
I expect that it will similarly improve packet loss in workloads where
flow arrival is not easily predictable.
(This has little effect on workloads generated by "ovs-benchmark rate"
because that benchmark is effectively "self-clocking", that is, a new flow
is triggered only by a reply to a request made earlier, which means that
the number of buffered packets at any given has a known, constant upper
limit.)
Bug #10210.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'include/sparse')
-rw-r--r-- | include/sparse/sys/socket.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/sparse/sys/socket.h b/include/sparse/sys/socket.h index 89e3c2dc2..1ed195b25 100644 --- a/include/sparse/sys/socket.h +++ b/include/sparse/sys/socket.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Nicira Networks. + * Copyright (c) 2011, 2012 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,7 +74,8 @@ enum { SO_SNDBUF, SO_SNDLOWAT, SO_SNDTIMEO, - SO_TYPE + SO_TYPE, + SO_RCVBUFFORCE }; enum { |