PDA

View Full Version : Scalability of Qt open socket/stream number



pacesie
26th March 2008, 06:34
Hi folks, my first post here. I am evaluating whether some Qt components will be suitable for a new program. Pardon me if my question can be answered by reading documents, I just think as a newbie it is easier to ask to begin with.

The program is a server that needs to maintain large number of open sockets. It seems Qt use select() in event loop to poll streams. As select() is doesn't scale well with large number of streams, is it possible to use the Qt IO streams with other types of async IO event notification? ( For example, with libevent which uses epoll() )

Thanks

wysota
26th March 2008, 08:55
Hi folks, my first post here.
Welcome!


The program is a server that needs to maintain large number of open sockets. It seems Qt use select() in event loop to poll streams. As select() is doesn't scale well with large number of streams, is it possible to use the Qt IO streams with other types of async IO event notification? ( For example, with libevent which uses epoll() )

If you modify the sources, then yes of course. The problem is epoll() is a Linux 2.6 call and Qt has to work on non-Linux unices as well and Linux machines with 2.4 kernels. That's probably one of the reasons for using select() there.