View Full Version : New CPU - Intel or AMD?


Lyris
30th August 2020, 17:12
I'm a little confused on what to buy, because most of the CPU reviews online, for obvious reasons, only give an idea of encode speed with x265 for RE-transcoding already compressed video.

For first-gen encodes from an uncompressed YUV source, the speeds are of course much slower. I'm running a bunch of AMD Threadripper 1950Xs and also one 2990WX. The typical speed for encoding content with film grain on the veryslow preset is about 0.19fps (although on the 32-core 2990WX we can run two chunks concurrently and get about 0.15fps on each).

Supposedly, whatever design issue the 2990WX had which stopped it getting better performance gains has been solved with the new chips, and I'm told that one of the newer, beefier Threadripper CPUs would hopefully show some performance gains.

Or, should I only be looking at Intel - maybe a 10980XE - so we can benefit from the AVX512 extensions? Is anyone else out there running high end CPUs for 4K content encoding, and what sort of speeds are you getting with film sources?

RanmaCanada
31st August 2020, 03:43
AVX512 is only good for 2 things, heat and giving you a higher power bill. If you can wait a little bit, Zen 3 will be released, and it's rumoured to have 15% of so IPC increase over Zen 2. It will be the last to support AM4. If you need it now, I would say get a 3950 with a x570 as you could upgrade to whatever Zen 3 gives. The 3950 is faster than the 10980XE, at stock clocks.

Or if you really need to spend the money, yes the 3000 series Threadrippers destroy everything but we don't know if the current socket for 3000 series Threadripper will work with 4000 series. Maybe replace your 1950x system with a 3950, or even a 3900, which will show massive improvement, believe it or not.

benwaggoner
31st August 2020, 18:54
Or, should I only be looking at Intel - maybe a 10980XE - so we can benefit from the AVX512 extensions? Is anyone else out there running high end CPUs for 4K content encoding, and what sort of speeds are you getting with film sources?
My workstation uses dual Xeon(R) Gold 6240 @ 2.60GHz, 2594 Mhz, 18 Core(s), 36 Logical Processor(s).

A few frames a second pinned to one socket is reasonable using balanced encoding settings. If I try to do veryslow, it can drop below 1 fps.

I've seen AVX512 offer a little speed boost doing 4K @ veryslow or with 8K. The thermal throttling triggered by using AVX512 in current CPUs is a big drag on the theoretical gains. I hope that future updates will have less AVX512 thermal throttling, the same way that... Skylake (?) made AVX2 much more effective by reducing thermal throttling when using it. The perf gain from using AVX2 went from something like 15% to 40% with the scenarios I was looking at, in my dim recollection.

More broadly, from everything I see right now, a recent AMD with lots of cores definately will maximize your content throughput per dollar.

I haven't seen detailed benchmarks of x265 with the Gen 10 Intel consumer CPUs, though. Going dual socket doesn't make a lot of economic sense these days unless you're doing 8K or want to do multiple encodes or an encode with other stuff at the same time. A fast single socket system is going to deliver a lot better throughput for dollar, and multiple sockets only make sense when getting multiple encodes out at once quickly is more valuable important than a few $K.

H2sixty
1st September 2020, 04:30
intel is usually faster, amd has always been better quality (ie less problems/errors with poor power supplies, can run high density ram, etc) amd used to offer military grade chips back in the day... intel buys its chip designs from amd. amd gave birth to 64bit computing. if intel doesn't give you the heebee geebee's, then you should get more bang for your dollar. these trends have been the same between the two companies for decades (quality & bang4dollar)... as for individual chips, prices change all the time. there are websites to compare cpu's. personaly i want 1 core with 32 threads, for higher quality encodes at full speeds, no slices etc... but they still do not sell high thread single core cpus for decades :( and hyper threading does not count, thats fake cpu threads, but does help to leave enabled...

Cary Knoop
1st September 2020, 05:30
I would go AMD all the way!

excellentswordfight
1st September 2020, 13:45
My workstation uses dual Xeon(R) Gold 6240 @ 2.60GHz, 2594 Mhz, 18 Core(s), 36 Logical Processor(s).

A few frames a second pinned to one socket is reasonable using balanced encoding settings. If I try to do veryslow, it can drop below 1 fps.

I've seen AVX512 offer a little speed boost doing 4K @ veryslow or with 8K. The thermal throttling triggered by using AVX512 in current CPUs is a big drag on the theoretical gains. I hope that future updates will have less AVX512 thermal throttling, the same way that... Skylake (?) made AVX2 much more effective by reducing thermal throttling when using it. The perf gain from using AVX2 went from something like 15% to 40% with the scenarios I was looking at, in my dim recollection.

More broadly, from everything I see right now, a recent AMD with lots of cores definately will maximize your content throughput per dollar.

I haven't seen detailed benchmarks of x265 with the Gen 10 Intel consumer CPUs, though. Going dual socket doesn't make a lot of economic sense these days unless you're doing 8K or want to do multiple encodes or an encode with other stuff at the same time. A fast single socket system is going to deliver a lot better throughput for dollar, and multiple sockets only make sense when getting multiple encodes out at once quickly is more valuable important than a few $K.
It seems like ice lake (Sunny Cove) will fix most of the AVX512 downclocking, so it would be intresting to see AVX512 performance for Ice Lake-SP down the line.

https://i.imgur.com/S6tL29Y.png

Atm, not only does AMD Rome offer more cores per $, it also sustain much higher clockspeeds in their repetitive price bracket under multi core loads. I have been using an 7402p and it can keep an 3.3Ghz clock on 48 threads with close to 100% x265 load in an 1u an server!

My guess would be that the fastest out of the box CPU atm for single instance encoding of 4k material should be 3960X. Not only does it has more threads than 10980XE, it will run higher clockspeeds under full load. And dont think going above 48threads will give that much extra performance for single instance encoding, even at 4k.

But tbh I dont think it will get you in to what I would consider manageable speed (but it would probably be a nice gain from 1950Xs/2990WX as 1st and 2th gen Zen do have avx limitations). I would also maybe looking at dropping from 'veryslow' to 'slower'. Cause maybe we get some more performance with Ice Lake-SP/Ice Lake-X (who knows when or if that is coming) or Milan/4th gen threadripper, but I dont think it will be enough to make any major difference in speed for your use case. So it might be best at looking at chunk encoding workflows if you are going to stick with 'veryslow'.

benwaggoner
1st September 2020, 18:45
It seems like ice lake (Sunny Cove) will fix most of the AVX512 downclocking, so it would be intresting to see AVX512 performance for Ice Lake-SP down the line.

https://i.imgur.com/S6tL29Y.png
Alas, that chart's range starts pretty high. It's about at 15% improvement, which is welcome, but not revolutionary. Perhaps enough to justify having AVX512 on by default on Sunny Cove, though. But hey, 10th gen chips are already available to the consumer; I bought my fiancé a 10th gen laptop last month ("Intel Core i7-10510U CPU @ 1.80GHz, 2304 Mhz, 4 Core(s), 8 Logical Processor(s)"). Has anyone tested AVX-512 perf on these yet?

What's the difference between 512L and 512H?

My guess would be that the fastest out of the box CPU atm for single instance encoding of 4k material should be 3960X. Not only does it has more threads than 10980XE, it will run higher clockspeeds under full load. And dont think going above 48threads will give that much extra performance for single instance encoding, even at 4k.
>48 with pmode and a bunch of frame threads for 4K is probably helpful, but perf gains will definitely be nonlinear.

But tbh I dont think it will get you in to what I would consider manageable speed (but it would probably be a nice gain from 1950Xs/2990WX as 1st and 2th gen Zen do have avx limitations). I would also maybe looking at dropping from 'veryslow' to 'slower'. Cause maybe we get some more performance with Ice Lake-SP/Ice Lake-X (who knows when or if that is coming) or Milan/4th gen threadripper, but I dont think it will be enough to make any major difference in speed for your use case. So it might be best at looking at chunk encoding workflows if you are going to stick with 'veryslow'.
And slower is really most of the all the "good stuff" of HEVC and x265 kicks in. The "style" of encoding quality doesn't change between slower and placebo.

I'd generally prefer to add --tskip --tskip-fast to slower than move to the stock veryslow. Tskip doesn't do much for natural image content, but offers huge gains with animation and motion graphics.

Lyris
1st September 2020, 20:56
Thanks, all. It seems like AVX512 isn't all that. As a result, I've ordered a 3950X. I'll report back with the speeds I'm getting on it.

In the future I'll probably replace one of the 1950Xs with one of the beefier newer Threadrippers. The idea of being able to use the same motherboard is tempting.

RanmaCanada
1st September 2020, 22:06
Thanks, all. It seems like AVX512 isn't all that. As a result, I've ordered a 3950X. I'll report back with the speeds I'm getting on it.

In the future I'll probably replace one of the 1950Xs with one of the beefier newer Threadrippers. The idea of being able to use the same motherboard is tempting.

You can not use 3rd gen Threadrippers on 1st-2nd gen boards.

https://www.notebookcheck.net/AMD-justifies-the-shift-to-sTRX4-socket-for-3rd-gen-Threadrippers-and-promises-long-term-support-but-current-Threadripper-owners-appear-to-be-unconvinced.442727.0.html

excellentswordfight
2nd September 2020, 15:29
Alas, that chart's range starts pretty high. It's about at 15% improvement, which is welcome, but not revolutionary. Perhaps enough to justify having AVX512 on by default on Sunny Cove, though. But hey, 10th gen chips are already available to the consumer; I bought my fiancé a 10th gen laptop last month ("Intel Core i7-10510U CPU @ 1.80GHz, 2304 Mhz, 4 Core(s), 8 Logical Processor(s)"). Has anyone tested AVX-512 perf on these yet?

What's the difference between 512L and 512H?

I think it stands for "light" and "heavy".

I found this test for ice lake-U

https://travisdowns.github.io/blog/2020/08/19/icl-avx512-freq.html

"The Ice Lake i5-1035 CPU exhibits only 100 MHz of licence-based downclock with 1 active core when running 512-bit instructions.
There is no downclock in any other scenario.

The all-core 512-bit turbo frequency of 3.3 GHz is 89% of the maximum single-core scalar frequency of 3.7 GHz, so within power and thermal limits this chip has a very “flat” frequency profile.

Unlike SKX, this Ice Lake chip does not distinguish between “light” and “heavy” instructions for frequency scaling purposes: FMA operations behave the same as lighter operations."

The same all core clockspeed of 3.3Ghz is achieved regardless of AVX load/type.

benwaggoner
2nd September 2020, 16:59
I think it stands for "light" and "heavy".

I found this test for ice lake-U

https://travisdowns.github.io/blog/2020/08/19/icl-avx512-freq.html

"The Ice Lake i5-1035 CPU exhibits only 100 MHz of licence-based downclock with 1 active core when running 512-bit instructions.
There is no downclock in any other scenario.

The all-core 512-bit turbo frequency of 3.3 GHz is 89% of the maximum single-core scalar frequency of 3.7 GHz, so within power and thermal limits this chip has a very “flat” frequency profile.

Unlike SKX, this Ice Lake chip does not distinguish between “light” and “heavy” instructions for frequency scaling purposes: FMA operations behave the same as lighter operations."

The same all core clockspeed of 3.3Ghz is achieved regardless of AVX load/type.
Wow, that's really promising for AVX-512 value!

I'll see if I can pry my sweetie's laptop away from her for a few hours and run some tests with and without AVX-512.

Lyris
4th September 2020, 00:13
So, from the 0.19fps of the 1950X and sometimes the 2990WX, the 3950X is delivering me 0.33fps in identical conditions, which is obviously a huge jump. Very happy, especially since I could re-use an old power supply and use a Noctua cooler that I've had since 2012 on the AM4 platform with a new mounting kit.

hajj_3
7th November 2020, 09:11
The AMD Ryzen 5000 series (zen3) reviews are out now, they have real AVX2 256bit instead of 2x128bit and have a 19% ipc increase over ryzen 3000 (zen2): https://www.anandtech.com/show/16214/amd-zen-3-ryzen-deep-dive-review-5950x-5900x-5800x-and-5700x-tested/15

They are the faster than any intel chips at encoding video.

birdie
8th November 2020, 13:56
https://images.hothardware.com/contentimages/article/3039/content/x265-amd-ryzen-5000.png

https://overclock3d.net/gfx/articles/2020/11/04131621345l.jpg

https://www.kitguru.net/wp-content/uploads/2020/11/CPU-HB-265.png

https://cdn.mos.cms.futurecdn.net/RUKUvkrxCoDFKci47sYBtZ-1920-80.png

https://cdn.mos.cms.futurecdn.net/G2LNBjnNBtmG5f4U2E2yTa-1920-80.png

https://cdn.mos.cms.futurecdn.net/rJWrHb5iUVQvciKK8Rjr6X-1920-80.png

https://images.anandtech.com/graphs/graph16220/119149.png

birdie
8th November 2020, 14:01
10980XE is slower than 5900X almost all the time.

Asmodian
9th November 2020, 01:53
10980XE is slower than 5900X almost all the time.

The new Zen3 CPUs make the OP's question very easy today. :p

The 5900X and 5950X are a very good deal for x265 encoding. A 32 or 64 core Zen3 Threadripper should be amazing.

charliebaby
9th November 2020, 09:26
wait for AMD 5950x

wlee15
11th November 2020, 09:06
The AMD Ryzen 5000 series (zen3) reviews are out now, they have real AVX2 256bit instead of 2x128bit and have a 19% ipc increase over ryzen 3000 (zen2): https://www.anandtech.com/show/16214/amd-zen-3-ryzen-deep-dive-review-5950x-5900x-5800x-and-5700x-tested/15

They are the faster than any intel chips at encoding video.

Zen 2 had 256-bit, it was the original Zen that had 128-bit AVX.

ShortKatz
11th November 2020, 13:21
I am very curious to see how fast the HEVC encoding will be on Apples M1 chip.

benwaggoner
11th November 2020, 16:44
I am very curious to see how fast the HEVC encoding will be on Apples M1 chip.
Big parallel SIMD sustained workloads aren't really ARM's sweet spot. I imagine the M1 will be the best software encoding ARM processor ever, but would be surprised if it could beat an Intel Tiger Lake (11th gen) i7 1185G7. M1 may be able to beat that in fps/watt for the CPU itself. Intel and AMD have demonstrated the power of a whole lot of beefy x64 cores running at a high TDP for encoding operations.

Nico8583
1st January 2021, 20:33
Hi, happy new year all :)
I just have a question : I can read there is an impact on the final quality when the cores number grows up. Is it still happening ? I have a 3700X (8 cores) and I would like to know if I can go to a 3900X/3950X/5900X (12 to 16 cores) without losing quality vs my 3700X.
Thank you !

Boulder
2nd January 2021, 14:11
I've never seen any difference whatsoever, jumped myself from 1800X to 3900X. Even setting -F 1 really did nothing visibly different compared to -F 4. The filesize differences are very small at the same CRF which tells me that the content cannot differ much either.

Nico8583
3rd January 2021, 02:12
Thank you, so perhaps I'll replace my 3700X by 3900X ;)

benwaggoner
6th January 2021, 02:11
I just have a question : I can read there is an impact on the final quality when the cores number grows up. Is it still happening ? I have a 3700X (8 cores) and I would like to know if I can go to a 3900X/3950X/5900X (12 to 16 cores) without losing quality vs my 3700X.
The default values of --frame-threads and --lookahead-threads go up with the number of logical cores available. In the past there were significant quality regressions using higher numbers of frame-threads and a few seen with --lookahead threads. Thus, more cores COULD reduce quality, although the gap is much smaller than it used to be. But if those values were set explicitly, quality would be the same regardless of number of threads. Of course, lowering those values also decreases parallelization and thus the maximum number of additional cores that can be productively used.

When I'm doing mission-critical quality encodes at lower resolutions with lots of cores, I'll set -F 1 and use --pmode.

blublub
18th January 2021, 22:33
So basically just leave it at auto/default? - frame-thread I mean

benwaggoner
19th January 2021, 22:48
So basically just leave it at auto/default? - frame-thread I mean
Sometimes I lower it to squeeze out maximum quality, but I almost never increase it.

K.i.N.G
25th January 2021, 14:36
Currently: AMD no doubt.

benwaggoner
25th January 2021, 19:32
I've never seen any difference whatsoever, jumped myself from 1800X to 3900X. Even setting -F 1 really did nothing visibly different compared to -F 4. The filesize differences are very small at the same CRF which tells me that the content cannot differ much either.
The issues with higher -F weren't really seen in ABR, since they only impacted some scene changes. To find those, I would do a --log-level 2 and look at QP spikes or SSIM drops for particular frames. Worse-cases were a lot worse with lots of frame threads.

That said, I've not really seen any reproducible issues with -F >2 for a couple of years, although I've not been testing it much either.

Forteen88
31st January 2021, 10:39
Thank you, so perhaps I'll replace my 3700X by 3900X ;)Why not replace it with the new AMD Ryzen 5000-series? That is, if your motherboard supports that (after BIOS update).
Although if you find a used 3900X for a cheap price, it would be a good buy.

Nico8583
31st January 2021, 10:57
Why not replace it with the new AMD Ryzen 5000-series? That is, if your motherboard supports that (after BIOS update).
Although if you find a used 3900X for a cheap price, it would be a good buy.
Yes, a 5800X or 5900X should be a great choice but at an expansive price now. My CM is a B450M Mortar Max, the november BIOS seems to add the 5000 series support.

tormento
31st January 2021, 19:33
In the urge of buying, if 5xxx would be available, I'd probably buy it.

If the choice is 3xxx perhaps much better a Intel CPU with AVX512 support.

DJATOM
31st January 2021, 20:57
Unfortunately avx512 is not a panacea.

Nico8583
31st January 2021, 21:29
I would like to find a real conditions comparison (same x265 version, same settings, 4K slow or slower if possible) between 3700X / 3900X / 5800X / 5900X. Do you know where can I find it ? I would like to know the gain on a whole movie encode (example : a 4K movie - duration 2 hours). Thank you.

RanmaCanada
31st January 2021, 23:28
I would like to find a real conditions comparison (same x265 version, same settings, 4K slow or slower if possible) between 3700X / 3900X / 5800X / 5900X. Do you know where can I find it ? I would like to know the gain on a whole movie encode (example : a 4K movie - duration 2 hours). Thank you.

There was that great benchmark that Sagittaire had created (https://forum.doom9.org/showthread.php?t=174393) which gave you real world results, it just has not been updated in 3 years.

Techpowerup (https://www.techpowerup.com/review/amd-ryzen-9-5900x/14.html)does all their x265 benchmarking in their reviews at CRF20 preset slow. This is probably the best source, though it is only 1080p. Ideally if the real world x265 benchmark that Sagittaire created could be updated, we could poll the users here for more updated information.

In my opinion the benchmarks that use anything above medium do not represent real world usage. If someone could update the bench Sagittaire created, I am sure it would answer a lot of our questions.

Nico8583
31st January 2021, 23:39
Thank you for these informations. I'll look at Techpowerup x265 benchmarking in order to have an idea at 1080p.
And I'm agree with you about medium and above.

Nico8583
1st February 2021, 12:28
The video length is missing from Techpowerup bench or I don't see it ? Thank you.
Thank you w1zzard from Techpowerup, very responsive. Duration : 47 seconds

Nico8583
1st February 2021, 14:51
Video duration (CRF20, slow, 1080p) : 47s -> 2h
i9 9900K : 85.57s (0.55x) -> 3.6h
Ryzen 7 3700X : 77.08s (0.61x) -> 3.3h
Ryzen 9 3900X : 63.76s (0.74x) -> 2.7h
Ryzen 7 5800X : 63.32s (0.74x) -> 2.7h
Ryzen 9 5900X : 53.38s (0.88x) -> 2.3h

quietvoid
1st February 2021, 15:23
Keep in mind that x265 rarely saturates over 8 cores on its own, regardless of the settings or parallelism optimizations (such as --pme, --pmode, etc.)
With my 5900X, it barely uses over 60% of the CPU with preset slower.

Nico8583
1st February 2021, 15:50
Keep in mind that x265 rarely saturates over 8 cores on its own, regardless of the settings or parallelism optimizations (such as --pme, --pmode, etc.)
With my 5900X, it barely uses over 60% of the CPU with preset slower.
Very interesting, it's a temporary limitation ?
So the gain between 3700X and 5900X will not be very very important ?

quietvoid
1st February 2021, 15:57
I doubt x265 will improve on this, so it's not temporary.
More cores is still better, you can see from your results that the 5900X is 45% faster, 15-20% might be the IPC improvement, the remaining 25% is probably the extra cores.

x265 just doesn't fully load the cores most of the time.
One way I've found that improves around 10% is to use a lower --merange and increase frame threads, but that doesn't improve the core saturation much.

benwaggoner
1st February 2021, 18:20
Keep in mind that x265 rarely saturates over 8 cores on its own, regardless of the settings or parallelism optimizations (such as --pme, --pmode, etc.)
With my 5900X, it barely uses over 60% of the CPU with preset slower.
Thread utilization is proportional to frame size. 4K can saturate 16 threads pretty easily with the right configurations. I've got a dual Xeon (2x18/36 cores) and generally use --pools to pin 4K or lower encodes to one or the other as the second socket rarely adds any perf. But for 8K, I'm able to get some value out of the second socket with default --frame-threads.

I've never had --pme give me material improvements, but haven't tried for a few years; it'd be most likely in low resolutions using --preset placebo or something. --pmode can definitely help in some configurations, but is slower in others. It's more helpful with slower presets, presumably because a lot more modes are being evaluated to parallelize.

Atak_Snajpera
1st February 2021, 19:59
I doubt x265 will improve on this, so it's not temporary.
More cores is still better, you can see from your results that the 5900X is 45% faster, 15-20% might be the IPC improvement, the remaining 25% is probably the extra cores.

x265 just doesn't fully load the cores most of the time.
One way I've found that improves around 10% is to use a lower --merange and increase frame threads, but that doesn't improve the core saturation much.

CPU utilization is most likely reduced by default --ctu 64 value. Use --ctu 32 --merange 25

quietvoid
1st February 2021, 20:09
Yes ctu 32 does increase usage, but it's also slightly lower quality.
It's a compromise.

microchip8
1st February 2021, 20:13
Yes ctu 32 does increase usage, but it's also slightly lower quality.
It's a compromise.

Slightly lower quality at 4K and up. The same quality at lower resolutions (FHD and lower)

Nico8583
1st February 2021, 20:27
Thank you, I'm still hesitating to replace my 3700X by 3900X, 5800X or 5900X. The only real difference between all is only the encoding time ?

microchip8
1st February 2021, 20:56
Thank you, I'm still hesitating to replace my 3700X by 3900X, 5800X or 5900X. The only real difference between all is only the encoding time ?

If you use the same settings, yes. But if you get a Zen 3 CPU you can increase the settings for better compression/quality and comparable encoding time to Zen 2 CPUs

Nico8583
1st February 2021, 21:28
If you use the same settings, yes. But if you get a Zen 3 CPU you can increase the settings for better compression/quality and comparable encoding time to Zen 2 CPUs
Yes but I can increase settings with my Zen 2 also, the time will be perhaps 36 hours with Zen 2 instead of 24 hours with Zen 3 ? There is no setting I can use with Zen 3 and not with Zen 2 ?

microchip8
1st February 2021, 21:53
Yes but I can increase settings with my Zen 2 also, the time will be perhaps 36 hours with Zen 2 instead of 24 hours with Zen 3 ? There is no setting I can use with Zen 3 and not with Zen 2 ?

That's not what I was saying.

If you get 2 FPS with your Zen 2 CPU and current settings, when you get a Zen 3 CPU, you can increase the settings and get the same 2 FPS as the Zen 2 CPU, but with better compression/quality. If you increase the settings on your current Zen 2 CPU, you will get (much) lower FPS encoding.

In other words, Zen 3 allows you to get comparable FPS as Zen 2 but with increased settings. Of course you can increase the settings for your Zen 2 CPU, but the FPS will be much lower

Nico8583
1st February 2021, 22:33
That's not what I was saying.

If you get 2 FPS with your Zen 2 CPU and current settings, when you get a Zen 3 CPU, you can increase the settings and get the same 2 FPS as the Zen 2 CPU, but with better compression/quality. If you increase the settings on your current Zen 2 CPU, you will get (much) lower FPS encoding.

In other words, Zen 3 allows you to get comparable FPS as Zen 2 but with increased settings. Of course you can increase the settings for your Zen 2 CPU, but the FPS will be much lower
Thank you and don't worry, it was not an observation ;)
Perhaps there is a setting too "high" to be used with Zen 2 (because of a lack of power or another reason), my question was in this sense :)

Boulder
2nd February 2021, 17:05
If you can get any of those new Ryzens, definitely grab one. Encoding is cheaper since it's more computing power per watt. Otherwise a good option might be to buy a second hand 3900X on the cheap. The extra threads do give a nice boost.

CTU 64 is in my opinion a bad idea. There is something definitely wrong there because --limit-tu 0 --ctu 64 --rskip 2 is just totally broken. I don't trust it at all because of that observation.
https://forum.doom9.org/showthread.php?p=1919347#post1919347

Nico8583
2nd February 2021, 17:52
If you can get any of those new Ryzens, definitely grab one. Encoding is cheaper since it's more computing power per watt. Otherwise a good option might be to buy a second hand 3900X on the cheap. The extra threads do give a nice boost.

CTU 64 is in my opinion a bad idea. There is something definitely wrong there because --limit-tu 0 --ctu 64 --rskip 2 is just totally broken. I don't trust it at all because of that observation.
https://forum.doom9.org/showthread.php?p=1919347#post1919347
What are the default values ? ctu=64, limit-tu=0 and rskip ?

benwaggoner
2nd February 2021, 18:11
CTU 64 is in my opinion a bad idea. There is something definitely wrong there because --limit-tu 0 --ctu 64 --rskip 2 is just totally broken. I don't trust it at all because of that observation.
https://forum.doom9.org/showthread.php?p=1919347#post1919347
I use ctu 64 regularly without any issues. In the early days I did see some reproable quality issues with ctu 64 sometimes, but it's been years.

Boulder
2nd February 2021, 19:15
I use ctu 64 regularly without any issues. In the early days I did see some reproable quality issues with ctu 64 sometimes, but it's been years.

That one is definitely reproducable with that sample clip of mine, and it's not so long ago. Actually when they implemented the new rskip options some time ago.

Boulder
2nd February 2021, 19:16
What are the default values ? ctu=64, limit-tu=0 and rskip ?

The default depends on the preset. --limit-tu is 4 or 0, ctu 64 and rskip 1.

Nico8583
2nd February 2021, 20:11
The default depends on the preset. --limit-tu is 4 or 0, ctu 64 and rskip 1.
Thanks, I'm watching the preset values to compare

Nico8583
2nd February 2021, 20:15
A last question to be sure : if I use a 3700X (8 cores / 16 threads) with x265's default settings, just --preset slow (it's an example), it will produce an encoded file. If I use a 3900X (12 cores / 24 threads) with x265's default settings --preset slow, it will produce a different encoded file because core number is higher, right ?
Now if I use a 5800X (8 cores / 16 threads), is the produced file will be exactly the same than the 3700X encoded file ? Because there are both 8 cores 16 threads ?

DJATOM
2nd February 2021, 21:01
I'm not sure if results are deterministic at all... But yeah, bitrate should be the same in all cases.

apophis906
2nd February 2021, 22:51
A last question to be sure : if I use a 3700X (8 cores / 16 threads) with x265's default settings, just --preset slow (it's an example), it will produce an encoded file. If I use a 3900X (12 cores / 24 threads) with x265's default settings --preset slow, it will produce a different encoded file because core number is higher, right ?
Now if I use a 5800X (8 cores / 16 threads), is the produced file will be exactly the same than the 3700X encoded file ? Because there are both 8 cores 16 threads ?

The files will be the same as long as the settings are the same. I have tested on an i3-2700M, a i7-6700, and 3700x. The same test file with the same settings ends up the exact same output in bitrate and size. The difference is in the time it takes to encode it.

Nico8583
3rd February 2021, 05:49
Thank you and you changed --frame-threads and --lookahead-threads values in your settings ?

apophis906
3rd February 2021, 07:22
Thank you and you changed --frame-threads and --lookahead-threads values in your settings ?

No I left them on auto. So the i3 has 2 frame threads and 4 thread pool, the i7 has 3 frame threads and 8 thread pool, and of course the 3700x has 4 frame threads and 16 thread pool. From the testing I have tried it looks like the output is the same with more cores. The only time I have ever seen a different output was when trying out setting it to 1 frame thread, 2 and up give the same results. So I would think that a 16 core would produce the same output as an 8 core with the same settings.

excellentswordfight
3rd February 2021, 13:05
Just to add some numbers regarding utilization with threading options left at default:

--main10 --preset slow --crf18 on an 24C/48T Eypc Rome:

1080p Bluray source:

With CTU 64 & Merange 57: 25-35%
With CTU 32 & Merange 26: 50-70%

2160p UHD Bluray source:

With CTU 64 & Merange 57: 50-95% (24threads pinned at 100%, the other 24 is very unstable).

1080p with CTU 32, and UHD at default should give great saturation up to 16/32 for single instance encoding. 5950X is likely the fastest single instance encoding processor you can get for these cases atm (I would guestimate that it would beat 3960X & whatever intel has to offer including all xeons).

Atak_Snajpera
3rd February 2021, 15:47
CPU usage should be even higher if you do some heavy filtering like denoising in avisynth (MDegrain + prefetch 24)

benwaggoner
3rd February 2021, 23:30
CPU usage should be even higher if you do some heavy filtering like denoising in avisynth (MDegrain + prefetch 24)
But how many threads can those algorithms usefully use at once? Temporal denoising can be hard to parallelize because it is an interframe analysis process. But possible if each frame is doing forward and backward comparisons without reusing other analysis of the same frames. Can double the total CPU, but offer a lot better parallelism.

DJATOM
4th February 2021, 00:05
Modern video processing frameworks relying on caches, no need to compute stuff twice. Just pick cached frame and reuse or fallback to full processing on cache misses. With high amount of RAM MDergain is fast enough.

Atak_Snajpera
4th February 2021, 21:55
But how many threads can those algorithms usefully use at once? Temporal denoising can be hard to parallelize because it is an interframe analysis process. But possible if each frame is doing forward and backward comparisons without reusing other analysis of the same frames. Can double the total CPU, but offer a lot better parallelism.

MDegrain works very well with prefetch equal to number of physical cores.

Nico8583
18th August 2021, 13:36
Hi,
Does anyone already compare 3900X and 5900X in real conditions (x265 1080p and 4K) ? With the same settings, what is the expected perf difference between both ?
Thanks !

RanmaCanada
18th August 2021, 17:36
Hi,
Does anyone already compare 3900X and 5900X in real conditions (x265 1080p and 4K) ? With the same settings, what is the expected perf difference between both ?
Thanks !

Just look at the new benchmark thread from Sagitarre.

https://forum.doom9.org/showthread.php?t=174393&page=4

The 3900x is barely ahead of the 5800x.

Nico8583
27th August 2021, 14:13
Just look at the new benchmark thread from Sagitarre.

https://forum.doom9.org/showthread.php?t=174393&page=4

The 3900x is barely ahead of the 5800x.
Thanks ;)

tonemapped
3rd September 2021, 07:31
I've just ordered an AMD 5900x and RTX 3080 for encoding (NVENC still has a few use cases outside of streaming). The reason for the 5900x (or even going for a 3000-series or any other 5000-series) is power savings, less heat, and better value for money with multithreaded workloads such as encoding. As it stands, I would recommend AMD (I believe that's the first time I've written that since I purchased an Athlon 64 X2 as a child!).

mindphasar
12th September 2021, 14:13
Intel processors (11 gen) with the internal video card UHD Graphics 750 are good for x265 encoding? or better to buy an AMD processor without internal video card?

DJATOM
12th September 2021, 21:04
I assume AMD will be better (HW encoding usually performs worse than SW), and 8 big + 8 small cores might make things slower against full-power 16 cores by AMD. So just wait for actual release and check speed comparisons before buy.

benwaggoner
13th September 2021, 17:42
Intel processors (11 gen) with the internal video card UHD Graphics 750 are good for x265 encoding? or better to buy an AMD processor without internal video card?
There's no downside to having an integrated GPU, but there's no upside either for x265 itself. Depending on workflow, the GPU can be used to accelerate source decode and potentially some preprocessing operations. And there's the potential to use a HW first pass and the reuse the initial analysis in x265 for a moderate speed boost, but it's a hassle to get configured, and speed up is maybe 25% if done without quality loss.

I don't know anyone doing that in practice for file-to-file encoding.

microchip8
13th September 2021, 17:50
Intel processors (11 gen) with the internal video card UHD Graphics 750 are good for x265 encoding? or better to buy an AMD processor without internal video card?

Intel's latest generation CPUs are power consuming monsters. Keep that also in mind. I'd opt for an AMD at the moment

Balling
16th September 2021, 09:47
You can root Intel Chipset Minix OS and get access to ucode and modify it. So Intel, of course. What a dumb question! Just simply picosecond precision digital analyser inside is already equvivalent to millions of $.

shootah
20th September 2021, 19:13
I'm also searching for new CPU, Ryzen 7 5800X would be my max budget, is this the best what I can buy for that money?
What fps should I expect on 5800X encoding x265 from 1080p, AVC source using CRF profile fast?

ChaosKing
20th September 2021, 19:39
There's no downside to having an integrated GPU, but there's no upside either for x265 itself.

All ryzen cpus with a integrated GPU have a smaller L3 cache. So there's a small downside :D

excellentswordfight
20th September 2021, 19:42
I'm also searching for new CPU, Ryzen 7 5800X would be my max budget, is this the best what I can buy for that money?
What fps should I expect on 5800X encoding x265 from 1080p, AVC source using CRF profile fast?
Techpowerup has a decent test x265 test which you can use for some speed comparison between models.

https://tpucdn.com/review/intel-core-i7-11700kf/images/encode-h265.png

Not sure about the speed as I rarely use preset fast, nor own an 5800x, but I would guestimate that it would be in in the 50fps+ range.

FranceBB
21st September 2021, 00:34
Out of curiosity, still no AVX512 in the new AMD CPUs, right?

Asmodian
21st September 2021, 00:47
Right, no AVX512 in any of the announced, or even rumored, AMD CPUs.

However, Zen3 CPUs encode with x265 very quickly, so the lack of AVX512 is not really a minus for x265 encoding.

butterw2
21st September 2021, 15:59
Intel 11th gen desktop igpu has a good hardware hevc encoder (in addition to an av1 hardware decoder).

avx512 isn't reported as being available with 12th gen Intel desktop (releasing Q4 2021).

nevcairiel
21st September 2021, 17:39
Rumors have it that Zen4 might have AVX512, which would be an odd situation as Intel has pulled it from consumer Alder Lake, if AMD brings it to consumer desktop.
But those rumors might as well be totally off, as typical consumers would only see a small benefit ... but of course AMD uses the same cores for the entire lineup, so who knows.

shootah
21st September 2021, 18:20
Not sure about the speed as I rarely use preset fast, nor own an 5800x, but I would guestimate that it would be in in the 50fps+ range.

Great, 50 fps is huge improvement for me!

DTL
8th February 2023, 08:52
Rumors have it that Zen4 might have AVX512, which would be an odd situation as Intel has pulled it from consumer Alder Lake, if AMD brings it to consumer desktop.
But those rumors might as well be totally off, as typical consumers would only see a small benefit ... but of course AMD uses the same cores for the entire lineup, so who knows.

At the end of 2022 AMD start to support some good set of AVX512 instructions in Zen4 7xxx chips. But may be not at the full rate (512bits per dispatch) and only by 256bits parts (so instructions per cycle about half of expected). But it most probably support full sized 2 kBytes register file for AVX512 and even separated register files for integer and floats (so 2x2 kBytes per core). It also helps to performance if program manually designed to use such 'large for desktop CPU' register file or C compiler was configured to AVX512 architecture and can use additional register space.

May be in the next generation of chips AMD will support AVX512 instructions dispatch at 'full rate' and it can help to performance more.

Nowdays more desktop developers with AMD 7xxx chips can make and test AVX512 software without using Intel SDE that only fully support up to Visual Studio 2017 (old enough).

benwaggoner
8th February 2023, 19:01
Even if IPC of AVX512 is half that of AVX2 for many operations, that will still reduce instruction bandwidth which might have some benefit. There's also the permute stuff added in AVX512 which seems like it could simplify some algorithms and optimization if well utilized. I'm not sure how deep the x265 AVX512 optimization goes in that direction.

MCW dialed back on further AVX512 work after it was discovered that AVX512'S thermal down clocking made it a net negative for perf in most scenarios.

Getting a good Zen4 tuned profile driven optimized binary to test with would reveal much. I'd expect to see some increased benefit with 4K encoding and hopefully 1080p with slower presets. AVX512 on Xeon to date has really only shown net improvements at 4K veryslow, and even then <20%.

Anyone know about AVX512 improvements in the 2023 Xeons?

For AWS EC2 cloud encoding, Graviton2 already offers a lot better throughput/$ than c5 Xeon instances. For cloud at least, x86-64 isn't the only game in town anymore.

DTL
8th February 2023, 20:33
One useful feature of 4x larger register file of AVX512 x64 in compare with AVX2 is ability to process more blocks in motion estimation per pass or larger sized blocks or have more search radius without reloading register file from cache (it cost about 5 or more clockticks even from closest L1D cache and riune performance about several times). So more manually optimized functions from x265 developers for AVX512 architecture may show more performance boost in the future.

"Getting a good Zen4 tuned profile driven optimized binary to test with would reveal much. "

Are there any architecture optimized builds of x265 (for AVX512-Intel (families) or for AVX512-AMD (Zen4) avaialble for download and test ?

I tried quickly make builds but fast result was only with MSVC with 2020-dated sources from github (and its /arch:AVX512 build at i5-11600 runs even slightly slower in compare with /arch:AVX2, but MSVC 16 is not best optimizing compiler for Intel's AVX512 architecture). Newer sources either not run cmakeconfigure to build solution or not link .obj files with Intel C 19.1 compiler. Need more time for solving build errors. It is nice if x265 community already provide optimized builds for AVX512 for endusers.

"about AVX512 improvements in the 2023 Xeons?"

As I see Xeons have some better optimized memory (cache and RAM) controller for multithreading (multicoring) in compare with desktop chips for poor people. So Xeons may also better benefit from wide bus transfers and wide words computing. As nowdays intel again drop support for AVX512 in desktop chips - it looks with poor memory controller at cheap (sub $1000 chips) it still very unbalanced setup of too fast computing core and too slow memory and not worth of marketing at dying desktops market.

Blue_MiSfit
9th February 2023, 05:48
For AWS EC2 cloud encoding, Graviton2 already offers a lot better throughput/$ than c5 Xeon instances. For cloud at least, x86-64 isn't the only game in town anymore.

Is this the case for x264 and x265 encoding? I know there have been lots of ARM SIMD optimizations but I'd be kind of surprised if those surpass the level of x86_64 optimization. Does it just not matter and you come out ahead?

We already use Graviton for our database workloads and are moving some of our JVM workloads there as well, but I was under the impression that standard x264/x265 work was still more cost efficient on AMD instances in EC2 ~generally~ speaking :)

Boulder
9th February 2023, 13:57
Getting a good Zen4 tuned profile driven optimized binary to test with would reveal much. I'd expect to see some increased benefit with 4K encoding and hopefully 1080p with slower presets. AVX512 on Xeon to date has really only shown net improvements at 4K veryslow, and even then <20%.


Once Media Autobuild Suite goes GCC 13, that should be available. I don't know how much you can expect out of some compiler made optimizations though. On a Zen 3, the difference is a couple of % (using 'znver3' as target) against a generic build.

DTL
9th February 2023, 18:36
Google shows article from intel:
https://www.intel.com/content/dam/develop/external/us/en/documents/mcw-intel-x265-avx512.pdf

Accelerating x265 with Intel®
Advanced Vector Extensions 512

Diagrams shows really not very nice gain. It looks programmers of x265 need significantly new processing approaches to use 4x larger register file and 2x larger dataword per instruction (about up to 4x*2x=8x hardware performance boost - also superscalarity allow to execute several AVX512 instructions at different dispatch ports if this instruction supported at several dispatch ports and no data dependency exist) of AVX512 over AVX2 to make at least 2x performance gain instead of just a few %. At least at full-blood Xeons with many memory channels and better cache controller in compare with poor-people's desktop chips.

One of the reason of too few benefit of AVX512 versions over AVX2: With era of AVX2 the programmers design workunit to compute for the size of 512 bytes register file of AVX2 CPUs. So simple usage of AVX512 instructions with the same workunit size may double in theory performance but the workunit reload rate from caches and main RAM is still high. So memory bounding is same as with AVX2 design.

The moving to AVX512 architecture require also increasing workunit size to about 4x in size and such software may take very high performance penalty if trying to use this workunit size on old architectures (AVX2) with smaller register file size (compiler will accept intrinsics-based program with overusage of register file but will fill output binary with reloads from cache and it will drop performance significantly). Also as I see x265 uses external assembly handcoded. So need to handwrite new AVX512 functions using larger workunit size and this will be significant separate part of x265 with only good performance at AVX512 chips (and mostly unusably slow on older). As befiore AMD 7xxx enduser chips the AVX512 was very rare at the desktops - there were too few reasons (there may be no investors to re-design x265 separate branch to AVX512) to put typically limited developers resources to making separate version of x265 for rich-people servers in freeware opensource project. And now as we got more AVX512 chips at desktops the total developers activity at opensource looks almost died - so simply no one left to make one more redesign of x265 for new offered architecture at desktop chips. May be we will see some progress in 202x years if AMD will keep AVX512 at cheap desktop chips for at least several years.

benwaggoner
10th February 2023, 22:51
One of the reason of too few benefit of AVX512 versions over AVX2: With era of AVX2 the programmers design workunit to compute for the size of 512 bytes register file of AVX2 CPUs. So simple usage of AVX512 instructions with the same workunit size may double in theory performance but the workunit reload rate from caches and main RAM is still high. So memory bounding is same as with AVX2 design.
Very interesting! Does anyone know if the existing AVX512 in x265 was done with this in mind?

DTL
11th February 2023, 00:44
May be programmers can complain that complex/modern video coding algorithms with long processing (many many small functions switching) with frame splitting granularity down to very small block (like 4x4 or 2x2 or even single sample) is not possible to arrange to 'any large workunits'. So no significant benefit from 'large SIMD architectures possible'. We will continue to pass something like 2x2 8bit block of 4 bytes workunit size over hundreds of functions and many loop spins at the hardware capable of handle up to 2048 bytes workunits with instant (zero memory load time penalty) access to dispatch ports from 'register file'. So they may ask for very large number of full logical processing cores to process very small workunits at very large number of cores to have better total frame compression time performance. But current hardware manufacturing industry can only provide small full logical core number chips with increasing 'workunit' size when moving from 256bytes register file of AVX(2) to 2048bytes of AVX512 (and may be larger in next promised AVX1024 in about this 2023 year - https://appuals.com/granite-rapids-cpu-showcase/ Intel 5th Gen Xeon with AVX1024/FMA3). So it is a task for programmers to adapt software for small core number execution hardware with increasing 'workunit' size for each processing thread.