--- IO-AIO/README 2005/07/10 18:16:49 1.2 +++ IO-AIO/README 2005/07/10 20:57:36 1.3 @@ -43,12 +43,14 @@ 1, which means a single asynchronous operation can be done at one time (the number of outstanding operations, however, is unlimited). - It is recommended to keep the number of threads low, as some linux + It is recommended to keep the number of threads low, as some Linux kernel versions will scale negatively with the number of threads - (higher parallelity => MUCH higher latency). + (higher parallelity => MUCH higher latency). With current Linux 2.6 + versions, 4-32 threads should be fine. Under normal circumstances you don't need to call this function, as - this module automatically starts a single async thread. + this module automatically starts some threads (the exact number + might change, and is currently 4). IO::AIO::max_parallel $nthreads Sets the maximum number of AIO threads to $nthreads. If more than @@ -61,6 +63,17 @@ Under normal circumstances you don't need to call this function. + $oldnreqs = IO::AIO::max_outstanding $nreqs + Sets the maximum number of outstanding requests to $nreqs. If you + try to queue up more than this number of requests, the caller will + block until some requests have been handled. + + The default is very large, so normally there is no practical limit. + If you queue up many requests in a loop it it often improves speed + if you set this to a relatively low number, such as 100. + + Under normal circumstances you don't need to call this function. + $fileno = IO::AIO::poll_fileno Return the *request result pipe filehandle*. This filehandle must be polled for reading by some mechanism outside this module (e.g. Event