This project is read-only.

Performance testing

Mar 6, 2013 at 11:37 PM
Hi Kerry

I am running some performance test on my code that uses WebSocket4Net. Basically it just sends small messages (about 30 bytes) to a websocket server that is running on localhost and throwing the messages away. My code can only send up to around 500 msg per second. I wrote the same code with C++ (using WebSocketpp) and it is able to send 6000 per second.

I looked around for performance stats on WebSocket4Net and did not find any. What should I expect performance numbers compared to C++?

Thank you!
Mar 7, 2013 at 12:44 AM
Did you try set the property "NoDelay" to be true?

If you haven't download the latest source code of websocket4net, please do it now.
Mar 7, 2013 at 4:04 AM
Hello Kerry

Thank you for the quick response.

I downloaded the latest code. Now my code can send 800 messages per second. I have tried setting NoDelay to true and false, and got same result. What kind of number should I see for the simple test like mine?

Also, I took a look at the Test projects and ran into 2 issues:
  1. In TestServer, I am getting InvalidOperationException from bootstrap.initialize()
  2. can't build Test project because SessionEventHandler is missing from WebSocketClientTest.cs
I am using VS 2012.

Thanks again for your help
Mar 7, 2013 at 4:11 AM
What's your hardware?

I remember I can hit to 10k echo per second.
Mar 7, 2013 at 4:13 AM
I'll do a performance for WebSocket4Net and SuperWebSocket on these days and then give you the result.
Mar 7, 2013 at 7:27 PM
Hello Kerry

As always, thank you for your responses.

I figured out the cause for low message rate: Parallels. I am doing Windows dev work on a Mac laptop running Parallels. Once I ran the test in a real Windows environment, I am getting 10k message rate.

What about the 2 issues I am having with Test projects ?

Thank you