News for hackers. Stuff that matters.
Re:PGStrom: GPU-accelerated PostgreSQL by tempodox on Tuesday September 01, 2015 @08:53AM (#10151974)
If I simplify this & other news to the statement, “our GPUs are Turing-complete”, then one question seems to follow logically: When will our CPUs become multi-core on the scale of a GPU? Or is that a stupid question that only looks logical?
Re:PGStrom: GPU-accelerated PostgreSQL by Twirrim on Tuesday September 01, 2015 @09:58AM (#10152327)
If you look at computing history, you'll find many parallels over the years. For example the Floating Point Unit started out as a co-processor, this massive unit you put next to your mainframe and plugged in. Over several iterations it went from external, to part of the same chasis, then on to an expansion card, before eventually making its way on-die, until by the time the first Pentium came out, the thought of having a CPU without an FPU was preposterous (I remember kicking myself for having bought the 486sx 25 instead of the 486dx 25 that had the integrated FPU.)

We've seen a similar thing with GPUs. The original 3DFX was this card you had to use a loopthrough video connector with because it had no 2D capabilities. Slowly it got integrated with 2D capabilities, and then grew to be GPUs, before starting to transition onto the motherboard, before eventually making its way into Intel chips. I don't believe you can buy an i or Xeon series Intel chip these days that doesn't have a GPU integrated in it. It's not the most powerful thing, but it is usable via OpenCL.

Intel currently has something called the Massive Integrated Core Architecture (https://en.wikipedia.org/wiki/Xeon_Phi) which has some really interesting technical advantages over the popular GPU approach. This started out as a separate expansion card you plugged into a PCI Express slot, but with the Knights Landing iteration due this year, it's also going to be available as an on-motherboard chip, and even support running the OS itself. (http://www.zdnet.com/article/intels-next-big-thing-knights-l... http://newsroom.intel.com/community/intel_newsroom/blog/2013...)

Re:PGStrom: GPU-accelerated PostgreSQL by fake-name on Tuesday September 01, 2015 @01:11PM (#10154004)
Most of the Xeon parts do not have integrated GPUs.

A few of the Xeon E3 parts do have GPUs, but that's because they're targeted at workstations, apparently.

None of the Xeon E5/E7 parts have GPUs.

Take a look at [here](https://en.wikipedia.org/wiki/List_of_Intel_Xeon_microproces...) for a list.

Re:PGStrom: GPU-accelerated PostgreSQL by Retric on Tuesday September 01, 2015 @12:17PM (#10153486)
Latency is a huge driver for most of that integration.

GPU's are an odd case because they need a lot of internal bandwidth and are minimally impacted by latency making external cards far more viable. And unlike sound cards they can easily eat more or less unlimited FLOPS.

Re:PGStrom: GPU-accelerated PostgreSQL by papercrane on Tuesday September 01, 2015 @09:04AM (#10152016)
GPU's were designed for a problem that is easy to make massively parallel. If we tried to make our CPUs like GPUs we'd end up with something not very useful for most of what we do.
Re:PGStrom: GPU-accelerated PostgreSQL by Arelius on Tuesday September 01, 2015 @01:33PM (#10154205)
Most CPU's these days already have a GPUs worth of core's onboard. So, about 5 years ago to answer your question?

The other answer to the rest of your question is probably about when the majority of software starts running entirely on the GPU.

So, let's take the Gefore GTX 980, a pretty heavyweight GPU right now. Tech specs say it has 2048 "CUDA cores" whatever that means. Well, a cuda processor is actually a SIMD core, and in this case, I think it's actually a 32 element wide SIMD core. Which makes the 980 actually contain 64 cores (Is that actually the number of cores, or just instruction schedulers)... Which is still a bit, but you can get a modern 18-core Xeon, which only puts us off in about a factor of 4 in core count.

So, the main reason for the gap at this point is functionality. The CPU does a lot of things that the GPU doesn't, and that all takes silicon that the GPU uses for extra ALU. Things like legacy instruction decode, instruction reordering, deep branch prediction pipelines, and a giant bucket of instructions that just aren't needed on the GPU, but many modern CPU targeted software really relies on for performance. And really, if the average piece of software properly took advantage of many-cores, we'd all have a ton of cores in our CPU. It much easier for CPU designers to bolt on another core than dealing with complicated branch prediction invalidation logic, or any other trick to make crappy code run well.

In all I think the gap is smaller than you think, and we will continue to see convergence, particularly as engineers start writing code better suited to the GPU, and rely less on the CPUs fancy performance tricks. But in all, there are some fundamental differences that make complete crossover tricky.

Re:PGStrom: GPU-accelerated PostgreSQL by Symmetry on Tuesday September 01, 2015 @09:25AM (#10152110)
There are tradeoffs in design both between few and many cores and between optimizing cores for throughput versus latency and between optimizing for DSP-like code with predictable memory access and control patterns and business logic with lots of pointer chasing.

It's actually pretty easy to have CPUs on the scale of a GPU right now. A 15 core Xeon can put out 600 gigFlops of compute so you just need 10 of them to equal one Titan X. Now, those 10 Xeons take much more silicon area and power to generate that processing power than the Xeons but that's because they have all these branch predictors and out of order execution engines and such that mean that their performance falls of much more slowly as you throw them at problems that are more complicated than DSPish code.

Re:PGStrom: GPU-accelerated PostgreSQL by Aissen on Tuesday September 01, 2015 @09:33AM (#10152168)
FYI, Intel tried that with the aborted "Larrabee" project, so not a stupid question at all. It ended up being a too hard problem to solve. They reused the technology to make the Xeon Phi coprocessors which are basically PCIE computing "accelerators"; for a class of workload, and if you're willing to rewrite your code, they are faster and more power efficient than GPUs.

Although there are many companies trying to crack this many-core problem (Kalray, AppliedMicro, Adapteva, Cavium, Tilera), I'm not aware of any "successful" solution.

Re:PGStrom: GPU-accelerated PostgreSQL by pjmlp on Tuesday September 01, 2015 @09:36AM (#10152189)
I was at GDCE when Larrabee was presented in the technical session about programming for it.

Of course, it was mostly slideware but we were given the promises that it would change computing as we know it, yeah right.

They really need to improve their GPU skills.

Re:PGStrom: GPU-accelerated PostgreSQL by JohnBooty on Tuesday September 01, 2015 @11:47AM (#10153184)
Reason #1: Many (most?) computational tasks are not easily parallelizable. The canonical analogy is making a baby:

- One woman can make a baby in nine months - Nine women can make nine babies in nine months - But nine women can't make a baby in one month

Each step of fetal development depends on the previous step. For a given single baby, you can't have one woman working on step #49 while another woman works on step #17.

A lot of computational tasks are similar. Think of the Fibonacci sequence: the computation of each number depends on previous results.

Reason #2: The overhead of communication and coordination. If you split up a task amongst 32 cores, those cores need to communicate with the parent process and perhaps with each other as well. This eats into your transistor budget.

Reason #3: Resource contention. It's nice that you can split up your memory bandwidth-intense task across 128 cores, but if most of those cores are just sitting around and idling because of memory bandwidth contention issues, you haven't gained anything.

Reason #4: It's hard. Programmers struggle to write parallel code. Some tools make it much easier of course.

Re:PGStrom: GPU-accelerated PostgreSQL by mrdmnd on Tuesday September 01, 2015 @12:27PM (#10153600)
Pedantic comment: you don't need the previous results to compute the nth fibonacci number; the recurrence has a closed form solution. It is not constant time to compute (unless you assume constant time, infinite precision arithmetic) in practice, but it can certainly be done without the prior terms.

The rest of this post is on point, though. Serialization bottlenecks (Amdahl's Law) prevent a lot of optimizations from making meaningful dents in real workloads.

Re:PGStrom: GPU-accelerated PostgreSQL by coldtea on Tuesday September 01, 2015 @10:51AM (#10152706)
It's a logical question, but unfortunately things don't work like that.

Whule both might be turing-complete, the kind of tasks a GPU does fast are the tasks that are extremely parallelizable.

3D image creation (the most basic thing they do) is like that. So are other tasks we program them to do (e.g. running some number crunching etc).

But normal programs we run (the OS, Word, Photoshop, the web browser etc) are not like that, and we can't easily make them like that.

Re:PGStrom: GPU-accelerated PostgreSQL by Const-me on Tuesday September 01, 2015 @07:50PM (#10156578)
Exactly.

GPUs were designed to run thousands of threads, CPUs to run only a few of them. CPU cores do branch predictions and instructions reordering to save latency. GPU cores do not. When they need to wait, they instead pause the thread and resume some other thread on the same core.

GPUs were designed to execute the same code on many threads, CPUs to ran arbitrary code on each thread. Each CPU core has instruction fetch, instruction decode, and branching modules. For GPU cores, there’s only one fetch/decode/branch modules per many cores (32 on nVidia).

This 2 factors are among the reasons why we have 4 cores in $200 mid-range desktop CPUs, and 1024 cores in $200 mid-range desktop GPU.

Re:PGStrom: GPU-accelerated PostgreSQL by belorn on Tuesday September 01, 2015 @09:11AM (#10152048)
When/If HP finish the machine with 2500 cores, that will basically result in the CPU becoming as parallel as GPU's.
Re:PGStrom: GPU-accelerated PostgreSQL by Symmetry on Tuesday September 01, 2015 @09:30AM (#10152145)
What NVidia calls a core and what Intel calls a core really aren't comparable. If you go by the Intel definition which is more or less "Capable of independantly issuing an instruction" then you might find 15 cores in a Xeon versus 24 SMM "cores" in the top NVidia chip. Going by the NVidia definition which is more or less "Things that can execute instructions from a queue" NVidia would have 3072 cores in it's top chip and Intel would have 120 cores or "execution ports" as they call them.
Re:PGStrom: GPU-accelerated PostgreSQL by eloff on Tuesday September 01, 2015 @09:24AM (#10152105)
That's just a bunch of standard (ARM currently) boxes networked together with a special backplane that allows for DMA between different servers. Not really comparable to a GPU.
Re:PGStrom: GPU-accelerated PostgreSQL by bibabo on Tuesday September 01, 2015 @09:12AM (#10152054)
Does the machine share the same memory layout/architecture as a GPU (I don't know each one). Thanks.