C# 고성능 소켓 서버 DignusSocketServer 성능 테스트
DignusSocketServer
https://github.com/EomTaeWook/DignusSocketServer
GitHub - EomTaeWook/DignusSocketServer: High-performance socket server library
High-performance socket server library. Contribute to EomTaeWook/DignusSocketServer development by creating an account on GitHub.
github.com
테스트 환경
- CPU: Intel Core i5-12400F (12세대, 2.50GHz)
- RAM: 32GB (속도 2400MHz)
- 테스트 방식: Round-Trip 기반 Echo 방식 (보낸 메시지를 바로 수신)
- Message Size: 32 bytes
- Benchmark 시간: 10초
GitHub - chronoxor/CppServer: Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL,
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution - chronoxor/CppServer
github.com
테스트 결과
- Working clients: 1
- Working messages: 1000
- Message size: 32
- Seconds to benchmarking: 10
- Errors: 0
- Total Time: 10.003 seconds
- Total Client: 1
- Total Data: 1.41 GiB
- Total Message: 47,256,766
- Data Throughput: 144.18 MiB/s
- Message Throughput: 4,724,351 msg/s
단일 클라이언트 기준으로도 초당 약 472만 건의 메시지를 처리할 수 있는 성능을 기록.
즉, C# 환경에서도 네트워크 구조를 잘 설계하면 C++ 못지않은 성능 확보가 가능하다는 것을 보여준다.
C# 주요 소켓 서버 라이브러리 성능 비교
- 클라이언트가 서버에 접속합니다.
- 접속 이후, 각 클라이언트는 30초 동안 지속적으로 Echo 요청을 보냅니다.
- 서버는 Echo 요청을 수신 후, 간단한 비즈니스 로직(Json 역직렬화/직렬화)을 처리한 뒤 응답합니다.
- 30초가 지나면 클라이언트는 연결을 종료하거나 패킷 전송을 멈춥니다.
- 측정 항목: 총 수신 패킷 수, 최대/최소 왕복 지연시간.
항목 | DignusSocketServer | DotNetty | SuperSocket 2.0 |
Total Clients | 5000 | 5000 | 5000 |
Total Received | 5,984,326 | 4,946,353 | 3,170,083 |
Max RTT (ms) | 73.02 | 140.65 | 128.70 |
Min RTT (ms) | 0.03 | 0.04 | 0.05 |
https://github.com/EomTaeWook/ServerPerformanceBenchmark