Skip to content

Benchmark for testing the reliable UDP networking solutions

License

Notifications You must be signed in to change notification settings

Danewalker/BenchmarkNet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

alt logo

GitHub release PayPal Bountysource Coinbase

The application is no longer in active public development, all futher work moved to private, this repository turned into read-only mode for historical reference. It was a great experiment, thanks to all supporters and contributors.

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?

Implementation

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 are 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.

Parallelism degree

TPL automatically performs load-balancing of the coarse-grained tasks with awareness of oversubscription for clients. The server process is running with higher priority to let the operating system make optimal decisions.

Quality control

The application helps to determine many various problems:

  • Memory leaks
  • Deadlocks
  • Buffers exhaustion
  • Connections disruption
  • GC pressure
  • Bugs

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.

Discussion

You can find the discussion in the thread on Unity forums.

If you have any questions, contact me via email.

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, Bountysource or Coinbase.

Any support is much appreciated.

Supporters

These wonderful people make open-source better:

supporters

About

Benchmark for testing the reliable UDP networking solutions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%