Pc to pc communication with straight cable cat6

Status
Not open for further replies.

mem22

Distinguished
Jan 3, 2012
15
0
18,510
Hi...
I have connected two PCs with straight cable cat6. Both systems showing 1gbps speed. but when i am transfering file from one system to other system it is showing 12.5MBps only (i.e 100Mbps only). Since it is connected with 1 gbps why it is not giving that much of speed? Please reply as early as possible.. its very important task
for me.. I have already set all network properties which improve bandwidth but no use of them.. please help me..
 
Relying upon auto crossover between two network cards is tricky. Yes, it works, but it is not guaranteed to negotiate the fastest speed possible.

I seem to recall an exchange last year where a person ran into a similar situation and could not any faster than a 100Mbps connection between two PCs with Gbit cards. I do not remember if using a CAT6 crossover cable helped or not. However, I ran into a situation where two 100Mbps cards would only connect at 10Mbps until I used a crossover cable.
 

mem22

Distinguished
Jan 3, 2012
15
0
18,510




What shall i do to achieve maximum speed with 1gbps??
 

mem22

Distinguished
Jan 3, 2012
15
0
18,510


Actually i don't require file transfer. i need to transmit packets of size 1KB from my application to another application in other PC contineously which are connected directly. when i tested with my application i get only 80Mbps speed with 1gbps connection. So i tested with file transferring its giving around 100Mbps.
My application is written in delphi. what i have to consider to get maximum throughput?
 

mem22

Distinguished
Jan 3, 2012
15
0
18,510


When i conneced with cat6 crossover cable it showing 100Mbps speed only..thats why i go with straight cable cat6 which showing 1gbps speed.
 
Are 1K packets necessary? Those are kind of small. You may be better off with a larger packet size? Also, depending on which socket library you are using can make a difference. Are you using the standard indy controls that come with delphi? Also, what version of delphi are you using?
 

mem22

Distinguished
Jan 3, 2012
15
0
18,510


Yeah i am using Idudpclient and Idudpserver components for communication.. Are they limitation for throughput?
 
You didn't list your version of delphi or indy component. I think delphi 7 came with indy version 9 and delphi 2009 and higher have indy version 10. Indy version 9 had some problems that can be fixed with updates. You can download them from embarcadero's web site if you have an account. These were fixed in indy version 10. Sorry I can't be more specific. It's been a while since I've used the indy components.
 

Are you using UDP, or TCP? Blocking sockets or non-blocking sockets?
Are you sending in a tight loop, or waiting for acknowledgements?
Do BOTH network cards have large Ethernet frames enabled?

I have done a LOT of socket programing over the years, and I mean no disrespect, but new socket programmers make the same mistake over and over when creating synthetic test programs.
 

mem22

Distinguished
Jan 3, 2012
15
0
18,510


I am using UDP protocol and non blocking socket.
I tested both senarios loop and waiting for acknowledgements. when i tested with acknowledgement senario its giving only 15Mbps speed, whereas without acknowledgement its giving around 65Mbps for 1gbps connection. Can u please explain how to manage the udp connection to get maximum throughput in delphi??

Thank you..
 

mem22

Distinguished
Jan 3, 2012
15
0
18,510


I am using delphi 2010 and indy component of vertion 10.5.5. But the throughput is very less
 
You say you are writing a file. I wonder if the disk i/o is slowing the transfer down. Is the file you are transferring small enough to capture in a TMemoryStream, then dump the memory stream to file once the transfer is complete? Other than that, the indy 10 components should be fine. Still, I would think you would get better than 15mbps. Also, if you have this code running in a thread, try bumping the thread's priority.
 
First, you should not be using UDP to transfer a file. UDP is not guaranteed, and unless you are acknowledging each datagram (which will slow you down), you risk file corruption. I believe that just changing your socket to TCP you will get you better speed.

Also, you should be reading and sending a 4K buffer since that will map more efficiently with hard drive sectors.
 

mem22

Distinguished
Jan 3, 2012
15
0
18,510
Actually file transfer is not my requirement. My requirement is sending UDP packets from one application to other application which is running in other PC (Both are connected directly with cable). here each packet size is 1024 Bytes. I have to send UDP packets only not other protocals. For that i am using Idudpclient and Idudpserver components. Is my chioce is correct or not? How can i achieve maximum throughput in this senario???

Thank you.
 

If those are your requirements, then you are being limited by them.

Do this: try using 2048, 4096, and finally 8192 size messages instead of 1024. What are your results now?
 
You are using the correct components, but without seeing code and knowing which properties you have set on those components it's hard to tell what is going on. As PhilFrisbie suggested, you may get better throughput with larger packet sizes.

Also, if the ethernet ports on both computers aren't gigabit ports or the ports don't handle MDI-X, then you need a crossover cable between computers, not a straight thru cable.
 

mem22

Distinguished
Jan 3, 2012
15
0
18,510
i think instead of using a component for communication, handling socket programming may improve the application performance..since calling component functions taking time for data sending or receiving. Thats why i started socket programming using winsock API im my application.. Is it correct approach or not? Please posr reply.. by that i can proceed further..
 

mem22

Distinguished
Jan 3, 2012
15
0
18,510
I have tested with 1000 packet sending using winsock API functions, here each packet size is 1024bytes. And also i have included multi thread concept in my application for data preparation and data sending (these two tasks are implemented in suparate threads which are using a same buffer, for that i used critical section concept). The performance throughput is 25Mbps (on average of 10 Tests). Is my approach is right for improving application performance as well as network performance??

Thank You..
 
Status
Not open for further replies.