Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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
share|improve this answer
    
"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 '13 at 3:52
    
The output of second command indicate that the aio module is loaded dynamically. Have you disabled sendfile? –  quanta Mar 11 '13 at 4:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.