Hello, I have question regarding Solaris Asynchronous IO and port-event mechanism. I have implemented Asynchronous socket object model by using aio_read/aio_write + port-event.
The issue which is unclear to me is thread management in the AIO model. To be more precise number of threads created by AIO calls. Thread management in test application is precise and goes like this: 1. There is a fixed thread pool for managing portget. Number of threads in that pool is calculated according to the number of CPUs (2 threads per CPU). 2. There is additional single thread for accepting new connections. 3. main thread. So on 4CPU machine total number of threads should be 10 (8 threads for port-event, 1 thread for accept and main thread). However, when connection is made and AIO starts, number of threads in application starts to rise. There is no new thread creation in application (in my source code) since it is simple echo server which is just a proof of AIO concept. For load of 10 concurrent connections number of threads reaches 22 ?! When application is started without single connection thread number is as expected - 10. The real question is what causes this thread icrease ? aio_read/aiowrite ? port-event mechanism ? I have attached project source so you can inspect it. Any explanation is appreciated. Many Thanks, Mirko This message posted from opensolaris.org
echoserver.tar.gz
Description: GNU Zip compressed data
_______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
