karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
298 stars 106 forks source link

SSL Cpu Load Problem #243

Closed stephanzett closed 4 years ago

stephanzett commented 5 years ago

hi Community! I am working with icecast for several years now and don’t know what to do with my newest setup: i have to make 20-30k simul listeners happen on a sever. my testsetup is several beefy client machines (4) that suck on a large 16 core proliant sever. i had to use the kh version since the xiph version always runs only on one core (per mount). At about 15000 listeners the core was full and dropouts started to occur. so that problem i could solve with the KH version which nicely distributes the load onto all cores. Unless: as soon as i start using ssl on a mount the server starts peaking again on one core. (it also need about 3 times th cpu power with ssl). so why does icecast KH is not using all CPU cores with ssl like it does with no ssl? thx in advance.

inetactief commented 5 years ago

Hi,

Do you have a solution to use SSL for all cores? I see the same problems.

Best regards, Michel

jesseorr commented 5 years ago

One method might be to use an NGINX reverse proxy in front of the Icecast server. NGINX can forward the x-forward-for header to Icecast, which KH can decode (if whitelisted), and then Icecast will run HTTP connections and NGINX can run HTTPS.

Of course a fix within the code base would be preferred, but this method might get you around your hurdle.

inetactief commented 5 years ago

Thanks for fast resonse and the suggestion. Unfortunately i ihave too little knowledge about NGINX reverse proxy.

karlheyes commented 5 years ago

been busy with other things so missed this. You didn't say but you have <workers> in limits set to the number of working threads, eg set to 16.

karl.

inetactief commented 5 years ago

Thank you Karl i will try that when reboot the server.

karlheyes commented 5 years ago

you can change that on-the-fly. just edit your xml and trigger a reload, HUP signal or via the admin page. The threads are created without dropping existing clients and are shuffled around periodically.

karl.

inetactief commented 5 years ago

We use 2 cores and i set in the config: in `

2` .... I try pkill -HUP icecast but in top i see stil one proc /core.
karlheyes commented 5 years ago

you should see multiple threads for icecast, how many and look at how much each is using.

karl.

inetactief commented 5 years ago

Hi Karl, I check in top i see one icecast When is check ps -aux | grep ice i see only one proc.

Michel

karlheyes commented 5 years ago

if you look at top, press the H, with ps, there are 2 variants depending on the bsd/sysv semantics

eg ps auxH or ps -eLf

karl.

karlheyes commented 4 years ago

will assume this is resolved now. FYI kh14 is up and has all latest fixes.

karl