Saturday, May 14, 2011

Media server bottlenecks

Yesterday, Warren tried running the media server on a 3 GHz Pentium 4 and it was almost too slow. That means that I've got some major optimizations to do. But I will probably finish up my GLES2 work first for Beagleboard since I am kinda in the middle of that.

The good news is that Warren was able to do enough tweaks to get his video playing at full speed so I am hoping to see some new videos from him soon :)

Here is a dump from a profiler program called "oprofile" from my AMD64 showing which functions are eating up the majority of the CPU. It shows that almost all of the CPU power is being consumed by the libjpeg reference decoder (which is notoriously slow hehe).


CPU: AMD64 processors, speed 1802.24 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000
CPU_CLK_UNHALT...|
samples| %|
------------------
776601 40.2711 dexter.bin
CPU_CLK_UNHALT...|
samples| %|
------------------
775435 99.8499 dexter.bin
1166 0.1501 [vdso] (tgid:24944 range:0xe2b000-0xe2c000)
337096 17.4803 libGLcore.so.195.36.24
332950 17.2653 zero
190925 9.9005 libc-2.11.1.so
155456 8.0613 no-vmlinux
27350 1.4182 libSDL-1.2.so.0.11.3
13420 0.6959 libpulsecommon-0.9.21.so
11233 0.5825 nvidia_drv.so
10433 0.5410 libpulsecore-0.9.21.so
9787 0.5075 libpixman-1.so.0.16.4
6558 0.3401 libpulse.so.0.12.2
5868 0.3043 oprofiled

----------------------------------------------------------------------------

CPU: AMD64 processors, speed 1802.24 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000
samples % image name symbol name
318575 41.0341 dexter.bin jpeg_idct_ifast
168258 21.6725 dexter.bin decode_mcu
143847 18.5282 dexter.bin h2v2_fancy_upsample
102495 13.2019 dexter.bin null_convert
16637 2.1429 dexter.bin decompress_onepass
2833 0.3649 dexter.bin jpeg_make_d_derived_tbl
1458 0.1878 dexter.bin sep_upsample
1166 0.1502 [vdso] (tgid:24944 range:0xe2b000-0xe2c000) [vdso] (tgid:24944 range:0xe2b000-0xe2c000)
1148 0.1479 dexter.bin process_data_context_main
1033 0.1331 dexter.bin read_markers
707 0.0911 dexter.bin jinit_master_decompress
...

No comments:

Post a Comment