Re: Combine more operation within one system call: to do it, or not to do it?
From: Igor Sysoev (is_at_rambler-co.ru)
Date: 09/27/05
- Previous message: Francisco Reyes: "Re: 3Ware 7500-4 Slow"
- In reply to: Xin LI: "Combine more operation within one system call: to do it, or not to do it?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 27 Sep 2005 16:31:22 +0400 (MSD) To: Xin LI <delphij@frontfree.net>
On Mon, 19 Sep 2005, Xin LI wrote:
> It seems that Microsoft has recently revised several of their APIs. One
> example is their ConnectEx(), as found in documentation [1]. The
> implementation is not so complex that it just combines more operation
> within one system call, however, this can reduce some unnecessary
> context switches as it's now possible to do more things within one
> system call. (For instance, when you connect to a server, you usually
> want to send some data as request).
>
> Shall we do something similar? Or do we already done something similar?
>
> [1]
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/connectex_2.asp
Actually, ConnectEx() was implemented to allow to post an asynchronous
connect operations to the i/o completion ports. There is no API to
implement high perfomance proxy in Windows NT and 2000. You have to
use non-blocking connect() and then pass the socket to special helper
threads that wait in WSAWaitForMultipleEvents() when the sockets would
be connected. Each thread could handle up to 63 sockets only.
Igor Sysoev
http://sysoev.ru/en/
_______________________________________________
freebsd-performance@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"
- Previous message: Francisco Reyes: "Re: 3Ware 7500-4 Slow"
- In reply to: Xin LI: "Combine more operation within one system call: to do it, or not to do it?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]