News for hackers. Stuff that matters.
Re:Google Cloud Platform is the first cloud provider to offe... by jscipione on Friday February 24, 2017 @12:21PM (#13725595)
Why is it important to offer Intel Skylake on cloud platforms? Is there some specific processor extensions present in Skylake that make them particularly compelling in a cloud environment for a particular industry or a particular set of needs?
Re:Google Cloud Platform is the first cloud provider to offe... by boulos on Friday February 24, 2017 @12:34PM (#13725692)
Skylake is an amazing upgrade, more so than even the Haswell bump. Beyond just the clock-for-clock kind of improvements, AVX512 is a huge win for many vectorized workloads (see my other comment about waiting nearly 10 years for it...). Linear algebra (or ML if you prefer), rendering, and even string operations (operating on 512-bits per instruction is a win over 256) are all a lot faster.
Re:Google Cloud Platform is the first cloud provider to offe... by zbjornson on Friday February 24, 2017 @12:58PM (#13725918)
The other fundamental change is that most instructions now have masked variants, so you can apply an operation to only specific elements in a vector based on a mask register. This avoids branch mispredictions, which are a big performance hit in some workloads.
Re:Google Cloud Platform is the first cloud provider to offe... by boulos on Friday February 24, 2017 @01:06PM (#13725994)
Yes, I started syrah (https://github.com/boulos/syrah) in 2009 precisely because I loved the masking of LRBni and wanted to "use it" even from SSE, AVX and (later) AVX2. Once I played with NEON though, I realized I had screwed up the format for it.

Sadly, (because KNL doesn't have nearly the same volume) until Skylake became a real thing, I had no reason to update this. I'm planning on dusting it off now!

Re:Google Cloud Platform is the first cloud provider to offe... by jdf on Friday February 24, 2017 @02:33PM (#13726903)
Not asking you to reveal any internal plans, but do you think there's any chance that some form of KNL could show up on GCP in the near future?

FWIW we're currently using GCP, generally love it, and I'm looking forward to trying out Skylake...

Re:Google Cloud Platform is the first cloud provider to offe... by doczoidberg on Friday February 24, 2017 @01:10PM (#13726036)
what do I have to consider as a software developer to benefit from these upgrade? Do I need special tools/libraries?
Re:Google Cloud Platform is the first cloud provider to offe... by aseipp on Friday February 24, 2017 @03:07PM (#13727339)
Simple process improvements that make Skylake faster will just be "there" -- some code will just be faster with no changes!

For the numerical, AVX stuff -- it should be mostly automatic for you, if you're already using optimized libraries at the core -- MLK, BLAS, that kind of stuff. They'll be transparently upgraded for you -- ideally -- to take care of these things. They normally check what your CPU is at runtime, and pick the fastest implementation among a few different choices it has.

You will need toolchains to support this all, but for the most part that likely won't be a burden unless you want to get your hands dirty and start it yourself -- inevitably, this should all mostly be "pre-canned". Your optimized linear algebra, vector, and math libraries are what will mostly concern themselves with this, not you necessarily. In fact, several of the things already available can probably use these new extensions! I bet if you're using Intel MLK for example, it will probably "magically" get faster on these Skylake machines by using AVX512 automatically.

If you want to understand more: you can always go grab an SSE/AVX reference, check your /proc/cpuinfo, and write a few simple things on your own to get a feel. Your toolchain will definitely support it :)

Re:Google Cloud Platform is the first cloud provider to offe... by martinpw on Saturday February 25, 2017 @05:08AM (#13730903)
> I bet if you're using Intel MLK for example, it will probably "magically" get faster on these Skylake machines by using AVX512 automatically.

(Aside, I think you mean MKL.)

There is a 200MHz clock reduction when running AVX512 instructions. If your code makes heavy use of AVX512 there is of course still a big net win, but I'm curious of the impact with more heterogeneous workloads. We have an app that is a mixture of scalar and vector code. Some, but not all, of the vector code would benefit from 512 bit vectors. But how much does the clock slowdown when running this code bleed over into running the other non-AVX512 code? I guess I'm asking how quickly it clocks down, and how quickly the full clock speed is restored. Worst case it seems you could be running full time at a 200MHz slowdown due to blocks AVX512 instructions scattered throughout the application. Is that a valid concern?

Re:Google Cloud Platform is the first cloud provider to offe... by aseipp on Saturday February 25, 2017 @11:42AM (#13732305)
Thanks for the correction. And FWIW this is an insanely good question and it's hard for me to immediately answer! The things I want AVX512 for are very fat SIMD registers for my cryptographic code, and I've only lightly kept up with it since AVX-512 was pushed off to Skylake-Xeon only. So I haven't worried about highly heterogenous workloads (in my head).

I'd have to look up the specifics; but does AVX512 simply slow the clock, or does it actually have some kind of limited number of hardware ports? I wonder if some clock slowdown would be very much of an issue, since clock-for-clock, you should see better performance on Skylake anyway.

Just curious, what kind of workloads do you think you're looking at here?

Re:Google Cloud Platform is the first cloud provider to offe... by martinpw on Saturday February 25, 2017 @05:16PM (#13734183)
I'm having trouble finding good references now, but I am sure I remember reading that is was simply slowing the clock.

In my case, yes, Skylake would still be a win over older hardware, but the question is whether to use AVX512 or not. The workload is a real time animation system with a bunch of nodes in a graph that get evaluated in sequence. Some nodes would benefit from AVX512, but others would not. So the question is, if we vectorize those nodes that would benefit and get a speedup there, will the other unvectorized nodes now run slower as a result of the lower clock speed, canceling out the benefit.

It sounds like your case is a much better fit for AVX512. Out of curiosity, have you tried running on Xeon Phi, which also supports AVX512?

Re:Google Cloud Platform is the first cloud provider to offe... by boulos on Friday February 24, 2017 @01:14PM (#13726072)
For the "clock-for-clock" improvements: nothing. For AVX512, various numerical libraries will be adding support for you over time. However, just as with Haswell and earlier generations, even AVX2 will run better on Skylake.
Re:Google Cloud Platform is the first cloud provider to offe... by en4bz on Friday February 24, 2017 @01:07PM (#13726002)
MPX (hardware bounds checking)

SGX (secure enclaves)

TSX (Hardware Transactional Memory)

SGX can store SSL keys in a hardware protected enclave that can't be accessed by hypervisors/AMT so that can be useful for security sensitive stuff.

Cloudflare probably could have used MPX to prevent their recent leak with minimal performance overhead.

TSX is cool.

Re:Google Cloud Platform is the first cloud provider to offe... by aseipp on Friday February 24, 2017 @03:22PM (#13727519)
Unfortunately MPX sounds cool but is a lot of fluff IMO. It is absolutely not "minimal overhead" in its current implementation and it is very invasive in some ways, and breaks many programs. (It also doesn't even provide temporal protection, and is slower than ASAN in those modes?) There's probably a reason almost nobody uses it from what I see; it sounds pretty half-baked...

Yes, it might have stopped the CloudFlare case, if they were willing to pay (I believe) for L4 over-read protection overheads (2x I believe, with a LOT of variance between GCC and Intel's compiler), and give up multithreading[1] in their application, and probably deal with other false positives and unsupported things.

SGX is completely neutered in Skylake and totally useless without getting your enclave signed by Intel, unless Google has struck a deal or something. You can mostly ignore it. It's good for preparation of your application against future processors where you'll have control over this, though, I guess...

TSX would be nice, yes. It's deeply annoying it's taken them so long to get right and that they've stratified that feature amongst CPUs -- is there any _real_ reason my Kaby Lake XPS13 can't support TSX? I doubt it other than "market segmentation makes us more money". I guess now I'm just ranting, though.

[1] https://intel-mpx.github.io/overview/

Re:Google Cloud Platform is the first cloud provider to offe... by mrb on Saturday February 25, 2017 @12:38AM (#13730247)
Wasn't TSX completely disabled in all Intel processors because of silicon bugs? If it is enabled in the Skylake E5 Xeon series that Google is rolling out, does it mean the Skylake E5 Xeons are the first processors to have a working TSX implementation?
Re:Google Cloud Platform is the first cloud provider to offe... by rincebrain on Sunday February 26, 2017 @12:40AM (#13735864)
AIUI that was just certain flavors of Broadwell and possibly all (or maybe just all-released-at-the-time) Haswell chips, so later Broadwell steppings had a working TSX implementation.

(As an example, my Xeon D-1540, a Broadwell-family chip, advertises the TSX bits in CPU feature flags, so it's not errata'd off there.)

Re:Google Cloud Platform is the first cloud provider to offe... by bonzini on Friday February 24, 2017 @01:19PM (#13726132)
I don't think Google provides SGX on their cloud instances (SGX is extremely limited right now, since any code your placing in an enclave must be signed by Intel).
Re:Google Cloud Platform is the first cloud provider to offe... by mike_hearn on Friday February 24, 2017 @02:18PM (#13726733)
But I'd be interested to know if there are any plans to do so. Google Cloud people reading this - are you there?
Re:Google Cloud Platform is the first cloud provider to offe... by boulos on Friday February 24, 2017 @02:36PM (#13726946)
See my new top-level comment (https://news.ycombinator.com/item?id=13726871).
Re:Google Cloud Platform is the first cloud provider to offe... by brianwawok on Friday February 24, 2017 @12:29PM (#13725645)
Yes it's in the article.
Re:Google Cloud Platform is the first cloud provider to offe... by acdha on Friday February 24, 2017 @01:03PM (#13725961)
Your wording on this seems unnecessarily harsh: the article mentions AVX-512 but doesn't go into much detail about that or mention anything else. Some people may immediately know that their code will benefit from AVX-512 but that's only relevant to a subset of workloads.