Tuning Linux to reach maximum performance on 10 Gbps network card with HTTP Streaming.
The idea of this post, is share the experience and informations found after almost 2 months of investigation and 1 year of production use.
I found many post about how serve high numbers of traffic over 10Gbps or similar for HTTP streaming, but none of these posts share the Linux OS tuning they apply to reach this goal.
In my case, we had a extra challenge, we use P2P settings, that hitting the server around 3 times more that standard HTTP (HLS) Streaming…
When work with P2P need setting smaller size chunks, with high number of items into playlist.
The HLS spec say you need 10 sec chunks with almost 3 items into playlist. For good Sharing Ratio inside P2P is needed put 3 sec chunks and 20 items into playlist.
As HTTP Server we use Varnish, that cache all the request from Origin.
Here you need change the Interface name for the correct based on your setup, in our server setup the public network card is “p5p1"
Here some screenshot about full capacity reached on production:
The server Spec be:
- 2 x Intel(R) Xeon(R) CPU E5645 @ 2.40GHz (HT) = 24 logical cores
- 16GB Ram
Any advice or feedback is welcome, feel free to write into the comments!
Resources for better understanding of each param:
Test/Measurement Host Tuning
Here is a quick reference guide for tuning settings for Linux Test/Measurement hosts such as perfSONAR hosts that run…
Coping with the TCP TIME-WAIT state on busy Linux servers
The Linux kernel documentation is not very helpful about what net.ipv4.tcp_tw_recycle does: Enable fast recycling TIME…
Other post that can be interested: https://medium.com/@_wmconsulting/building-live-hls-stats-for-varnish-82891be3df66