[ovs-discuss] Hash function

Ben Pfaff blp at ovn.org
Sat Mar 31 19:27:35 UTC 2018

On Tue, Mar 27, 2018 at 12:02:00AM +0200, Slavica Tomovic wrote:
> Hi,
> I have a problem when trying to do equal load balancing with OVS switches.
> For example, in one scenario I had three buckets with equal weights (10). I
> generated 9 flows that differ in terms of destination IP address (towards
> the same egress OVS node). However, the result was as follows:
> 1. bucket - 5 flows
> 2. bucket - 2 flows
> 3. bucket - 2 flows
> These traffic flows are the only flows that traverse the table (I adjusted
> flow table rule to achieve that), so unequal traffic splitting is not due
> to ARP traffic or something similar.
> Is this due to hash function? Can I somehow overcome this issue and achieve
> splitting according to the weights?
> This is really important for me because I am trying to test load balancing
> algorithm that optimizes network performance by periodically adjusting the
> weights to a current network state.

Hashing will never give you perfect splitting, but using a small number
of flows will tend to exacerbate the unevenness.  What if you use 100
flows instead of 9?

More information about the discuss mailing list