vpelletier / python-libaio

Python wrapper for libaio
GNU Lesser General Public License v3.0
16 stars 6 forks source link

side effect of larger the value of libaio.AIOContext(val)? #4

Closed pahome closed 6 years ago

pahome commented 6 years ago

is there any side effetcs if I increase the size of queue?(means larger the value of libaio.AIOContext(val)) Will that decrease the performance? or the event?

thx

vpelletier commented 6 years ago

I do not think setting a large value reduces performance of a given process. It decreases the chances of the allocation succeeding as the number of total slots in a system is limited (although it should be plenty, details are in the kernel).

Having many submitted AIO operations may cause overall decrease performance if I read the kernel right (I remember reading that the AIO operations are scanned linearly, but I forgot what the operation needing the lookup was).

In any case, these are general AIO questions, for which encourage you to check the kernel directly (both python-libaio and libaio are rather thin wrappers above kernel API).