On Mon, Jan 17, 2011 at 11:35:02PM -0500, Jason Healy wrote: > I had a few hours to play with a hardware traffic generator today, I wanted to > try beating up my OpenBSD setup to see what kind of throughput I could get. > > For the curious, I was able to pulverize it with 64 byte packets and it topped > out at about 165kpps. Throughput was less than physical interface speed > (about 800Mbps). For fun, I cranked the payload size up to 1500 bytes, but I > couldn't get the box to exceed 1Gbps, even though I had several gigabit > interfaces trunked together. At first, it was a switch problem (the switch > was sending all the traffic over a single link). However, after I found out > my switches LACP hash algorithm I was able to spread the traffic out by > randomizing the port numbers. > > I then confirmed that 4Gbps of traffic was leaving the switch to the OpenBSD > box, but only 1Gbps was coming back. Therefore, I'm guessing that the > load-balancing algorithm for OpenBSD does not behave the same way as my > Juniper switching gear. Does anybody know the LACP hash that the trunk > interface in OpenBSD uses to load-balance the outgoing traffic? I didn't have > time to do more than a cursory test with different port numbers and IP > addresses, so I'm not sure what I might be doing wrong, or if its even > possible to use layer 3/4 info in OpenBSD to hash the traffic. Since I'm > using the box as a router, layer 2 hashing doesn't help me very much since the > source MAC is always the same. > > I took a peek at the source, but I'm definitely not a C hacker, so nothing > jumped out at me for computing the hash... >
165kpps is fairly low. Please add a dmesg so there is a chance to see what is causing this low rate. Modern HW with good nics should handle around 500kpps. Btw. trunk is using src & dest MAC addrs, a possible vlan tag and the IP / IPv6 src & dst addrs to build the hash. It does not use port numbers. The function used for this is trunk_hashmbuf(). -- :wq Claudio