1

I have nginx configured with

aio   on;

and no special prep on the OS side.

I tested loading lots of small jpegs from multiple clients, but there was not much of a different between aio on and aio off.

I'm not sure if I need to enable AIO in the kernel or not. How can I confirm whether nginx aio is working or not on FreeBSD? What would happen if nginx was configured to use aio but the FreeBSD kernel did not support it?

I'm using FreeBSD 8.1 and nginx 1.2.7 and the filesystem is UFS

1 Answer 1

0

I'm not sure if I need to enable AIO in the kernel or not.

Yes, you have to either link statically:

options VFS_AIO

or load dynamically:

kldload aio

Then you can verify by running:

strings -n3 /boot/kernel/kernel | sed -n 's/^__//p' | grep aio
kldstat -m aio
2
  • "strings -n3 /boot/kernel/kernel | sed -n 's/^__//p' | grep aio" didn't return anything. "kldstat -m aio" returned "Id Refs Name\n 4 1 aio". Does this mean aio is setup properly? Is it normal for the first command to not return anything?
    – David
    Mar 11, 2013 at 3:52
  • The output of second command indicate that the aio module is loaded dynamically. Have you disabled sendfile?
    – quanta
    Mar 11, 2013 at 4:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .