GstSEIMetadata - Performance - Qualcomm RB5

From RidgeRun Developer Wiki
Revision as of 14:23, 8 February 2024 by Jmora (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Previous: Performance Index Next: Contact Us





Benchmark environment

The following setup was used for all the benchmarks:

The measurements are taken considering the following criteria:

  • Average behaviour: measurements considering typical image processing pipelines. The CPU consumption excludes the video source overhead.

Benchmarking

Instruments

  • CPU: RidgeRun Profiler
  • RAM: RidgeRun Profiler

Pipelines

Average Behaviour: CPU and RAM (1920x1080 - Short/Long string as metadata) :

seiinject

# Without the element 
gst-launch-1.0 qtiqmmfsrc ! "video/x-raw(memory:GBM),format=NV12,width=1920,height=1080,framerate=30/1" ! queue ! qtic2venc ! "video/x-h264,mapping=/stream1" ! h264parse config-interval=-1 ! perf ! fakesink

# With the element (Short string test)
gst-launch-1.0 qtiqmmfsrc ! "video/x-raw(memory:GBM),format=NV12,width=1920,height=1080,framerate=30/1" ! queue ! qtic2venc ! "video/x-h264,mapping=/stream1" ! h264parse config-interval=-1 ! seiinject metadata="+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" ! perf ! fakesink

# With the element (Long string test)
gst-launch-1.0 qtiqmmfsrc ! "video/x-raw(memory:GBM),format=NV12,width=1920,height=1080,framerate=30/1" ! queue ! qtic2venc ! "video/x-h264,mapping=/stream1" ! h264parse config-interval=-1 ! seiinject metadata="+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+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
Without the element 3.32 % 26.58 % 18.38 MiB 1000
With the element (Short string test) 3.24 % 25.91 % 19.17 MiB 1000
With the element (Long string test) 3.30 % 26.38 % 19.24 MiB 1000
Analysis

At first glance, it is counter-intuitive that the inclusion of the seinject element does not increase CPU consumption, and even reduces it slightly. Several tests were performed and the result is consistent. But the variation is so small that it could be due to a number of factors under investigation:

  • Hardware or Driver Optimization: The hardware or drivers may be optimized for more complex workloads, triggering a more efficient processing path when the seinject element is included, slightly reducing CPU usage. Or it could also be resource management. In this case, it could be that the system is managing resources more efficiently when the pipeline is more complex, assigning priorities differently or adjusting processor performance dynamically.
  • Stream pressure over the HW: Like performance offsets in the rest of the pipeline, the addition of seinject could lead to performance adjustments in other parts of the pipeline, like a reduced frame rate or more efficient queue management, leading to a lower or similar CPU usage.
  • Statistical variability and sample averaging: The slight difference in CPU usage might be due to normal statistical variation across the 1000 samples, influenced by background processes or system load fluctuations.


However, the variation is so slight that it can be considered inconsequential for the current analysis. Actually, RAM consumption results offset counterintuitive findings on CPU utilization. The RAM usage being nearly identical for both configurations indicates that the memory overhead for seinject is negligible or offset by other optimizations, reflecting a memory management design that's well-suited for real-time streaming operations.


seimetatester

# With the element
gst-launch-1.0 qtiqmmfsrc ! "video/x-raw(memory:GBM),format=NV12,width=1920,height=1080,framerate=30/1" ! queue ! videoconvert ! qtic2venc ! "video/x-h264,mapping=/stream1" ! h264parse config-interval=-1 ! seimetatester ! perf ! fakesink

# RidgeRun Profiler
rr-profiler-headless -a -p [process_number] -T 100 > data.txt
- CPU (all) CPU (core) RAM (phys) Samples
With the element 3.01 % 24.11 % 16.74 MiB 1000


seiextract

# With seiinject
gst-launch-1.0 qtiqmmfsrc ! "video/x-raw(memory:GBM),format=NV12,width=1920,height=1080,framerate=30/1" ! queue ! videoconvert ! qtic2venc ! "video/x-h264,mapping=/stream1" ! h264parse config-interval=-1 ! seiinject metadata="-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-" ! seiextract ! perf ! fakesink

# With seimetatester
gst-launch-1.0 qtiqmmfsrc ! "video/x-raw(memory:GBM),format=NV12,width=1920,height=1080,framerate=30/1" ! queue ! videoconvert ! qtic2venc ! "video/x-h264,mapping=/stream1" ! h264parse config-interval=-1 ! seimetatester ! seiextract ! perf ! fakesink

# In both previous cases add ''GST_DEBUG=*seiextract*:MEMDUMP'' at the beginning of the pipeline to see the extracted data.

# RidgeRun Profiler
rr-profiler-headless -a -p [process_number] -T 100 > data.txt
- CPU (all) CPU (core) RAM (phys) Samples
With seinject 3.28 % 26.24 % 20.28 MiB 1000
With seimtester 3.31 % 26.49 % 19.33 MiB 1000


All together

# All together pipeline (seiinject, seimetatester, seiextract & long string test)
gst-launch-1.0 qtiqmmfsrc ! "video/x-raw(memory:GBM),format=NV12,width=1920,height=1080,framerate=30/1" ! queue ! qtic2venc ! "video/x-h264,mapping=/stream1" ! h264parse config-interval=-1 ! seimetatester ! seiinject metadata="+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-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+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" ! seiextract ! perf ! fakesink

# RidgeRun Profiler
rr-profiler-headless -a -p [process_number] -T 100 > data.txt
- CPU (all) CPU (core) RAM (phys) Samples
All together pipeline 3.40 % 27.20 % 19.91 MiB 1000



Previous: Performance Index Next: Contact Us