Localhost stream slowness
Localhost stream slowness
- Subject: Localhost stream slowness
- From: "Andrew Mellinger" <email@hidden>
- Date: Thu, 1 Sep 2005 15:56:28 -0400
- Thread-topic: Localhost stream slowness
Title: Localhost stream slowness
Greetings!
I work for a company that has a client-server architecture where the server was on a solaris box and the client on a mac. Recently we made the move to getting the server to build and run on a mac. There is a weird communications issue. We use standard unix socket communications and TCP/IP between the two apps. The client can move files very quickly to the server but the server takes a *long* time to get files to the client.
The process works like this (note: this is old code that was originally designed to work on flaky NeXTStep boxes. It can definitely be better, but I don't have time to rewrite right now.)
1) Client sends request for a packet of 16K of data.
2) Server sends 16K using send
3) Client checks for data using select.
4) Client uses ioctlsocket is used to see how much
5) Client recv's that much data
6) Client acks.
7) Rinse, repeat.
I've benchmarked the code and found that the call in step 3 (select with a 100 ms timeout) on the client's side often time out. And when reissued usually show < 200 bytes but occaisonally show 4K bytes. The calls to 'send' on server side complete immediately.
If we use two different machines everything works fine, so it isn't an obvious porting issue of the server code. It really has to do with the two apps being on the same machine. And they are definitely different apps (even running as different users), it isn't a thread or resource arbitration issue.
The socket configurations seem pretty normal, I've checked all the appropriate flags.
Any ideas what the problem might be? Or where else I should start looking?
-Andrew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
- Next by Date:
Test
- Next by thread:
Test
- Index(es):