Hi all!
I've evaluated KMS for a few days, but I'm having troubles with scalability.
First of all, let's say we have a decent server hosting the KMS, how many concurrent streams should it be able to handle (Assuming a resolution 100px x 100px with around 10 fps)?
I'm currently trying to build a conferencing system that should support these two scenarios:
1) A teacher (always shown) + one student (max one visible) + 20 receiver students
2) Small groups of students (5 - 6 people), everyone sending to everyone
Of 1) and 2) there may be several ongoing conferences, which means we can get up to several hundreds, maybe thousands of streams via the KMS.An Example: Ten groups of six persons, all streaming to
each and everyone within a group (room). Furthermore, there may be ten
other groups simolutaneously (two senders and twenty receivers). Is this an
utopia with the KMS? What kind of numbers should I be able to expect,
assuming that I run the server on decent HW. If not possible, could it be possible using several servers and load balancing somehow?
My current experience:Setup: required Ubuntu with 2GiB ram and four HT processors avail.
First I tried the group call demo with the java app and KMS 5.0.4. I could get a group of maximum 5 users streaming to each other. If a sixth user joined, the KMS broke down and had to be started again. Then I tried KMS 5.1.0-something and it scaled up to 6 concurrent streamers within the same group, but this feels quite small.
So, I modified the client- and application code for the application server (Group Call) to support enabling/disabling of the users' web cams. So, when ten people join a chat, clicking on your icon will start streaming your video to everyone. For a group of twenty persons, this works ok as long as the amount of senders is max two. If I start a third one to stream, the KMS shuts down. For me, it is very important that the KMS would not shut down, that is a bit critical.
Here are parts of the error log just before the KMS shuts down (also attached in a file. The error occurrences are separated with '------'):
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2015-01-19 15:40:15.477781 9449
[3039681344] debug KurentoMediaSet MediaSet.cpp:82 doGarbageCollection() Running garbage collector
2015-01-19 15:40:15.479799 9449 [2943310656] info KurentoWebSocketTransport WebSocketTransport.cpp:247 keepAliveSessions() Keep alive ba4be2a1-2b09-444e-a368-f81825a6168c
(kurento-media-server:9449): GLib-ERROR **: /build/buildd/g
lib2.0-2.40.0/./glib/gmem.c:103: failed to allocate 65619 bytes
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(kurento-media-server:9955): GStreamer-WARNING **: failed to create thread: Error creating thread: Resource temporarily unavailable
(kurento-media-server:9955): GStreamer-WARNING **: failed to create thread: Error creating thread: Resource temporarily unavailable
2015-01-19 15:52:07.662451 9955 [2968488768] error basesrc gstbasesrc.c:3441 gst_base_src_start_complete() <nicesrc46> Failed to perform initial seek
2015-01-20 08:45:31.440373 9955 [2943310656] info KurentoWebSocketTransport WebSocketTransport.cpp:247 keepAliveSessions() Keep alive ba4be2a1-2b09-444e-a368-f81825a6168c
2015-01-20 08:45:31.440390 9955
[3039419200] debug KurentoMediaSet MediaSet.cpp:82 doGarbageCollection() Running garbage collector
GLib: Cannot convert message: Could not open converter from 'UTF-8' to 'ANSI_X3.4-1968'
(kurento-media-server:9955): GLib-ERROR **: /build/buildd/glib2.0-2.40.0/./glib/gmem.c:103: failed to allocate 2089 bytes
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(kurento-media-server:10907): GLib-ERROR **: creating thread 'KmsLoop': Error creating thread: Resource temporarily unavailable
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<
(kurento-media-server:11441): GStreamer-WARNING **: failed to create thread: Error creating thread: Resource temporarily unavailable
(kurento-media-server:11441): GStreamer-WARNING **: failed to create thread: Error creating thread: Resource temporarily unavailable
2015-01-20 10:36:06.535142 11441 [2968488768] error basesrc gstbasesrc.c:3441 gst_base_src_start_complete() <nicesrc40> Failed to perform initial seek
2015-01-20 10:36:12.981481 11441
[3039767360] debug KurentoMediaSet MediaSet.cpp:82 doGarbageCollection() Running garbage collector
2015-01-20 10:36:12.990988 11441 [2943310656] info KurentoWebSocketTransport WebSocketTransport.cpp:247 keepAliveSessions() Keep alive ba4be2a1-2b09-444e-a368-f81825a6168c
2015-01-20 10:37:12.991220 11441 [2943310656] info KurentoWebSocketTransport WebSocketTransport.cpp:247 keepAliveSessions() Keep alive ba4be2a1-2b09-444e-a368-f81825a6168c
GLib: Cannot convert message: Could not open converter from 'UTF-8' to 'ANSI_X3.4-1968'
(kurento-media-server:11441): GLib-ERROR **: /build/buildd/glib2.0-2.40.0/./glib/gmem.c:103: failed to allocate 1447 bytes
(kurento-media-server:11441): GLib-ERROR **: /build/buildd/glib2.0-2.40.0/./glib/gmem.c:103: failed to allocate 1469 bytes
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If I check the Kurento Media Server Status, I get:
*
checking Kurento Media
Server... *
/usr/bin/kurento-media-server is not running but the pid file
exists...