- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
你好,我想请教一下,在MCU模式下,使用GPU加速的情况下,CPU还会消耗很多用于混音吗?我测试下来,GPU基本没有消耗,但是CPU消耗很是很多,这个是为什么?
软件安装:
Intel® Media Server Studio for Linux* 2016
Intel® Collaboration Suite for WebRTC Version 3.2 Update 1
CentOS 7.1 1503
硬件配置:4核Corei5 cpu
[root@localhost bin]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
stepping : 3
microcode : 0x1c
cpu MHz : 3381.984
cache size : 6144 KB
GPU信息:
[root@localhost bin]# lspci -nn -s 00:02.0
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
./video_agent/video.toml配置如下:
[video]
#If true and the machine has the capability, the mixer will be accelerated by hardware graphic chips
hardwareAccelerated = true
#This configuration is only for software media engine. Hardware graphic acceleration provides H.264 by default
#true means OpenH264 is deployed for H.264. Otherwise no support of H.264 in MCU
openh264Enabled = false
配置的使用是使用硬件加速。
一个房间里面9个路视频接入,采用MCU模式。
4核总共消耗CPU16%左右,
top - 09:47:14 up 18:21, 2 users, load average: 0.66, 0.60, 0.54
Tasks: 175 total, 1 running, 174 sleeping, 0 stopped, 0 zombie
%Cpu(s): 15.9 us, 2.2 sy, 0.0 ni, 81.3 id, 0.3 wa, 0.0 hi, 0.3 si, 0.0 st
KiB Mem : 7917976 total, 5334756 free, 1229376 used, 1353844 buff/cache
KiB Swap: 8126460 total, 8126460 free, 0 used. 6392068 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13968 root 20 0 2419068 80228 20788 S 32.9 1.0 1:04.80 woogeen_video
13920 root 20 0 3035880 67848 13796 S 25.2 0.9 0:48.56 woogeen_audio
13732 root 20 0 3699600 82440 18700 S 16.6 1.0 0:31.86 woogeen_access
2571 root 20 0 130056 1844 1268 R 0.7 0.0 0:00.13 top
13507 rabbitmq 20 0 2164268 69340 2880 S 0.7 0.9 7:10.38 beam.smp
13615 root 20 0 1028912 47748 8608 S 0.3 0.6 2:45.63 node
13670 root 20 0 1015752 32284 8660 S 0.3 0.4 0:42.95 node
13680 root 20 0 129928 1756 1272 S 0.3 0.0 2:30.14 top
13716 root 20 0 1019116 34100 8672 S 0.3 0.4 0:41.92 node
13726 root 20 0 21656 1968 1612 S 0.3 0.0 0:38.38 nload
13810 root 20 0 1016840 34064 8660 S 0.3 0.4 0:42.62 node
13820 root 20 0 129928 1764 1272 S 0.3 0.0 2:30.53 top
13914 root 20 0 129928 1776 1272 S 0.3 0.0 2:29.67 top
13962 root 20 0 130032 1780 1272 S 0.3 0.0 2:30.13 top
使用intel_gpu_top命令查看GPU消耗,GPU似乎基本没有消耗
render busy: 2%: ▌ render space: 2/131072
bitstream busy: 0%: bitstream space: 0/131072
blitter busy: 0%: blitter space: 0/131072
task percent busy
TSG: 1%: ▎ vert fetch: 0 (0/sec)
GAM: 1%: ▎ prim fetch: 0 (0/sec)
VFE: 1%: ▎ VS invocations: 0 (0/sec)
TDG: 0%: GS invocations: 0 (0/sec)
GS prims: 0 (0/sec)
CL invocations: 0 (0/sec)
- Tags:
- HTML5
- JavaScript*
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
我重新尝试把./video_agent/agent.toml 文件配置如下:把hardwareAccelerated设置为false ,openh264Enabled=true,设置成不用硬件加速,仅仅使用CPU的情况
[video]
#If true and the machine has the capability, the mixer will be accelerated by hardware graphic chips
hardwareAccelerated = false
#This configuration is only for software media engine. Hardware graphic acceleration provides H.264 by default
#true means OpenH264 is deployed for H.264. Otherwise no support of H.264 in MCU
openh264Enabled = ture
测试下来看CPU消耗也是16%左右,和上面的使用硬件加速的情况一样,硬件加速没有起作用,是我哪里配置有问题吗?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
请确认你使用的是VP8 Codec还是H.264,只有H.264才能利用硬件加速,对于VP8即使是硬件加速版也是使用软件编解码。目前Chrome浏览器对H.264已经支持比较好,所以H.264是不错的选择。
另外对于v3.2软件版启用,除了改openh264Enabled = ture,还要按照Conference Server Guide文档下载Cisco OpenH264,以及做一些相关配置。请知晓。
如果还不能解决你的疑问,请把以下log打开,然后看看video的log就知道是细节了。
dist/video_agent/ log4cxx.properties
log4j.logger.woogeen.VCMFrameDecoder=DEBUG
log4j.logger.woogeen.VCMFrameEncoder=DEBUG
log4j.logger.mcu.media.SoftVideoCompositor=DEBUG
log4j.logger.woogeen.MsdkFrameDecoder=DEBUG
log4j.logger.woogeen.MsdkFrameEncoder=DEBUG
log4j.logger.mcu.media.MsdkVideoCompositor=DEBUG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Lei
谢谢你的解答,我已经按配置文档下载了Cisco OpenH264,软件编解码应该是没有任何问题。
对于硬件加速的,我怎么看是否使用的是H.264,这个需要在哪里配置吗?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
客户端没有特别设置默认是采用VP8的。如果要看到细节客户端可以通过getConnectionStats等接口获得,服务端打开video-agent的DEBUG log,可以在log文件中看到codec的情况。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
以JS端为例,publish和subscribe时都用codec参数指定。具体请参见Client SDK guide。
你提供的log确实说明是采用的是VP8的codec,你可以用VP8或者264作为关键词去搜索。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Lei
以你们给的实例代码为例该修改哪个文件?是woogeen.sdk.js吗?能告知怎么修改不,具体是哪一个接口进行设置的
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
你们给的代码好像都是经过处理了,根本就没法看了,想修改感觉无从下手
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
那是SDK部分,example代码的目录位置请参见conference guide内的描述,在Release-<Version>/extras/basic_example/目录下。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Lei
已经修改好了,能正常使用,谢谢。不过又出现了很奇怪的问题,我建立一个房间没有出问题。但是见两个房间的时候,每个房间九路视频,过一会儿那台做服务器的PC就直接崩溃掉了。
操作系统:Centos 7.1 1503
4核处理器Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz,4G内存,使用的是物理PC机。挂掉的时候CPU,内存,GPU消耗并没有特别高。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
是否稳定重现,请多试几次,可以查看一下系统崩溃前的MCU log和系统coredump信息,看看有没有有价值的信息提供给我们。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
稳定重现,需要哪些log,具体路径和文件名是啥?
出现的情况是这样的:我是从其他pc远程过去的,挂的时候是远程直接断了,到本机看是鼠标键盘都实现,但是显示器是有显示的,只能通过电源键强制重启。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
可以关闭MCU后, 把Release-v3.2.1/logs 目录清空,然后重新启动MCU测试,crash后把新生成的logs目录打包发给我们。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
系统崩溃的时候,鼠标键盘都失效了,显示器也定格在之前的画面,只能通过电源键强制重启
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MCU log看过了,没有任何异常信息,机器配置是msdk2016, haswell
只能看看系统级的log,是不是机器的各方面配套不完善,比如散热等。
- 配置Core dump, if crash happened, related coredump file would be generated in /tmp/ folder with core.xxx file name.
- ulimit -c unlimited
- echo “/tmp/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
- CPU温度监控
- sudo yum install lm_sernsors
- sudo sensors-detect
- sensors
运行一个脚本监控mcu运行时的温度,检查crash前是否有温度过高的情况
- 系统log
/var/log/*
/var/log/messages
/var/log/boot.log
/var/log/dmesg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
请问机器crash发生在哪两次Reloading的时间段?
Jan 23 09:36:51 localhost systemd: Reloading.
Jan 23 09:38:41 localhost systemd: Reloading.
Jan 23 10:00:02 localhost systemd: Reloading.
Jan 23 10:37:02 localhost systemd: Reloading.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
是下面这个时间段
Jan 23 10:00:02 localhost systemd: Reloading.
Jan 23 10:37:02 localhost systemd: Reloading.
那个附件里面的截图上有显示,应该是10:31:06左右挂掉的,过了几分钟,我强制重启的。基本跑半个小时左右就会复现
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
关于这个问题,目前没有特别的发现。由于春节假期,工程师需要节后才能继续分析。如果着急,有两个思路,一个是用FFPlay之类的播放器软件试着把系统的负载加到类似温度查看时候有同样crash现象。另外,可以试着换一台机器看看有没有类似的问题。抱歉带来的不便。

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page