Skip to main content

aio_queue_async_request: too many in flight for proc: 16

Lateley I've been seeing the following on this MacOS 10.6.4 (xnu-1504.7.4):

   aio_queue_async_request(): too many in flight for proc: 16.
This is logged over and over again to the kernel log. The messages stem from bsd/kern/kern_aio.c, but I suspect the "rude" application doing this might be VirtualBox. That's the toughest application on this box anyway and I noticed quite a few (new) messages when VirtualBox is running. And since the VM in question was running suspiciously slow, I'm tempted to tune these limits. How about:
# sysctl -w kern.aiomax=128 kern.aioprocmax=32 kern.aiothreads=8
kern.aiomax: 90 -> 128
kern.aioprocmax: 16 -> 32
kern.aiothreads: 4 -> 8
I haven't done any tests yet, so let's wait and see if it helps - or breaks :-))

Update: Even with MacOS 10.6.7 (1504.9.37), /etc/rc.local is still being parsed during bootup, so we can put these commands in there! :-)