Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark encoding time with alignment #18

Closed
bmegli opened this issue Jun 7, 2020 · 3 comments
Closed

benchmark encoding time with alignment #18

bmegli opened this issue Jun 7, 2020 · 3 comments
Labels
maintenance Documentation and future-proof concepts

Comments

@bmegli
Copy link
Owner

bmegli commented Jun 7, 2020

From #12 on SBC (LattePanda Alpha) we were quite close to using whole time between frames for encoding

By forcing highest quality for depth and using default for IR:

  • GPU usage reaches 50%
  • CPU no changes (<35% of 400%)
  • encode/send takes 20-23 ms

This left around 10 ms window at 30 FPS.


If alignment takes considerable time there are several options:

  • perform alignment during encoding
    • depending on alignment direction we may align during encoding target
    • but this will not work well along MLSP#12
    • unless order of frames (depth/color) will be made flexible
  • perform alignment on receiving side (not sending)
    • decoding is much faster, so we have more free time
    • decoding side is usually more powerful
  • do not force highest quality encoding on depth (e.g. return to default)
@bmegli bmegli added the maintenance Documentation and future-proof concepts label Jun 7, 2020
bmegli added a commit that referenced this issue Jun 9, 2020
- simple measurment
- to get idea about alignment time and total frame processing time

Related to #18
@bmegli
Copy link
Owner Author

bmegli commented Jun 9, 2020

Scenario:

  • testing 307d8a9 RNHVE bench-align-time branch
  • with LattePanda Alpha (KabyLake m3-7y30) as sender
  • with i7-7820HK laptop as sender
  • both on Ubuntu 18.04

848x480@30 fps, 8Mb + 1 Mb bitrate, alignment to color

./realsense-nhve-depth-color 192.168.0.100 9768 color 848 480 848 480 30 500 /dev/dri/renderD128 8000000 1000000 0.0000125
  • CPU usage measured with htop

@bmegli
Copy link
Owner Author

bmegli commented Jun 9, 2020

Results

Laptop (KabyLake i7-7820HK)

Alignment enabled:

  • 45-50% CPU
  • align 3-11 ms
  • align + encode + send 21-31 ms

Alignment commented out:

  • 27-30% CPU
  • encode + send time 17-19 ms

LattePanda Alpha (KabyLake m3-7y30)

Alignment enabled

  • 46-56 % CPU
  • align 5-16 ms (typically 5-8 ms)
  • align + encode + send 24-36 ms (typically < 30 ms)

Alignment commented out:

  • 39-43% CPU
  • encode + send time 21-25 ms

@bmegli
Copy link
Owner Author

bmegli commented Jun 9, 2020

Discussion

  • alignment time order of 5-10 ms
  • has effect on latency
  • on SBC we barely keep up with the data at 30 FPS (33 ms)

At this point, adding anything to the pipeline on SBC (e.g. post-processing) will require changes (already discussed in the first post).

Alignment time is quite inconsistent, should not be (e.g. 5-16 ms?). This probably means that the process is sometimes preempted during alignment.

For now it may stay as is but has to be kept in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Documentation and future-proof concepts
Projects
None yet
Development

No branches or pull requests

1 participant