[Nice] Measuring NICE STUN performance
mail at christian-dickmann.de
Fri Oct 5 05:23:40 PDT 2007
I am currently trying to measure the performance of the STUN Daemon.
Initially I tried to use a modified stunbdc to generate a lot of Binding
Requests per second. However, the client CPU consumption was much higher
than server CPU consumption, so I would need a lot of clients to get the
STUN Server to a significant amount of CPU load.
Thus, I decided to write a very very simple STUN client with a Binding
Request hardcoded (and initially no attributes at all). I then just
modify the transaction ID in place (and not randomly, more like a
sequence number) and send the message as often as I need. With a forked
process I recv the responses but do nothing else than counting them to
make sure all requests have been answered. And in fact, this client has
very very little CPU consumption so it seems to be perfect.
However, I got a very strange problem. The CPU consumption of the STUN
server is not at all stable, even though I confirmed that requests
arrive at a fairly stable rate (by using tcpdump or even by counting
received packets in the STUN server dgram_process() routine). The CPU
consumption of the STUN server is not just a little bit unstable, but
drops to 0% for seconds, even though I am sending 20,000 Binding
Requests per second. Then, for a very short period of time, the CPU load
jumps to 50 or 80% or so just to drop back to 0%.
Do you have any idea why this is happening? Remember: with stunbdc the
CPU load on the STUN Server is stable (even though I couldn't get higher
than 14% because then my client was at 100%).
More information about the Nice