[ANNOUNCEMENT] Updated: setup.exe (Release 2.871)

Warren Young wyml@etr-usa.com
Mon Jun 1 20:05:00 GMT 2015


On May 31, 2015, at 4:24 AM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> 
> On May 29 17:49, Steven Penny wrote:
>> On Fri, May 29, 2015 at 8:51 AM, Corinna Vinschen wrote:
>>> - Improved performance in terms of SHA512 checksum computation.
>> 
>> Thanks for this, but how was it done?
> 
> It was embarrassingly simple:

That reminds me of a case I ran into a few months ago.

I have some UDP stream reception code that works perfectly on Linux.  Someone wanted it on Windows, too, so I ported it in an afternoon, a relatively easy task since Winsock is mostly a superset of BSD sockets, and there wasn’t much to the app besides Standard C++ and sockets code.

It worked fine on my machine, so I shipped it off, confident that it would work just as well as the Linux version.

Then I start getting field reports about dropped packets whenever the machine wasn’t perfectly idle while running the app.

This is not a high data rate application.  With the 8 kiB buffers I was using — a perfectly sensible size for UDP — it would take about 3 ms to overflow a buffer.  That’s approximately forever in CPU time, so I felt it was more than adequate, even considering multitasking overheads.

In the end, I had to increase the UDP stack buffers for the Windows port to 64 kiB to get it to work reliably on Windows, which effectively increased the buffer time to ~23 ms.

That means the time-slice delay was somewhere between 3 and 22 ms!  That’s on the scale of HDD head seek times, one of the slowest things a computer does!
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list