News for hackers. Stuff that matters.
Re:AMD lands Google, Twitter as customers with newest server... by justsid on Thursday August 08, 2019 @02:40PM (#20647309)
I work on game performance (or rather, I work on the underlying engines with an eye on performance) and that is the biggest reason why my computer has an Intel CPU. I would love the killing power of an Zen 2 machine, the compile time improvement alone would make ith worth every cent. Unfortunately I use VTune a lot for work and there just isn’t any alternative, so I’m stuck with whatever Intel gives me. Which is doubly sad, because I end up optimizing for Intel’s microarchitecture and can only hope that it runs decent enough on AMDs CPUs.

On the GPU side though, at least with the modern APIs (Vulkan, D3D12 and Metal), AMD isn’t too far behind Nvidia. I actually prefer RenderDoc to Nvidias Nsight because I can capture multiple frames instead of pausing the application to look at one frame at a time. That being said though, the OpenGL tooling for AMD is abysmal and so is their OpenGL driver. All things being equal, just swapping an Nvidia card for an AMD card gives around 40-50% speed up when running OpenGL purely by getting rid of the driver overhead. Although with Vulkan AMD and Nvidia are actually on par, so at least that’s solving itself for us.

Re:AMD lands Google, Twitter as customers with newest server... by gameswithgo on Thursday August 08, 2019 @05:01PM (#20648710)
A whole lot of gamers, me included, have been buying up Ryzen 3000 series cpus so you might need a 2nd computer with one in there.

Good excuse to build another machine!

Re:AMD lands Google, Twitter as customers with newest server... by uep on Thursday August 08, 2019 @03:46PM (#20647924)
I feel like this is a safe assumption, but I assume you do most of your performance work on Windows? Since you would even focus on OpenGL at all, I have to assume that you at least spend some of your time developing on Linux.

Have you tried the AMD mesa drivers? The open source driver performance doesn't look terrible, and in my own experience, it tends to work far better for OpenGL than AMD's proprietary GPU drivers.

https://www.phoronix.com/scan.php?page=article&item=rx-5700-...

Re:AMD lands Google, Twitter as customers with newest server... by ahartmetz on Thursday August 08, 2019 @04:10PM (#20648154)
Probably Windows, because on Linux you have the AMD mesa driver and perf and valgrind-callgrind and kcachegrind which are all pretty good. For OpenGL there are renderdoc and apitrace. Unfortunately, the rr reverse debugger does indeed not work with Ryzen because the performance counters are too fuzzy, as mentioned in another comment.

I have been working with performance tools on Linux for over 10 years and occasionally debugged graphics issues.

Re:AMD lands Google, Twitter as customers with newest server... by blattimwind on Thursday August 08, 2019 @07:22PM (#20649934)
kcachegrind is okay, but VTune is a lot better.
Re:AMD lands Google, Twitter as customers with newest server... by justsid on Thursday August 08, 2019 @04:36PM (#20648425)
Our game actually ships on Windows, macOS and Linux (as well as the two dominant mobile OSs), so I dabble in all of those platforms. The Linux OpenGL performance is indeed better than on Windows, but unfortunately it makes up only a super small fraction of our userbase.

I should note that the OpenGL stack on macOS isn't better than the Windows one either. Probably not surprising anybody, given the lackluster support that Apple has for it. We are seeing similar improvements with Metal as we do for Vulkan.

Re:AMD lands Google, Twitter as customers with newest server... by garaetjjte on Thursday August 08, 2019 @05:38PM (#20649085)
Yes, Mesa/Gallium is much faster than AMDGPU-PRO and Windows driver junk.

Windows OpenGL driver is so bad that running it through ANGLE with DX backend is faster.

Re:AMD lands Google, Twitter as customers with newest server... by SeanBoocock on Thursday August 08, 2019 @10:34PM (#20650896)
Also work in games and agree with the sentiment on VTune. I've also enjoyed using Razor, but that is limited to specific hardware as well.

I built a Threadripper 2 machine recently for home, but I don't know that it would have similar utility in a work environment where I could use something like Incredibuild to farm out compiles. Is that not an option for you in your work?

Re:AMD lands Google, Twitter as customers with newest server... by qplex on Friday August 09, 2019 @11:03PM (#20659887)
This post doesnt make much sense to me since both the PS4 and XB1 are based on AMD APUs.

Mobile is also not Intel.

The only case to left are the Wintel PCs - and even that just makes Intel look bad since AMD CPUs run the games just fine. For the actual gaming experience it basically amounts to no difference at all.

Re:AMD lands Google, Twitter as customers with newest server... by rossnordby on Thursday August 08, 2019 @03:23PM (#20647689)
On the CPU tooling side of things, I was planning to buy into another Intel CPU for my workstation for the same reasons- until I ran into some 50%+ performance cliffs in Zen 1. (I suspect Zen 2 addresses some of these.)

I'll still need to keep some Intels around for VTune and optimizing deeply for AMD is going to be a chore... But given how the market is moving, I don't think I can avoid making AMD the primary development focus.

Re:AMD lands Google, Twitter as customers with newest server... by ahartmetz on Thursday August 08, 2019 @04:26PM (#20648315)
Are those performance cliffs about AVX or about very branchy code?

Ryzen < 2(!) has a much narrower AVX unit which could easily cause a 50% slowdown.

Branchy code like that of compilers tends to run somewhat slower on Ryzen, though closer to 15% than 50% (comparing AMD and Intel CPUs with otherwise same performance in mixed benchmarks). The latter really depends. Core and Ryzen have different branch predictors, both so complicated that they can't be fully described in documentation anymore. Ryzen 2's first level cache configuration also moved closer to Core's, presumably for software that has been fine-tuned for Core.

Re:AMD lands Google, Twitter as customers with newest server... by rossnordby on Thursday August 08, 2019 @08:50PM (#20650386)
While the lack of full rate 256-wide operations was quite noticeable, I was expecting it- the cliff that caught me by surprise was something else: certain kinds of inter-CCX communication seem to be catastrophic for performance. The rest of this is partially speculation since I haven't had time to dig deeply into the problem.

Specifically, in both a physics engine solver and some machine learning backwards passes I was working on, there are areas where a little false sharing is likely. It's relatively uncommon and a negligible concern on the smaller Intel chips I tested on, but Zen cores will sometimes have to synchronize with another CCX's caches and it seems to come with a penalty vastly larger than naively expected latency or IF bandwidth.

A fully loaded 2950x ended up getting beat by a 1700x in the solver despite having virtually the same architecture, twice the memory bandwidth, and an observed clocks advantage. Cutting the used thread count down to the same as the 1700x helped a little, but it looked like Windows was scheduling the threads on as many CCXs as possible and it ended up still being slower.

On the upside, the 2950x blasts through friendlier workloads like collision detection and inference with perfectly reasonable scaling.

I'm hoping that the dramatic redesign in Zen 2's memory architecture (unified IO die and whatnot) will help things a little. If not, I'll probably have to rework some stuff.

Re:AMD lands Google, Twitter as customers with newest server... by ahartmetz on Friday August 09, 2019 @06:23AM (#20652937)
Thanks for the reply. I didn't think of the split caches. It didn't make such a big difference in my own workloads or reviews I've read.
Re:AMD lands Google, Twitter as customers with newest server... by galaxyLogic on Thursday August 08, 2019 @09:14PM (#20650513)
Wait for Google's game division to do something about it they have their AMD online gaming app coming up they must do something about it and hopefully will open source it.