BenchmarkNet is a console application for testing the reliable UDP networking solutions.
Features:
- Asynchronous simulation of a large number of clients
- Stable under high-loads
- Simple and flexible simulation setup
- Detailed session information
- Multi-process instances
Supported networking libraries:
You can find the latest benchmark results on the wiki page.
How it works?
Each simulated client is one asynchronous task for establishing a connection with the server and processing network events. Each task has one subtask which also works asynchronously to send network messages at a specified interval (15 messages per second by default). So, 1000 simulated clients is 1000 tasks with 1000 subtasks which work independently of each other. This sounds scary, but CPU usage is <1% for tasks itself and every operation is completely thread-safe. The clients send network messages to the server (500 reliable and 1000 unreliable by default). The server also sends messages to the clients in response (48 bytes per message by default). The application will monitor how the data is processed by the server and clients, and report their status in real-time.
Usage
Before launching the application set the desired parameters in the config file to override the default values. Run the application, select the networking library and set any number of simulated clients. Do not perform any actions while the benchmark is running and wait until the process is complete.
When you are going to perform a test with less than 256 simulated clients, it's highly recommended to switch GC mode from Server GC to Workstation GC. You can find more information in this article about how different GC modes are working.
You can use any packet sniffer to monitor how the data is transmitted, but it may affect the results.
If you want to simulate a bad network condition, use Clumsy as an ideal companion.
Discussion
Feel free to join the discussion in the thread on Unity forums.
If you have any questions, contact me via email.
Please, check this section before opening a new issue.
Donations
This project has already had an impact and helped developers in an improvement of the networking libraries. If you like this project, you can support me on PayPal or Bountysource.
Bitcoin 173ZRNuT4k7ss7rAVmNCZr6hLfFY4DZubU
Litecoin LhdxsS7AUhUrKMmMyTX1yL4EQp6tzSonDT
Any support is much appreciated.