Log in

View Full Version : How much gain from x86 to x64, and single-thread to MT?


shae
11th July 2017, 13:10
A few questions regarding performance optimization:

* It seems multi-threaded AviSynth and plugins are still considered beta/experimental. And I assume 64-bit, if not beta-ish, is at least not trouble-free to set up, considering the whole encoding chain.

Before delving into that I thought I'd find out if it's worth the trouble. Going from 32-bit to 64-bit, or ST to MT, any idea what can expected specifically for QTGMC?

* Is there a way to get benchmark stats that detail each DLL/EXE separately?

For example, NNEDI3's Intel AVX build didn't work so I defaulted to the generic VS compile. I have no idea how much of QTGMC's processing is spent on NNEDI3, so don't know if I should spend my time trying to solve the AVX DLL problem.

* If the CPU sits at 100% utilization (currently it's at 85%), would that mean no further gains can be expected from multi-threading?

FranceBB
11th July 2017, 21:26
Many Avisynth plugins have their own Multithreading handling system, but for the single thread ones, there's Avisynth MT, which helps a little.
There are various modes in Avisynth MT (different MT modes) in order to prevent Avisynth from crashing, while trying to gain speed.
If you wanna go x64, I would recommend Avisynth+ or VaporSynth over Avisynth, 'cause Avisynth x64 lacks support for many things and it's not as stable as the x86 version.

juhok
11th July 2017, 22:54
With Vapoursynth the speedud was pretty linear with QTGMC for example.

stax76
11th July 2017, 23:09
@shae

You can do benchmarking with avsmeter, QTGMC works quite well with with avs+/vs x64.

poisondeathray
11th July 2017, 23:23
* If the CPU sits at 100% utilization (currently it's at 85%), would that mean no further gains can be expected from multi-threading?

It depends how you tested that or what is being run - are you adding a full encoding pathway or just script + avsmeter or something else? It depends where the bottleneck is




For example, NNEDI3's Intel AVX build didn't work so I defaulted to the generic VS compile. I have no idea how much of QTGMC's processing is spent on NNEDI3, so don't know if I should spend my time trying to solve the AVX DLL problem.


nnedi3 avx/avx2 build doesn't work for me in avisynth x86 either, but works in avisynth+ x64 . I don't know what kind of a speedup the avx2 build has or how much of a factor it's contributing to the speed difference, but I assume it's faster



* It seems multi-threaded AviSynth and plugins are still considered beta/experimental. And I assume 64-bit, if not beta-ish, is at least not trouble-free to set up, considering the whole encoding chain.

Before delving into that I thought I'd find out if it's worth the trouble. Going from 32-bit to 64-bit, or ST to MT, any idea what can expected specifically for QTGMC?


QTGMC alone was ok for 32bit MT, but it could crash when adding additional filters or larger frame sizes . Partially related to memory issues I think.

It seems good and stable so far in 64bit avisynth MT+ , but I only tested a few days so far , not years of observations.

It partially depends on what qtgmc settings, and which cpu architecture and instruction sets are available, and after what processes / encoders and settings are being used . For example, 64bit x264 is consistently a few% faster to encode than 32bit, even when piping 32bit to the 64bit binary


My rough observations on speed multiplier (again depends on QTGMC settings / presets) . I didn't test all configurations


1.0 x86 vanilla avisynth-
1.1-1.2 x64 avisynth+
2.1-2.3 x86 MT avisynth-
2.2-2.4 x64 vpy
2.5-3.0 x64 MT avisynth+



For me , x64 avisynth+ MT seems the fastest with QTGMC alone. The relationship holds when you add some additional filters e.g smdegrain

shae
12th July 2017, 20:23
Thanks for the pointers.

are you adding a full encoding pathway or just script + avsmeter or something else?

That 85% CPU was a full encode.

By "vpy" I guess you mean VapourSynth multithread?

With Vapoursynth the speedud was pretty linear with QTGMC for example.
With how many cores or threads?

poisondeathray
12th July 2017, 20:51
That 85% CPU was a full encode.


But the details matter - for example if you used "very slow" encoding settings that could mean something entirely different than if you used "very fast" ones . You might have some encoder settings bottleneck instead of script in some scenarios


By "vpy" I guess you mean VapourSynth multithread?


yes, it's only multithreaded automatically