Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu usage recomendations #14

Open
arty777 opened this issue Sep 30, 2014 · 10 comments
Open

cpu usage recomendations #14

arty777 opened this issue Sep 30, 2014 · 10 comments

Comments

@arty777
Copy link

arty777 commented Sep 30, 2014

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

@ankurss
Copy link

ankurss commented Sep 30, 2014

what processor are you using ?

@arty777
Copy link
Author

arty777 commented Sep 30, 2014

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

@arty777
Copy link
Author

arty777 commented Sep 30, 2014

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;

@arty777
Copy link
Author

arty777 commented Sep 30, 2014

i disable keep alive , and all fine with memory , but with cpu is still bad

@arty777
Copy link
Author

arty777 commented Sep 30, 2014

What can give advice to reduce the load on the CPU?

@arty777
Copy link
Author

arty777 commented Sep 30, 2014

@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

@marcelpoelstra
Copy link

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.

@arty777
Copy link
Author

arty777 commented Sep 30, 2014

@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)

@marcelpoelstra
Copy link

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.

@arty777
Copy link
Author

arty777 commented Sep 30, 2014

@rounce i hope you wil do something to reduce cpu utilization,

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants