Raw socket bypassing tcp/ip headers?

1.6MB shouldn't take 7 seconds using "normal" TCP/IP - certainly not on the same machine! That suggests you've got inefficient code somewhere. I'd address that before trying to do anything "special" in terms of the networking.

1.6MB shouldn't take 7 seconds using "normal" TCP/IP - certainly not on the same machine! That suggests you've got inefficient code somewhere. I'd address that before trying to do anything "special" in terms of the networking.

EDIT: I've just written a short C# program on a netbook, and that transfers 2MB (generating random data as it goes) in 279ms. That's with no optimization. Unless you're running on a machine from the 1980s, you should definitely be getting better performance than that...

You know, I read it as 1.6 GB rather than MB at first. You are quite right--7 seconds for 1.6 MB implies something is broken, and it's not TCP. – John Zwinck Aug 27 at 17:02 Yeah ... sounds like a case of "select isn't broken" – Brian Roach Aug 27 at 17:10 Thanks.

I discovered the issue. – eat_a_lemon Aug 27 at 20:17 @eat_a_lemon: It's typically good form at this point to explain (either in a self-answer or in the question) to help others who might have the same problem. – Jon Skeet Aug 27 at 20:19.

To get that poor of performance, you are doing something very inefficient. Perhaps the i/o operations are single byte? Changing to raw sockets is a bad idea.To get reliable communication, you'd then have to add some sort of data checking, sequencing, etc. , etc. : everything that TCP does for reliability.

If the purpose is to transfer data from one process to another on the same machine, use shared memory and a mutex to synchronize access. Of course this is not a good solution if the programs will eventually have to run on separate machines.

No, using raw IP sockets is definitely not a good idea. Using a unix-domain socket might be marginally more efficient, but I doubt it's going to solve your problem. You clearly have another problem.

Perhaps it is your application-level protocol which is inefficient?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions