|
| 1 | +# NetworkExperiments |
| 2 | + |
| 3 | +A library intended to be a strong backbone for future developments. Aim is to achieve highest performance with reasonable memory requirements. |
| 4 | +Target Framework .Net Standard 2.0+. |
| 5 | + |
| 6 | +So far we have: |
| 7 | +- Regular Tcp Sever Client send and recieves pure bytes, used as base can be used standalone. |
| 8 | +- Byte Message Server Client for sending and receiving atomic messages with 4 byte header. |
| 9 | +- Simple Udp Server-Client. There is no buffering here, every message is pure System call. |
| 10 | + |
| 11 | +This project will be extended to implement Protobuff, HTTP, SSL. |
| 12 | + |
| 13 | +# Documentation |
| 14 | +TODO |
| 15 | + |
| 16 | +# Benchmarks |
| 17 | +## TCP ByteMessage Server |
| 18 | +TCP Byte Message Server- Client are sending and receiving byte messages identified by 4 byte header. |
| 19 | +Benchmark is done by parallely requesting to the server by N clients with M Messages, and getting a response for each message. |
| 20 | +The final message is a special one to determine the timestamp of last response recieved by client. |
| 21 | +Byte header is not included on data transfer rate. |
| 22 | + |
| 23 | +I will publish my results with more tests and represent them with graphs in the future. so far this it |
| 24 | + |
| 25 | +### Test 1: |
| 26 | +#Clients: 100 | #Messages: 100M | Msg size:32 || Config: Max Mem Per Client: 128000000 | S-R Buffer Sizes 128000 |
| 27 | + |
| 28 | +- Max Mem Peak : 1.6 gb. |
| 29 | +- Total Messages on server: 100000100 |
| 30 | +- Total Messages on clients: 100000100 |
| 31 | +- Total Time: 8023 ms |
| 32 | +- Request-Response Per second 12,464,178. |
| 33 | +- Data transmission rate Inbound 398.8537 Megabytes/s |
| 34 | +- Data transmission rate Outbound 398.8537 Megabytes/s |
| 35 | + |
| 36 | +### Test 2: |
| 37 | +#Clients: 10,000 | #Messages: 100M | Msg size:32 || Config: Max Mem Per Client: 12800000 | S-R Buffer Sizes 19800 |
| 38 | + |
| 39 | +- Max Mem Peak : 6.9 gb. |
| 40 | +- Total Messages on server: 100010000 |
| 41 | +- Total Messages on clients: 100010000 |
| 42 | +- Total Time 10803 ms |
| 43 | +- Request-Response Per second 9,257,613 |
| 44 | +- Data transmission rate Inbound 296.24362 Megabytes/s. |
| 45 | +- Data transmission rate Outbound 296.24362 Megabytes/s. |
| 46 | + |
| 47 | +### Test 3: |
| 48 | +#Clients: 100 | #Messages: 100M | Msg size:1000 || Config: Max Mem Per Client: 128000000 | S-R Buffer Sizes 128000 |
| 49 | + |
| 50 | +- Max Mem Peak : 3.2 gb. |
| 51 | +- Total Messages on server: 100000100 |
| 52 | +- Total Messages on clients: 100000100 |
| 53 | +- Total Time 92806 ms |
| 54 | +- Request-Response Per second 1077517.6 |
| 55 | +- Data transmission rate Inbound 1077.5176 Megabytes/s |
| 56 | +- Data transmission rate Outbound 1077.5176 Megabytes/s |
| 57 | + |
| 58 | +### Test 4 |
| 59 | + #Clients: 1,000 | #Messages: 10M | Msg size:1000 || Max Mem Per Client: 128000000 | S-R Buffer Sizes 128000 |
| 60 | + |
| 61 | + - Max Mem Peak : 1.4 gb. |
| 62 | +- Total Messages on server: 10001000 |
| 63 | +- Total Messages on clients: 10001000 |
| 64 | +- Total Time 10831 ms |
| 65 | +- Request-Response Per second 923368.06 |
| 66 | +- Data transmission rate Inbound 923.36804 Megabytes/s |
| 67 | +- Data transmission rate Outbound 923.36804 Megabytes/s |
| 68 | + |
| 69 | + |
| 70 | +## Udp |
| 71 | +Udp Server Client Sends and Receives messages directly without buffering. |
| 72 | +Server Registers a client by message remote endpoint info, hence client has to send a message first to register on server. Thats how i call them "client". |
| 73 | +This benchmark is done by using 2 Threads where first one |
| 74 | +is allocated to clients and second is to server. We start the 2 threads at same tıme and both sends messages to each other parallely. There is no Echo. |
| 75 | + |
| 76 | +#Clients: 1,000 | #Messages: 500K | Msg size: 32000 || Server Socket Send Receive buffer Sizes :128000000 |
| 77 | + |
| 78 | +- Total Message Server received: 501000. |
| 79 | +- Total Message Clients received: 500000. |
| 80 | +- Total Time Clients: 21951 |
| 81 | +- Total Time Server: 34327 |
| 82 | +- Total Sucessfull Data Transfer Rate Clients: 728.89Mbytes/s |
| 83 | +- Total Sucessfull Data Transfer Rate Server: 467.03 Mbytes/s |
0 commit comments