public static int getNumWriteBehindBuffers ( int numBuffers ) { int numIOBufs = ( int ) ( Math . log ( numBuffers ) / Math . log ( 4 ) - 1.5 ) ; return numIOBufs > 6 ? 6 : numIOBufs ; }
Determines the number of buffers to be used for asynchronous write behind . It is currently computed as the logarithm of the number of buffers to the base 4 rounded up minus 2 . The upper limit for the number of write behind buffers is however set to six .