Download the Tom's Hardware App from the App Store
The reference for current tech news
Yes No
Tom's Hardware > Forum > General Networking > LAN/WAN > [Solved] Pc to pc communication with straight cable cat6

[Solved] Pc to pc communication with straight cable cat6

Forum General Networking : LAN/WAN [Solved] Pc to pc communication with straight cable cat6

Best answer from PhilFrisbie.

Word :    Username :           
 

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..

Reply to mem22
Register or log in to remove.

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.

Reply to PhilFrisbie

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

Reply to mem22

PhilFrisbie wrote :

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.





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

Reply to mem22

If you are copying files between PC's, your hard drives are the limiting factor.

Reply to Hawkeye22

mem22 wrote :

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


You could either try a CAT6 crossover cable, or use a 1Gbps switch to connect between the computers.

Reply to PhilFrisbie

Hawkeye22 wrote :

If you are copying files between PC's, your hard drives are the limiting factor.



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?

Reply to mem22

PhilFrisbie wrote :

You could either try a CAT6 crossover cable, or use a 1Gbps switch to connect between the computers.



When i conneced with cat6 crossover cable it showing 100Mbps speed only..thats why i go with straight cable cat6 which showing 1gbps speed.

Reply to mem22

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?

Reply to Hawkeye22

Hawkeye22 wrote :

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?



Yeah i am using Idudpclient and Idudpserver components for communication.. Are they limitation for throughput?

Reply to mem22

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.

Reply to Hawkeye22

mem22 wrote :

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?


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.

Reply to PhilFrisbie

PhilFrisbie wrote :

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.



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..

Reply to mem22

Hawkeye22 wrote :

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.



I am using delphi 2010 and indy component of vertion 10.5.5. But the throughput is very less

Reply to mem22

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.

Reply to Hawkeye22

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.

Reply to PhilFrisbie

^+1

I agree. I just assumed the file was for testing purposes. If file transfer is the goal of the application then it should use TCP.

Reply to Hawkeye22

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.

Reply to mem22

mem22 wrote :

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?

Reply to PhilFrisbie

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.

Reply to Hawkeye22

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..

Reply to mem22

Most of those components are simply wrappers for API calls anyhow and simply hide some of the overhead. You can try accessing the winsock API directly, but I don't know if that will help your performance or not.

Reply to Hawkeye22

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..

Reply to mem22
Best answer

If you doubled your transfer by using a separate thread for data preparation, then your data preparation is your current bottleneck.

Reply to PhilFrisbie

A profiler would help. If AQTime comes with that version of delphi, use it.

Reply to Hawkeye22

How long is the cable? If I remember correctly there actually is a minimum length and maybe your cable is too short!

Reply to aaab

aaab wrote :

How long is the cable? If I remember correctly there actually is a minimum length and maybe your cable is too short!


My cable is 2meters of length..I think its not a cable problem..

Reply to mem22

Hawkeye22 wrote :

A profiler would help. If AQTime comes with that version of delphi, use it.



I am using delphi2010. it doesn't have AQTime.. Can u please suggest which protocol is suitable for video streaming. I am not sending steam from one application to other application. i want to send video data to hardware controllor. For that which protocol is best?? please reply..

Reply to mem22

TCP is always more reliable, but has more overhead. UDP is almost always used for streaming data, including video.

UDP provides an unreliable service and datagrams may arrive out of order, appear duplicated, or go missing without notice. UDP assumes that error checking and correction is either not necessary or performed in the application.

Reply to Hawkeye22

Hawkeye22 wrote :

TCP is always more reliable, but has more overhead. UDP is almost always used for streaming data, including video.

UDP provides an unreliable service and datagrams may arrive out of order, appear duplicated, or go missing without notice. UDP assumes that error checking and correction is either not necessary or performed in the application.


Is SCTP is better than UDP? i am not uderstanding clearly about SCTP... which one is better for the video streaming?

Thank you.

Reply to mem22

I've never worked with SCTP. Someone with more knowledge of this will need to answer this.

Reply to Hawkeye22

This topic has been closed by Mousemonkey

------------------------------ http://img545.imageshack.us/img545/3995/bl11.gif
Reply to Mousemonkey
Register or log in to remove.
Tom's Hardware > Forum > General Networking > LAN/WAN > [Solved] Pc to pc communication with straight cable cat6
Go to:

There are 459 identified and unidentified users. To see the list of identified users, Click here.

  • Ask the community now
  • Publish
Ad
Latest best answer
General IT Vocabulary Help
By TheViper, 907 days ago:

Bus Speeds - The most commonly inferred bus is the Front Side Bus. This is the...

They won a badge
Join us in greeting them