I read that sendfile should be off, but it won’t send video unless I
In this case does aio work at all? How can I tell, before I wait a week
see that maybe HDD util is not 100% all the time anymore
On Linux,directiocan only be used for reading blocks that are aligned on
512-byte boundaries (or 4K for XFS). Reading of unaligned files end is
still made in blocking mode. The same holds true for byte range
requests, and for FLV requests not from the beginning of a file: reading
of unaligned data at the beginning and end of a file will be blocking.
There is no need to turn offsendfileexplicitly as it is turned off
automatically whendirectiois used.
What is your exact configuration? What OS do you use, what load and what
disk and RAM configuration do you have?
Yes, I’m aware, thats why I told him to monitor the box carefully.
However, async IO is not so easy to accomplish under linux, and since he
is also using the streaming module, things can get complicated.
I wonder if switching to FreeBSD would be a better idea to avoid the
linux AIO limitations (as in the nginx documentation).
Anyway, he needs to do some serious testing/thinking/spending time with
it. Nobody will come up with the perfect configuration for him resolving
all the issues.
64 GB of RAM might not be sufficient for keeping a significant part of
his video data in memory. Hence, depending on the number of concurrent
users and the average size of the videos Cristian wants to stream it is
entirely possible that caching videos in memory does not help at all. In
this case, he needs proper disk I/O settings.