xpra icon
Bug tracker and wiki

Opened 13 months ago

Last modified 4 months ago

#1840 new enhancement

tune x264 threading

Reported by: Antoine Martin Owned by: Jonathan Anthony
Priority: major Milestone: 2.4
Component: encodings Version: 2.3.x
Keywords: Cc:

Description (last modified by Antoine Martin)

Somewhat related to #1839 since we now use vp8 / vp9 more than h264 in the python client.


Attachments (1)

h264.zip (108.8 KB) - added by J. Max Mena 6 months ago.
H264 test output data organized by XPRA_X264_SLICED_THREADS value

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 months ago by Antoine Martin

Description: modified (diff)
Owner: changed from Antoine Martin to J. Max Mena

r19300 disables sliced threads when speed is below XPRA_X264_SLICED_THREADS (which defaults to 60).

@maxmylyn: please use the automated tests to see what impact this has on h264 encoding.
In particular, CPU load, latency, bandwidth, etc.
Because sliced based threading is so inefficient, you may want to sacrifice a little bit of latency to get better user density.

See also #1851 for vp8 / vp9.

Last edited 13 months ago by Antoine Martin (previous) (diff)

comment:2 Changed 13 months ago by J. Max Mena

Okay I will be investigating the automated test box this week. I have a few issues I have to tackle.

Still TODO:

  • Update the box from Fedora 26 -> Fedora 27 since 26 is EOL soon(already?)
  • Fix the virtual display resolution -> currently stuck on a super low res display (likely because it's plugged in to a VGA KVM switch)
  • Figure out why the IPTable rules aren't loading on boot -> No packet accounting

comment:3 Changed 13 months ago by J. Max Mena

Okay the box is updated to Fedora 28 (took much longer than it really should have). The packet accounting is also working again. However it's still not auto-loading the IPTables configuration - I'll have to give yet another different method of loading the IPTables config a try.

I'm going to write a quick bash script to check the H264 performance and also the VPX performance for #1851 and run that in the background today.

I'm also going to write a Python (it occurs to me I could write a Bash script, too) helper file that should make these one-off test runs easier to run. As is I have to write a custom Bash script and run it via nohup since the test box is about a 45 minute drive away and the VPN connection is unstable at best.

comment:4 Changed 7 months ago by Antoine Martin

comment:5 Changed 6 months ago by J. Max Mena

My mathematician is unavailable for a week or so, so I'm going to post the output I've got so far. No charts or anything, just the raw CSVs and logs.

Changed 6 months ago by J. Max Mena

Attachment: h264.zip added

H264 test output data organized by XPRA_X264_SLICED_THREADS value

comment:6 Changed 5 months ago by Antoine Martin

Most of the data is missing from those data files (batch delay, quality, etc), so there is no way of knowing if sliced threads were actually used or not. (that's probably something caused by the xpra info changes in 2.5 - the tests code will need updating if that's the case)

Testing with XPRA_X264_SLICED_THREADS=60 does not do anything since that's the default value. Use 1 to always enable, and 100 to disable.

Also, we want to test the changes in the x264 video encoding settings, so there's not much point in testing "xterm" or "gtkperf" as those aren't meant to trigger any video at all. The only thing these could be useful for would be to see the variance between test runs, but you might as well get that from multiple runs with video.

comment:7 Changed 4 months ago by Antoine Martin

Owner: changed from J. Max Mena to Jonathan Anthony
Note: See TracTickets for help on using tickets.