f



slow socket communication over the internet

Hi,
  I have a server application using IOCP, and wrote a client application
using Message Notification with WSAAsyncSelect(..) etc.  When checking it on
the internal network, transferring informtation from the server to the
client was really fast. On the server side, I post 3 WSASend(..) with 60k of
data each time. I time from the start to the end , and they are posted
nearly straight away. And on the client I simply use the Message
Notification to read the data in. As mentioned, on the internal network, the
speed was really good, but when trying it over the network the speed was
really slow (I expected  it to be slower, but not this bad). On the internal
network, it took only 6 seconds to transfer 25000 records from a database.
But trasferring it over the network it took about 6 minutes. The machine on
the internal network is a XP pro machine with only 512MB of ram, and the
machine on the network is also an XP pro but with 1GB ram, and far more
powerfull processor. We tried this on differnet machines on the internet ,
but with same results.

When trying it over the network, after teh server posted the 3 WSASends()  ,
the client first checks to see how much is ready to be read by using the
ioctlsocket(*m_Socket, FIONREAD, &dwSize); command. The server sends 60k and
a time, but the ioctlsocket() returns a couple of 8192 bytes, then the rest
are size 1440 until all the information is read. If I do the same on the
internal network the ioctlsocket() returns 8192 bytes until all is read.


Anyone any ideas how I can speed this up? I know it will be slower using it
over the internet, but from 6 seconds (internal network), to about 6 minutes
(is  a big difference)

Many thanks
Scott



0
Scott
12/16/2006 6:46:23 PM
comp.win.tools.winsock 400 articles. 0 followers. Post Follow

1 Replies
209 Views

Similar Articles

[PageSpeed] 35

Scott wrote:
> Hi,
>   I have a server application using IOCP, and wrote a client application
> using Message Notification with WSAAsyncSelect(..) etc.  When checking it on
> the internal network, transferring informtation from the server to the
> client was really fast. On the server side, I post 3 WSASend(..) with 60k of
> data each time. I time from the start to the end , and they are posted
> nearly straight away. And on the client I simply use the Message
> Notification to read the data in. As mentioned, on the internal network, the
> speed was really good, but when trying it over the network the speed was
> really slow (I expected  it to be slower, but not this bad). On the internal
> network, it took only 6 seconds to transfer 25000 records from a database.
> But trasferring it over the network it took about 6 minutes.

OK, from 6 seconds to 6 minutes is a difference of 60X, which may be 
correct if you have 100Mbps Ethernet on your LAN and T1 (1.5Mbps). DO 
the math ;)

<snip>

> When trying it over the network, after teh server posted the 3 WSASends()  ,
> the client first checks to see how much is ready to be read by using the
> ioctlsocket(*m_Socket, FIONREAD, &dwSize); command. The server sends 60k and

First ditch the ioctl call above. It is lame, leads to poor design, and 
even Microsoft say to NEVER, EVER, use it....

> a time, but the ioctlsocket() returns a couple of 8192 bytes, then the rest
> are size 1440 until all the information is read. If I do the same on the
> internal network the ioctlsocket() returns 8192 bytes until all is read.

This has nothing to do with your problem, but you do not understand 
enough about Ethernet and TCP buffers to know that. I am short on time 
right now, but if you search for 'ethernet 1440' you will understand why 
that is happening. TCP buffers are commonly sized at 8192 bytes each, 
and since TCP is a stream protocol that is the max you can read at one time.

-- 
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com
0
Phil
12/19/2006 3:22:59 AM
Reply:

Similar Artilces:

Win Win Win Win......
Win Win Win Win...... Win cash Rs.10,000. SMS BLUFF to 57333 (Only For Indian) Free Registration! - Register here Free:- http://offr.biz/HLDDT337130BVGMJPF (....Free Offer is Valid Only For First 250 members who Registered...) ------------------------------------------------------------------------------- ...

Using Internet tool kit how to communicate with 2 computers which are far apart and each computer is part of local network
Hi, &nbsp; I started using internet tool kit very recently. I have an application as briefed below, Computer 1 is connected to local network 1. Computer 2 is connected to&nbsp;Remote network 2. Network 1 and Remote network 2 are far apart and they are connected to internet. It is required to open a Telnet session between computer 1 and 2 through internet. How to achieve this? Which are the functions to be used? Where to enter Gateway&nbsp; and Subnet mask&nbsp;addresses? Can any body help me out. &nbsp; Regards &nbsp; SajK &nbsp; &nbsp; ...

Tool Kits for Service Pros
20% OFF All Tools & Tool Kits For Master Network Pro's =-=-=-=-=-=-=-=-=-=-=-=-= NEW PC/Network Maintenance Kit The ultimate tool kit for maintaining network, LAN and PC environments. The 500-020 PC and Master Network Installation Maintenance Tool Kit combines the best elements of our Network Tool Kit with the key tools from our Computer Repair Tool Kit. We then added a Cat 5 Cable Tester to create our most complete Datacom Tool Kit ever. It is the ideal tool kit for any IT department! Details: http://www.forpctechs.com/store/p292.htm For Electronic Pro's =-...

Tool Kits for Service Pros
20% OFF All Tools & Tool Kits For Master Network Pro's =-=-=-=-=-=-=-=-=-=-=-=-= NEW PC/Network Maintenance Kit The ultimate tool kit for maintaining network, LAN and PC environments. The 500-020 PC and Master Network Installation Maintenance Tool Kit combines the best elements of our Network Tool Kit with the key tools from our Computer Repair Tool Kit. We then added a Cat 5 Cable Tester to create our most complete Datacom Tool Kit ever. It is the ideal tool kit for any IT department! Details: http://www.forpctechs.com/store/p292.htm For Electronic Pro's =-...

Tool Kits for Service Pros
20% OFF All Tools & Tool Kits For Master Network Pro's =-=-=-=-=-=-=-=-=-=-=-=-= NEW PC/Network Maintenance Kit The ultimate tool kit for maintaining network, LAN and PC environments. The 500-020 PC and Master Network Installation Maintenance Tool Kit combines the best elements of our Network Tool Kit with the key tools from our Computer Repair Tool Kit. We then added a Cat 5 Cable Tester to create our most complete Datacom Tool Kit ever. It is the ideal tool kit for any IT department! Details: http://www.forpctechs.com/store/p292.htm For Electronic Pro's =-=-=-=-=-=-=-=-=-=-...

Socket communication
Hi all, I am having two programs that should communicate using sockets. Program A [has some import data on port 2121] it sends some bytes to ProgramB. The programB then process them and send back to A[on port 1234. The problem is that,when I start program A it gives an error that it cannot connect to port 2121. But then if start programB it says that it cannot connect to port 1234.. How can I solve this issue On Feb 19, 6:24 pm, ronnin.ubra...@gmail.com wrote: > Hi all, > I am having two programs that should communicate using sockets. > Program A [has some import data on port 2121...

internet slow?
Hiya, Just wondering here, has anybody experienced any slow down with their internet connection? I'm using comcast and its almost like using dial-up at times. Click wait.....wait....wait....DNS Error. Click wait....wait...page finally shows up -- Jamie If you think you can...you are right. No Jamie... Maybe it has to be with Mars being so close, weird stuff going on. "Jamie" <emailme@spamsux.com> wrote in message news:Jju2b.193497$cF.62216@rwcrnsc53... > Hiya, > > Just wondering here, has anybody experienced any slow down with their ...

Slow internet.
Hi all I am posting this message, as I have PowerBook(the last model ever made by Apple before the switch to Intel Chips) that seems to have gotten very slow when trying to surf the internet or read e-mail. Right now I am posting this message from a newer Mac Mini that is sharing the same DSL connection via Apple Airport, as used by the PowerBook and I am able to surf the internet at normal speed using this computer. Just wondering if anyone would know what would cause the other computer to become, so slow when surfing the internet or reading my e-mail. Thanks in advance for your help and ad...

Internet slowness
We have about 40 Switches in our network which span 9 buildings with T1 connection between the buildings. Our Internet connections is very very very slow. An analysis done by a consulting company suggested that we add spanning-tree root value o all our core switches. Would this improve our internet experince, or are ther other things the we can do to improve or Internet performance. Thanks. Hello, looking at the amount of buildings and switches you are mentioning, I asume you have several hundred users ? I would have a look at the load on the T1. Depending on the IOS version you are running ...

Slow internet
I am having trouble with slow internet access. I have a Shuttle XPC currently running redhat fedora, but I had the same problem with Mandrake 9.1. This box also has Windows 2000 and also on the LAN is a Dell Dimension running WinXPpro. The LAN uses a Linksys router/firewall (NAT) and then connects to the internet via cable modem. The Windows systems are both getting about 540 kbps on numion.com. Using Linux it is about 10 times slower! I have tried Mozilla, Konqueror, and Opera....all the same results. The box picks up IP via the router's DHCP and it seems to have the right DNS entries and...

Internet Slowness
We have about 40 Switches in our network which span 9 buildings with T1 connection between the buildings. Our Internet connections is very very very slow. An analysis done by a consulting company suggested that we add spanning-tree root value o all our core switches. Would this improve our internet experince, or are ther other things the we can do to improve or Internet performance. Thanks. Someone wrote: > We have about 40 Switches in our network which span 9 buildings with > T1 connection between the buildings. Our Internet connections is very > very very slow. An analys...

internet tools
assgment 2 telnet:en akhyari hj nasir ...

Winsock and the internet
Hello all. I am playing with the winsock control, and can get it sending messages around my home network, but i am now looking to expand to the internet. The problem is I need ip addresses to connect to. I have tried connecting to a friends computer but i only get the local network address as well and when i try getting my friends ip addresse from web sites they still don't seem to work.. Can anyone point me to either a tutorial or give me clues about making connections over the internet. Thanks Mag On Sun, 1 Oct 2006 16:16:50 +0800, "Magician" <.> wrote: >H...

when is winning not winning?
when apple loses. just ask out twerp apple shills. On 2014-11-01 20:57:34 +0000, awoolmeyer@gmail.com said: > when apple loses. just ask out twerp apple shills. And where is Apple losing, Michael? On Saturday, November 1, 2014 6:31:07 PM UTC-4, Alan Baker wrote: > On 2014-11-01 20:57:34 +0000, awoolmeyer@gmail.com said: > > > when apple loses. just ask out twerp apple shills. > > And where is Apple losing, Michael? interesting that you know you're a twerp troll. i like that you are the head of my fan club. it's twerps like you that ke...

Web resources about - slow socket communication over the internet - comp.win.tools.winsock

Communication - Wikipedia, the free encyclopedia
) is the activity of conveying information through the exchange of ideas, feelings, intentions, attitudes, expectations, perceptions or commands, ...

VoIP Business, VoIP Technology, VoIP Security - Fierce Enterprise Communications
Visit FierceVoIP for the latest updates in VoIP business, unified communications, VoIP technology, mobile VoIP, VoIP security and more VoIP news. ...

Mobile News Online - The UK's leading mobile communication industry news site
This month, thousands of students will be starting university for the first time. Some will need new phones. Mystery Caller is on the case to ...

NFL's LA Rams lust after GoPro Director of Communications Lara M Sasken's Twitter handle
How much is a Twitter name worth? A considerable amount, it would seem.

Communications Minister Mitch Fifield dubs TV licence fees 'super profits tax'
Communications Minister Mitch Fifield has indicated the television industry's $153 million annual fees may no may longer be appropriate.

Rona Ambrose 'in communication' with Kevin O'Leary on leadership bid
Celebrity businessman Kevin O'Leary is having conversations with interim Conservative Leader Rona Ambrose, continuing his informal moves behind ...

Arthur Sadoun Reveals His Plan for Publicis Communications
... days, 100 senior executives from Publicis Groupe's creative networks have gathered in New York to hear Arthur Sadoun, the CEO of Publicis Communications, ...

Why Modern Communication is Broken: 3 numbers tell it all
... his days building a visual collaboration platform for high-performing teams. With this post I am diving further into troubles of modern communication, ...

QNX’s in-car communications may solve the turn-and-yell to backseat kids issue
Video shot/edited by Jennifer Hahn. (video link) LAS VEGAS—Several years ago, Blackberry bought QNX , a company known for its real-time automotive ...

ISIS has its own secure messaging system this illustrates the futility of communication surveillance
Moves by governments to monitor web-based communication with a view to thwarting terrorism is utterly, utterly futile. Just like the NSA's dragnet-style ...

Resources last updated: 1/28/2016 6:40:57 AM