Tomcat cpu usage report on Glances

98 views
Skip to first unread message

German Acevedo

unread,
Oct 25, 2018, 8:58:02 AM10/25/18
to BigBlueButton-dev
Hi,
I'm monitoring my server using Glances, and found that it's reporting a high cpu usage as you can see in the following screenshot.
This report is with BigBlueButton with no meeting running.
What catches my eye, is that the total cpu load is just 19.9%, but Tomcat7 is using 161.7%, so I think there is a way to assign cpu limits to Tomcat7, am I right? Where can I increase these values?
Thanks for any help.
Regards,
German


glances-r-20181025.jpg




Chad Pilkey

unread,
Oct 25, 2018, 2:12:13 PM10/25/18
to BigBlueButton-dev
That isn't the tomcat7 process using 161.7%. The "tomcat7" that you see is just the user account that is running the command. The actual command is an ffmpeg command that is being run with the tomcat7 user account. I can't see the full command so I don't know what the command was or is doing, but ffmpeg is mainly used for video processing in the recording scripts.

German Acevedo

unread,
Oct 25, 2018, 10:16:24 PM10/25/18
to BigBlueButton-dev
Hi Chad,
Thanks for your guidance.
I have looked inside the process with id 13001, and the full command is the following:

ffmpeg -y -v warning -nostats -max_error_rate 1.0 -i /var/bigbluebutton/recording/process/presentation/29b8aa3be9ff5403d1f05f723465cd323625bc9b-1540428646461/webcams.ts -i /var/bigbluebutton/recording/process/presentation/29b8aa3be9ff5403d1f05f723465cd323625bc9b-1540428646461/recording.flac -c:v libvpx -crf 34 -b:v 60M -threads 2 -deadline good -cpu-used 3 -c:a libvorbis -q:a 2 -f webm -passlogfile /var/bigbluebutton/recording/process/presentation/29b8aa3be9ff5403d1f05f723465cd323625bc9b-1540428646461/webcams /var/bigbluebutton/recording/process/presentation/29b8aa3be9ff5403d1f05f723465cd323625bc9b-1540428646461/webcams.encode.webm

As I can understand, it's processing a recording.

Is there any way I can increase the resources dedicated to process the recordings? This server handles few users but a lot of recordings.

Regards,

German

German Acevedo

unread,
Oct 25, 2018, 10:19:32 PM10/25/18
to BigBlueButton-dev
This indicates that it has a parent process named ruby process/presentation.rb - . and the command of this process is: ruby process/presentation.rb -m 29b8aa3be9ff5403d1f05f723465cd323625bc9b-1540428646461

Chad Pilkey

unread,
Oct 26, 2018, 12:55:44 PM10/26/18
to BigBlueButton-dev
I just did some quick googling and I think the relevant parameters are the libvpx options (libvpx -crf 34 -b:v 60M -threads 2 -deadline good -cpu-used 3). The documentation for the parameters can be found here, https://www.webmproject.org/docs/encoder-parameters/. I think the two parameters that will matter the most are the threads and cpu-used, but both have their limits and potential drawbacks. I think you could try to increase the number of threads (recommended value is "number of real cores - 1"), but I don't really know enough to give recommendations.

The places where the line is defined can be found here:
firstuser@ubuntu:~/dev/bigbluebutton/record-and-playback$ git grep "threads" .
core/lib/recordandplayback/generators/video.rb:            '-crf', '34', '-b:v', '60M', '-threads', '2', '-deadline', 'good', '-cpu-used', '3',
core/lib/recordandplayback/generators/video.rb:            '-threads', '2', '-preset', 'medium', '-cpu-used', '3',
core/lib/recordandplayback/generators/video.rb:            '-crf', '34', '-b:v', '60M', '-threads', '2', '-deadline', 'good', '-cpu-used', '3',
core/lib/recordandplayback/generators/video.rb:            '-threads', '2', '-preset', 'medium', '-cpu-used', '3',
Reply all
Reply to author
Forward
0 new messages