• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FW: Open Transport file transfers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FW: Open Transport file transfers


  • Subject: Re: FW: Open Transport file transfers
  • From: Quinn <email@hidden>
  • Date: Mon, 24 Feb 2003 09:47:56 +0000

At 16:50 -0500 20/2/03, michael linden wrote:
Everything I read says that OTIdle is not required??? Even for Async
operation.

OTIdle isn't required unless your thread scheduling is wonky. The problem you're experiencing is almost certainly related to problems with thread scheduling. While PP networking using an async endpoint, it still runs entirely at system task time. This prevents you from getting excellent networking performance, but it doesn't explain the problem you're seeing. What I'd recommend is as follows.

1. Take a packet trace of the 9 code and the X code. Chances are that you'll see long stretches of dead time on the network.

<http://developer.apple.com/qa/qa2001/qa1176.html>

2. Add log points, with time stamps, to your core file transfer code and your thread scheduling code. Specifically, look at the amount of time between one call to OTSnd and the next. My guess is that you'll see a correlation between the network dead time and you not providing data to OT.

Unfortunately, the various PP layers (threads and networking) make it very hard for me to offer specific advice on how to fix this problem. There are, however, some standard rules that you should apply.

o Present data to the networking stack in large chunks.

o Try to minimise the amount of time between when the send call returns and when you next call it

The networking stack on both platforms maintains a send buffer into which it data is copied (around 32 KB). You want to make sure that you send enough data to fill that buffer and you want to make sure that you send a new chunk of data before that buffer empties.

btw Is your code running at both ends of this transfer, or are you transferring to a server that's running some other code (a standard FTP server perhaps). The above assumes that you're just writing the send code. If you're also writing the receive code there's another set of things to investigate.

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >FW: Open Transport file transfers (From: michael linden <email@hidden>)

  • Prev by Date: Re: NetworkingOT.pdf vs 2.8
  • Next by Date: Sending to multiple End Points
  • Previous by thread: FW: Open Transport file transfers
  • Next by thread: URLAccessManager and SSL
  • Index(es):
    • Date
    • Thread