Hi, Yes, unfortunately kernel async I/O(AIO) is not supported on sockets. If the AIO requests on sockets, it will be handled by libaio which simulates it using worker threads. If you have blocking I/O (reads) being performed on all these sockets, then the libaio implementation could end up creating many threads to handle all these requests.

One way you could implement a scalable solution efficiently would be by polling on the sockets and performing non blocking I/O. The event ports facility provides an efficient way of doing that. See Bart's blog about using event ports with an example to perform I/O on sockets.

http://blogs.sun.com/barts/entry/entry_2_event_ports

-Prakash.

AD wrote:
Hi,

I am a solaris newbie and want to develop a high performance multi connection (above 
1k) socket server on solaris. At beginning I found a topic in docs.sun.com, it tought 
me that I could use aio and thread pool to finish my work. Then I wrote the basic 
thread/aio code of my server, but when I read the book <solaris internals> , it 
told me that the solaris kio support only raw device, the book also told me how to 
test whether the kaio is supported or not, I used truss to trace my code and found 
the follow result

kaio(AIOREAD, 4, 0x0041EF24, 4, 0x0041EF1000000000) Err#81 EBADFD

I think it means that solaris kaio do not support socket. Could anybody tell me is that correct?
If solaris kaio does not support socket, it may mean that solaris will create 
many user thread to simulate asynchronous operations. Is there any high 
performance socket io model for my multi connections socket server?
This message posted from opensolaris.org
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to