< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] throughput restriction in UdpTransport and MacOS logging



On 2006.06.03, at 15:00 , Bruce Lowekamp wrote:

In UdpTransport::process() the code seems to be restricted to handling
one incoming message and one outgoing message per call:
  if (mTxFifo.messageAvailable() && fdset.readyToWrite(mFd))
...
  if ( fdset.readyToRead(mFd) )

any reason those shouldn't be while (foo) to process messages a bit
faster?  I made the change in my version and it seems to work fine,
and solves a problem we were having with excessive retransmits.



My concern here is that you could cause starvation; denying the other threads (or sections) of the stack their slice of time. If you do process more than a single message, it MUST be bounded so it will exit after a finite amount of time, even in the presence of excessive UDP load.


The other question is in rutil/Log:tags the part that outputs the tags
for MacOs calls time() directly rather than timestamp:
#if defined( __APPLE__ )
  strm << mDescriptions[level+1] << Log::delim
       << time(0) << Log::delim
       << mAppName << Log::delim
       << subsystem << Log::delim
       << pfile << ":" << line;
#else

I changed it to just call timestamp() so it produces the same logging
info as the other platforms (useful when trying to track down timing
issues on retransmit problems...)

That's a good fix, thanks!

Alan