GPU based DCP encoding

Anything and everything to do with DCP-o-matic.
kimballstheater
Posts: 6
Joined: Wed Feb 17, 2021 3:59 am

Re: GPU based DCP encoding

Post by kimballstheater »

Carsten wrote: Wed Feb 17, 2021 9:19 pm You need as many cores as possible to speed up the conversion. Even very old CPUs with many cores can be faster than modern higher clocked CPUs with less cores.

It is possible to create a feature DCP at around real-time, that is, 3hrs conversion time for a 3h feature, at modest cost.

https://dcpomatic.com/benchmarks/input.php?id=1



- Carsten
I guess I'm confused. In the reply directly before mine you stated that people are already seeing bottlenecks with very fast CPU's and that much of the post processing is currently Single Core only. I have no issue building the EXACT correct machine to convert DCP's in the fastest time possible (real time would be great) but am conflicted by your responses.
Carsten
Posts: 2804
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: GPU based DCP encoding

Post by Carsten »

Okay, let me try to explain:

A slow CPU will e.g. take 10 hrs to compress the J2Ks for a DCP, and 1hr to pre-/postprocess. Now, you may get a very fast GPU encoder. This may reduce the time to compress the J2Ks to 30mins. But the pre/postprocess still occupies the CPU for 1hr. So, there's a benefit by using the GPU, but it is limited by that part in the conversion that can not be accelerated by a GPU (or multiple cores). And that bottleneck becomes more important the faster your J2K compression goes.
As long as you have a rather slow CPU with few cores/threads, getting a CPU with many cores, even an outdated one, will give you the most bang for the buck.

If you set up e.g. a new system with a Ryzen 7/9 CPU, it will probably cost you around 1000-1200US$ for the CPU and all necessary components. You may be able to buy an old second hand dual Xeon workstation or server for something like 300US$ which will deliver the same conversion speed.
That Ryzen 7 will outperform the old xeon machine in most benchmarks, but not necessarily in DCP-o-matic.

A very fast singlethread CPU (and m2.SSD) with fewer cores will only improve the pre/postprocessing, not necessarily the J2K compression.

You may add some networked PCs, but if they are old, they may only add something like 1-2 fps encoding speed. If you combine multiple fast computers, the Gigabit network connection is quickly saturated. So, best is to have a dual CPU machine.

e.g.

https://www.ebay.de/itm/HP-Z600-2x-Inte ... SwaQtf159-

https://www.ebay.de/itm/HP-Z600-2x-Inte ... SwaQtf159-

https://www.ebay.de/itm/Dell-PowerEdge- ... 1196.m2219
Last edited by Carsten on Thu Feb 18, 2021 10:23 pm, edited 1 time in total.
kimballstheater
Posts: 6
Joined: Wed Feb 17, 2021 3:59 am

Re: GPU based DCP encoding

Post by kimballstheater »

I get it now, Post processing isn't the part we're trying to speed up (at least not really), it's the Conversion itself. I like the idea of dual Xeon setup. Let me ask one last question, does RAM effect the process at all, once you're above the minimum needed for Windows and DCP-o-matic. Meaning, if the version of Windows I have (Win7 Pro as example) and DCP-o-matic consume ~3.5GB then there'd be no real benefit in having 16GB or 32GB (vs 8GB), etc, or does it matter but too small a difference to be noticeable?
Carsten
Posts: 2804
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: GPU based DCP encoding

Post by Carsten »

RAM usage depends on the number of J2K encoding threads configured in prefs (should equal the number of CPU Cores), and wether you are creating 2k or 4k DCPs. 4k DCPs need four times the amount of memory.

Every encoding thread needs a certain amount of RAM - if you use a system with e.g. two 6-core HT CPUs, you should configure at least 2*6*2 =24 threads. 2 CPUs, 6 cores, and double that for a HT CPU (HT cores can execute two threads in parallel).

I think we haven't found a specific number xx GB of RAM per encoding thread (there is some real life variation anyway).

You need to make sure the machine is not getting into swapping to disk during conversion. That will REALLY slow down the encoding, even if the 'disk' is a fast SSD.

My dual xeon systems use 8 and 12GBytes of RAM. That is enough for 2k work. On a current threadripper system, you may want to run other ram-hungry applications as well, like Photoshop, or Premiere/Resolve, and thus it may make sense to have 32GByte. But for a second hand machine or encoding server that is primarily used for DCP-o-matic, 12-16Gbyte is enough. I have configured twice the number of encoding threads testwise on these systems and never ran into RAM issues. However, with 8GB and doing 4k, you may actually need to reduce encoding threads to prevent swapping.


Again, if you are not into buying a high profile system for video editing, but just for DCP-o-matic, it's probably best to buy a very basic second hand system and spend the money you saved into a second similar system that you can use as a network encoding machine. The network encoding server doesn't need more than onboard graphics, a small/slow hd, not even a DVD-drive. But get the highest number of CPU/core combination you can find. If you buy two identical systems, you may also swap components between them as needed or if some component fails. Some of these systems use very specific components, e.g. RAM modules, power supplies, you may not find easily or cheap.

If you're interested in buying a low cost second hand system, I'd be happy to give more advice. Where are you located?

- Carsten
kimballstheater
Posts: 6
Joined: Wed Feb 17, 2021 3:59 am

Re: GPU based DCP encoding

Post by kimballstheater »

I'm in Colorado, USA. Thanks for the replies @Carsten.
Carsten
Posts: 2804
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: GPU based DCP encoding

Post by Carsten »

Okay. I suggest you search ebay for second hand 6 core or 8 core Dual CPU systems. If you had been in the UK, I would have suggested two of these:

https://www.ebay.co.uk/itm/HP-Z600-Work ... Sw9TRf554O

Other types are Dell Precision 7500. You should be able to find something similar in the US.

https://www.ebay.com/itm/Dell-Precision ... SwcqFdho4D

x5650, x5660,x5670,x5675 are suitable 6core CPUs.

Or the next generation - this one looks like a real bargain:

https://www.ebay.com/itm/Dell-Precision ... Sws2dgHzSr

Look for dual E5-2670 CPU systems. Ultimately, you would buy two of these systems (=4 CPUs), put a network cable between them, and you are ready to go. You may want to add SSDs at some later time, but for MKV/MP4->DCP conversion, SSD speed is not essential.

- Carsten
kimballstheater
Posts: 6
Joined: Wed Feb 17, 2021 3:59 am

Re: GPU based DCP encoding

Post by kimballstheater »

So after giving this some thought, would building a RPi4 Cluster be superior to a high end multi-Core AMD CPU? I've been speaking with a PC buddy of mine for a few weeks now and we've settled on an AMD Ryzen 9 3950X (16-Core), 16GB RAM, Samsung EVO 970 M.2 & Win10 LTSB. With Case/PSU/CPU Cooler, etc, this build should clock in about $1000 USD.

Conversely, could we not build a Raspberry Pi 4 Cluster with say 12 units for 48-Cores (each overclocked to between 1.7-2.0 GHZ) for even superior Conversion time at nearly half the cost?

I'm asking because while I agree the dual CPU Xeon PC's would be a more than satisfactory solution at roughly the same price as a RPi Cluster, The Owner of the Business won't approve a purchase of used equipment and being honest, I don't feel that comfortable with used machines either.
Carsten
Posts: 2804
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: GPU based DCP encoding

Post by Carsten »

Then you need to buy an AMD system. Or two and network them.

We thought about RPI clusters a long time ago. Even with the latest RPi4 though, it will not work out, since the more nodes you use, the faster your network is saturated. It is important to begin with the fastest possible single or dual CPU system. The AMD 3950 or 5950 is probably best choice currently.


Have a look at these benchmarks:


https://dcpomatic.com/benchmarks/input.php?id=1


The benefit of used machines is, computer equipment value degrades quickly. If you buy into a sweet spot, you can benefit from that.

- Carsten
kimballstheater
Posts: 6
Joined: Wed Feb 17, 2021 3:59 am

Re: GPU based DCP encoding

Post by kimballstheater »

Thanks again Carsten.
sup
Posts: 45
Joined: Thu Feb 16, 2017 11:07 am

Re: GPU based DCP encoding

Post by sup »

carl wrote: Tue Nov 10, 2020 12:35 pm At the moment, the most likely first "version" of GPU encoding will be for nvidia, on Windows/Linux only (not macOS) and not free.
By the way, is it this one: https://www.fastcompression.com/product ... eg2000.htm ?