we use janus gateway with the rust sfu from GitHub - networked-aframe/janus-plugin-sfu: Janus plugin to act as a kind of SFU for game networking data. it runs very stable and we are super happy with this setup, at the last days i have done some more testing, wie one Room and 30 subscriber/publisher with audio/video/datachannels, as a result
using event_loops=8 ( server has 8 cpu) cpu is a little better than the standard config but still high
~400% gprof shows me
time seconds seconds calls ms/call ms/call name
39.12 4.71 4.71 janus_ice_outgoing_traffic_prepare
22.22 7.39 2.68 1687955 0.00 0.00 janus_ice_outgoing_traffic_handle
12.08 8.84 1.46 janus_ice_cb_nice_recv
4.24 9.35 0.51 22883 0.02 0.02 janus_cleanup_nack_buffer
3.99 9.83 0.48 2368685 0.00 0.00 janus_rtp_payload
2.91 10.18 0.35 1799462 0.00 0.00 janus_ice_relay_rtp
2.49 10.48 0.30 9267428 0.00 0.00 janus_flags_is_set
1.33 10.64 0.16 6853161 0.00 0.00 janus_get_monotonic_time
are the most used is this normal? or can we still optimize this?
No, I don’t think it would. Janus knows nothing about what plugins do, and viceversa, and this is on purpose. If you want to put users of specific rooms on specific loops, that’s up to you to do.
let clientId = String(crypto.getRandomValues(new Uint32Array(1))[0]);
using this as the client janus Id
and on attach loop_index is set with “loop_index”: parseInt(clientId) % 8 ( 8 are the CPU cores)
Hi there,
I’m trying to setup the stress test. However, when I run squawkers.html on the api-version=103. I got the error as below on terminal running janus.
[ERR] [sdp-utils.c:janus_sdp_get_codec_pt_full:780] Unsupported codec ‘’
[ERR] [sdp-utils.c:janus_sdp_generate_offer:1379] First attribute is not JANUS_SDP_OA_MLINE or JANUS_SDP_OA_DONE
’ panicked at ‘Mysterious error generating SDP offer :(’, src/lib.rs:656:32
The SFU plugin seems to be loaded correctly:
Loading plugin ‘libjanus_plugin_sfu.so’…
Loaded SFU plugin configuration: Config { auth_key: None, max_room_size: 100, max_ccu: 1000, message_threads: 0 }
message_threads is set to 0, setting it to 128 (number of cpus)
Janus SFU plugin initialized!
Did you run into any such problem? Any help would be appreciated!