# Nginx: sendfile or aio on FreeBSD 13.1+ZFS?



## kalleboy (Jul 21, 2022)

Greetings.

Nginx states (Changes with nginx 1.21.5 - 28 Dec 2021):
*Change: now nginx always uses sendfile(SF_NODISKIO) on FreeBSD.*

So it seems, it uses "sendfile: on;" by the default on FreeBSD.

Afaik, sendfile should be off for FreeBSD and ZFS, to avoid redundant data caching. 

I'm on ZFS, FreeBSD 13.1. So what would you suggest now; aio: on, or sendfile: on?


----------

