[Mono-list] threads and Async Socket methods
P Oscar Boykin
Fri, 7 May 2004 11:59:46 -0700
Content-Type: text/plain; charset=us-ascii
Thanks for pointing out this article.
This appears to be my problem:
When I have enough sockets waiting on a BeginReceive, I cannot do
any other Async method. I guess the worker queue gets filled with the
BeginReceive calls, and then BeginSend calls cannot get through.
For our work, the limit of 25 ThreadPool threads waiting on tcp sockets
is just not going to work.
It seems like there are two options here:
1) Avoid Async socket operations for systems that need to scale to large
numbers. Prefer Select I guess.
2) Reimplement the Async sockets to make sure they always use native
operating system asynchronous facilities.
I think you already said that in the 2.6 kernel, the Async Sockets use
the posix aio interface.
It seems like in linux 2.4 there is a means to get the kernel to send
signals a socket is ready for IO:
What would be the issues with doing a 2.4 implementation using the
On Fri, May 07, 2004 at 08:02:48PM +0200, Gonzalo Paniagua Javier wrote:
> The default socket implementation for asynchronous methods uses the
> threadpool, which, by default, has 25 worker threads. If you use all of
> them bad things may happen. I wrote something about that:
> Mono-list maillist - Monofirstname.lastname@example.org
email@example.com http://pobox.com/~boykin jabber: firstname.lastname@example.org
fingerprint=3DD250 4AD9 4544 B7D2 A17C 911D D608 D387 6718 D75F
Understand Free Software: http://www.gnu.org/philosophy/philosophy.html
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
-----END PGP SIGNATURE-----