From dc3bae07ad6daeb8e8e521e9e1bbc8814c861362 Mon Sep 17 00:00:00 2001 From: Goran Date: Mon, 6 Jul 2015 19:10:45 +0200 Subject: [PATCH] Added FreeBSD w/ ZFS performance instructions On FreeBSD systems with ZFS, sendfile() is useless as ZFS's caching subsystem (adaptive replacement cache a.k.a ARC) already caches most frequently used files in RAM. Disabling sendfile() avoids redundant data caching. References: https://calomel.org/nginx.html http://blog.vx.sk/uploads/conferences/EuroBSDcon2012/zfs-tuning-handout.pdf --- nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nginx.conf b/nginx.conf index be0c71c..a37e92c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -57,6 +57,9 @@ http { # Speed up file transfers by using sendfile() to copy directly # between descriptors rather than using read()/write(). + # For performance reasons, on FreeBSD systems w/ ZFS + # this option should be disabled as ZFS's ARC caches + # frequently used files in RAM by default. sendfile on; # Tell Nginx not to send out partial frames; this increases throughput