Xpra: Ticket #1851: tune vpx threading

Same as #1840 but for libvpx.

Some links:

It looks like part of the reason why vp8 and vp9 are now faster, and why I chose to use vpx more (see ticket:832#comment:22) is that the threading improvements make it faster. This does mean that reducing the threading might reduce the performance too much.

Tue, 22 May 2018 06:43:44 GMT - Antoine Martin:

You can choose the maximum number of threads with:

XPRA_VPX_THREADS=2 xpra start ...

We want to see how this affects frame latency, bandwidth, CPU load, etc. Unlike x264, it looks like we don't have a lot of room for manoeuver here. (the current value is "number-of-cpus" minus 1) Maybe this should be capped at 2 threads.

Wed, 30 May 2018 16:31:24 GMT - J. Max Mena:

I've set up a quick script that should run a series of three tests runs with XPRA_VPX_THREADS set to 1, 2, and 4. For reference the test box is an 8-core system. I'm more curious to see how much of an impact it has on more low-end machines so I'm going to update one of my low-end test boxes and run the tests again on there.

Tue, 11 Sep 2018 14:01:57 GMT - Antoine Martin: description changed

Sat, 09 Feb 2019 03:42:03 GMT - Antoine Martin: owner, status changed

Thu, 01 Aug 2019 12:00:29 GMT - Smo: owner changed

Wed, 07 Aug 2019 19:09:26 GMT - Smo: attachment set

VPX data and charts for threads 1/2/4

Wed, 07 Aug 2019 19:10:41 GMT - Smo: owner changed

I've attached some test data and charts.

The data seems to show that more threads is better.

Can you check these over and let me know if any other action is required.

Thu, 08 Aug 2019 09:53:16 GMT - Antoine Martin: status changed; resolution set

Interesting data:

So, r23474 makes us use fewer threads by default (was number-of-cpus - 1):

>>> import math
>>> for i in range(8):
...  print("%-3i: %2i" % (2**i, math.sqrt(2**i+1)))
1  :  1
2  :  1
4  :  2
8  :  3
16 :  4
32 :  5
64 :  8
128: 11

This can still be overriden using the env var XPRA_VPX_THREADS=

Sat, 23 Jan 2021 05:35:28 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1851