Re: cygwin performance problem

This is a discussion on Re: cygwin performance problem within the OpenSSH Development forums, part of the Networking and Network Related category; Hi Damien, On Apr 23 23:01, Damien Miller wrote: > In this case, shouldn't cygwin be using socketpair() ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-23-2006
Corinna Vinschen
 
Posts: n/a
Default Re: cygwin performance problem

Hi Damien,

On Apr 23 23:01, Damien Miller wrote:
> In this case, shouldn't cygwin be using socketpair() for interprocess
> communication everywhere? (assuming that there is a select()-like
> function available in the Win32 API). This switch can be made by


Yes, actually there is a select function, but it's implemented in the
Windows socket layer, so it's available exclusively for sockets (and
utilized for select on sockets in Cygwin, obviously).

> deleting the following line from "*-*-cygwin*)" block:
>
> AC_DEFINE(USE_PIPES, 1, [Use PIPES instead of a socketpair()])
>
> To fully use socketpairs, you will need the following patch to scp.c,
> as it doesn't seem to care right now:


Thanks for the patch. I tried it, but using socketpairs is slower than
using pipes, so, for performance reasons, I'd rather stick with pipes,
now that we have found a nice workaround in Cygwin.

Way back when we started using USE_PIPES for Cygwin, the reason was
actually the performance. Since the select function has changed over
the time, I assume the now fixed performance problem didn't exist years
ago.

As for socketpairs, since Windows has no concept for AF_UNIX/AF_LOCAL
sockets, these sockets are implemented as AF_INET sockets under the
hood. Using AF_INET sockets locally is 30-40% slower than using pipes
on Windows.


Corinna

--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://www.mindrot.org/mailman/listi...enssh-unix-dev
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:32 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0