3

I'm developing a system for exchanging data between client and server application using sockets via TCP.

The server was written long ago in C++ (by a third part), the client instead is the application that I'm still developing in C#. The bases have already been completed. Both applications are communicating properly. The problem is that data is exchanged (in my opinion) too slowly.

I emphasize in my opinion because I have no idea what you can actually expect using sockets via TCP. Currently, and by eye, after several tests, the communication speed is an average of 200/250 KB per second, both in reception and in sending.

There are applications that allow you to evaluate the speed of data exchange between two endpoints on a specific port? What speed should I expect?

More specifically, the client and the server are developed for the file sharing. Currently, the client can receive and send one file at a time. The protocol would do otherwise (receive/send multiple files at once), but for security reasons I preferred otherwise (if you're receiving more than one file and you lose the connection you'll lose all files you're receiving).

Change this feature could significantly affect the speed of data exchange? In what way?

2
  • How were your tests run? Local? Intranet? Remote? What is your link speed (have you tested it?) ? Have in mind upload speed is usually slower than download speed. What else is running in your server? Can you test the application with another client? Just saying it seems slower is not of much help... Commented Nov 28, 2012 at 15:09
  • @ArthurNunes 1) Remote. 2) As I wrote I don't know how to test it, I can see that if my client receive a file of 1MB takes about 4/5 seconds. 3) Nothing, the server is connected only to my client, and does nothing else. 4) I can try to recover the old client written in C++ (but if I can't?). Commented Nov 28, 2012 at 15:14

2 Answers 2

1

First, you have to know the bandwith of the link your host provides you to know what to expect. If you are hosting it yourself, your upload speed may be way slower than the download speed link. You can log into your server and run a speed test.

I had a situation similar to yours (developed a server and a client to send binary data to it) and by that time (2-3 years ago) I used a version of this tool to measure the speed of the data exchange. You would install it on your server, set up the monitor (ports you want to watch, etc), configure the charts and let it run for some time. It worked really well. You can look for other similar tools searching for "Bandwidth Traffic Monitor".

If you allow your application to exchange multiple files at the same time, have in mind that your link speed will be divided among the connections and, depending on how many clients are using your application, the multiple connections and file writes your server will be doing may be limited by its processing capacity, in addition to the bandwith.

Sign up to request clarification or add additional context in comments.

Comments

0

What speed should I expect?

The full speed the slowest part of the network between the two nodes can transfer, minus the bandwidth of existing traffic over that slowest part. On a 100 Mbit LAN, I would expect a one-way transfer speed of 10 MB/s.

Change this feature could significantly affect the speed of data exchange? In what way?

That totally depends on the protocol being used and the client and server implementation. You'll have to benchmark where the hard work is being done, where your bottleneck is.

1 Comment

@Nick Do you server and client communicate over the same connection? 1 Mbps is about 100 KBps, which is less than half of the speed you reported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.