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
This commit is contained in:
Goran 2015-07-06 19:10:45 +02:00
parent 72f441c327
commit dc3bae07ad
1 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,9 @@ http {
# Speed up file transfers by using sendfile() to copy directly # Speed up file transfers by using sendfile() to copy directly
# between descriptors rather than using read()/write(). # 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; sendfile on;
# Tell Nginx not to send out partial frames; this increases throughput # Tell Nginx not to send out partial frames; this increases throughput