nginx-hls-module
nginx-hls-module copied to clipboard
cpu usage recomendations
config example my location /hdd81/ { add_header Cache-Control "private, no-store, no-cache, must-revalidate"; hls; hls_length 20; # length of fragment (seconds) hls_mp4_buffer_size 5M; hls_mp4_max_buffer_size 30M; root /raid/; }
very big , 100% cpu usage , 2 Gigabit channal wor on 30% ...
can you please give some recomendations how to reduse cpu utilization ? may be hls_length 20; set bigger ? 100 for example
what processor are you using ?
1 server 2*Six-Core AMD Opteron(tm) Processor 2427 model name : Six-Core AMD Opteron(tm) Processor 2427 stepping : 0 cpu MHz : 2200.000
2 server model name : Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
3rd 2* model name : Intel(R) Xeon(R) CPU L5630 @ 2.13GHz
i see that hls_length 50; against hls_length 10; resolve my problem with cpu ,,, 50% utilization now
now i see memory problem ,,, try find decision
for example each nginx1 process (whole 8) get 1.1 GB memory ... hls_length 50; # length of fragment (seconds) hls_mp4_buffer_size 256k; hls_mp4_max_buffer_size 5M;
i disable keep alive , and all fine with memory , but with cpu is still bad
What can give advice to reduce the load on the CPU?
@rounce cpu is a big bottleneck of this module :( i can't utilize 4GB channel (read from ramdisk) 100% cpu
in a small load - works well
with all respect, but I don't think it has anything to do with this module. We are using the module on Cortex A9 dual core (ARM) CPU and it is running smoothly even chunking complete feature movies on the fly. This cpu has only a fraction of the performance of the cpu you are using. So most likely you have some other bottleneck somewhere.
@thevideoxpress it all depends on the load you are probably very little load the, a small number of users, I have for example while watching videos 5,000 active users in the same time (with pseudo streaming work fine)
In that case you'd better use one (ore more) extra nginx machines as reverse proxy in front of your origin server. In that case all video's will only have to be chunked once, incl m3u8 generation, since any next request of the same file will be served from cache and does not need to go through this module again.
@rounce i hope you wil do something to reduce cpu utilization,
thank you