News for hackers. Stuff that matters.
Re:BlazingDB uses GPUs to manipulate huge databases in no time by jandrewrogers on Monday September 12, 2016 @09:16PM (#12485010)
Several companies have implemented databases on GPUs but there is a good technical reason that the approach has never really caught on, and some of these companies even migrated to selling the same platform on CPUs only.

The weakness of GPU databases is that while they have fantastic internal bandwidth, their network to the rest of the hardware in a server system is over PCIe, which generally isn't going to be as good as what a CPU has and databases tend to be bandwidth bound. This is a real bottleneck and trying to work around it makes the entire software stack clunky.

I once asked the designer of a good GPU database what the "no bullshit" performance numbers were relative to CPU. He told me GPU was about 4x the throughput of CPU, which is very good, but after you added in the extra hardware costs, power costs, engineering complexity etc, the overall economics were about the same to a first approximation. And so he advised me to not waste my time considering GPU architectures for databases outside of some exotic, narrow use cases where the economics still made sense. Which was completely sensible.

For data intensive processing, like databases, you don't want your engine to live on a coprocessor. No matter how attractive the coprocessor, the connectivity to the rest of the system extracts a big enough price that it is rarely worth it.

Re:BlazingDB uses GPUs to manipulate huge databases in no time by velox_io on Tuesday September 13, 2016 @01:10AM (#12485766)
You pretty much hit the nail on the head, a big limitation is the feeding the GPUs in the first place.

Furthermore, all that memory bandwidth is calculated against all the cores. So you have to be VERY careful in usage patterns (it doesn't work like a giant CPU). Not to mention how much it costs involved per GB or TB!

I have some experience in this area, and where GPU's & database really shine is building (and especially) re-building indexes.

Running a database on GPUs isn't going to replace all DBs overnight. But, the hardware does have it's uses; just like improved SIMD on CPU's and NVMe storage, plus developments in networking - Basically look where Intel is going since we're coming to the limits of silicon transistors..

Re:BlazingDB uses GPUs to manipulate huge databases in no time by _asummers on Tuesday September 13, 2016 @08:33AM (#12487540)
I can definitely see value in offloading a bunch of number crunching on sufficiently large data sets to a graphics card (particularly parts that are trivially parallelizable). But to me, that seems like an optimization a database would make in its query planner, not one that you'd necessarily want to build an entire standalone product around.
Re:BlazingDB uses GPUs to manipulate huge databases in no time by mcphage on Tuesday September 13, 2016 @09:14AM (#12487862)
> The weakness of GPU databases is that while they have fantastic internal bandwidth, their network to the rest of the hardware in a server system is over PCIe, which generally isn't going to be as good as what a CPU has and databases tend to be bandwidth bound. This is a real bottleneck and trying to work around it makes the entire software stack clunky.

How relevant is that when you're looking at multi-TB data sets that don't fit into computer RAM? Sure, the RAM <---> CPU bandwidth may be very wide, but the SSD connects to the computer over the same PCIe bus.

And also: when did you have this conversation? GPU performance has changed very much year by year, so what wouldn't have been worth it 2 years ago might be a huge gain now.

Re:BlazingDB uses GPUs to manipulate huge databases in no time by scott_s on Tuesday September 13, 2016 @09:51AM (#12488189)
The difficulty with how most GPUs are connected to the rest of the system is that the data has to go RAM -> CPU -> GPU. If it could go directly RAM -> GPU, then the calculations would be better, but still not great as PCIe is still lower bandwidth and higher latency than RAM -> CPU.

It's not about GPU performance, it's about the latency and bandwidth of getting that dat to the GPU. If once you ship data to the GPU, you reuse it many times for many calculations, that cost is amortized and it doesn't matter as much. But if you ship data to the GPU and use it once, then that cost will probably not be amortized. I think of databases tending to fit in the latter category.

Re:BlazingDB uses GPUs to manipulate huge databases in no time by tw04 on Monday September 12, 2016 @10:34PM (#12485262)
It would seem that rationalization would fall apart quickly with the new Power CPUs that have NVLink built right into the CPU. Getting data back and forth shouldn't be a problem anymore.

Outside of CPU >> GPU, I'm not sure what other data movement you could be talking about. A SAS HBA or Ethernet NIC or Infiniband HBA are almost always going to be operating over the same PCIe bus the GPU uses. In the rare instances they're built onto the CPU, the "network link" is likely going to still be significantly slower than the fastest PCIe slot.

Re:BlazingDB uses GPUs to manipulate huge databases in no time by valarauca1 on Tuesday September 13, 2016 @08:17AM (#12487424)
>It would seem that rationalization would fall apart quickly with the new Power CPUs that have NVLink

NVLink has 80GB/s [1]. DDR4 quad channel (Xeon Servers) has ~120GB/s [2]. So no this rationalization doesn't fall apart. Furthermore in the event NVLink gets faster then RAM, then you'll still be bottlenecked by RAM access, as you'll buffer here.

This of course is ignoring weird systems where you attempt to maintain ACID coherence of tables between GPU, CPU, and Disk memory. But then GPU memory size become inherently limiting as even the biggest max out at ~32GB.

[1] https://en.wikipedia.org/wiki/NVLink

[2] http://www.corsair.com/en-us/blog/2014/september/ddr3_vs_ddr... (2channel -> 4channel x2)

Re:BlazingDB uses GPUs to manipulate huge databases in no time by marcell on Tuesday September 13, 2016 @12:13AM (#12485587)
What is NVLink, and what does it mean in terms of data transfer?
Re:BlazingDB uses GPUs to manipulate huge databases in no time by fulafel on Tuesday September 13, 2016 @12:28AM (#12485634)
It's a faster link between between future IBM POWER processors and NVidia GPUs, but won't make waves in database market since those systems are niche HPC/supercomputing hardware.
Re:BlazingDB uses GPUs to manipulate huge databases in no time by jzelinskie on Tuesday September 13, 2016 @12:57AM (#12485725)
I've also seen NVLink on some of the pre-Pascal roadmaps for nVidia's gaming-oriented graphics cards. Since the current generation gaming consoles has HSA, I'm hoping that it gains in popularity and because less niche. Problem is that it'd be a pretty vital component to be nVidia proprietary.
Re:BlazingDB uses GPUs to manipulate huge databases in no time by snuxoll on Tuesday September 13, 2016 @01:22AM (#12485798)
CAPI is "open" solution to do the same thing, though NVLink supposedly still offers more bandwidth. Unfortunately CAPI is only available on POWER8 hardware at the moment and I'm not sure if IBM is open to license it beyond OpenPOWER - still, there's a decent number of CAPI-capable cards already available and more coming to the market in the future.

GPU's may not be great for every unit of work a RDBMS has to perform, but given their ability to rapidly compute hashes it could help a lot with joins (as evidenced by PGStrom).

Re:BlazingDB uses GPUs to manipulate huge databases in no time by escap on Tuesday September 13, 2016 @01:36AM (#12485838)
http://www.nvidia.com/object/nvlink.html - NVIDIA® NVLink™ is a high-bandwidth, energy-efficient interconnect that enables ultra-fast communication between the CPU and GPU, and between GPUs.

And a big on the PowerPC roadmap http://www.nextplatform.com/2016/04/07/ibm-unfolds-power-chi... "With NVLink, multiple GPUs can be linked by 20 GB/sec links (bi-directional at that speed) to each other or to the Power8 processor so they can share data more rapidly than is possible over PCI-Express 3.0 peripheral links. (Those PCI-Express links top out at 16 GB/sec and, unlike NVLink, they cannot be aggregated to boost the bandwidth between two devices.)"

Re:BlazingDB uses GPUs to manipulate huge databases in no time by scott_s on Tuesday September 13, 2016 @09:47AM (#12488159)
Fully agreed. I wrote a paper six years ago that came to the same conclusion: http://www.scott-a-s.com/files/debs2010.pdf
Re:BlazingDB uses GPUs to manipulate huge databases in no time by gaius on Tuesday September 13, 2016 @05:29AM (#12486621)
you don't want your engine to live on a coprocessor

Well yes and no. Both IBM and Oracle have gotten impressive performance using database-specific co-processors, but these are not GPGPUs, they are dedicated hardware that sits on the storage path. Baidu are reinventing that wheel with FPGAs too.

Re:BlazingDB uses GPUs to manipulate huge databases in no time by kusmi on Monday September 12, 2016 @10:33PM (#12485259)
Is the data stored in GPU memory?
Re:BlazingDB uses GPUs to manipulate huge databases in no time by felipe_aramburu on Tuesday September 13, 2016 @02:08AM (#12485942)
I am the CTO of blazingDB. The data is not stored in GPU or even RAM. We operate from the disk though we we will cache information in RAM when we have plenty of it available.
Re:BlazingDB uses GPUs to manipulate huge databases in no time by VodkaHaze on Monday September 12, 2016 @11:25PM (#12485436)
Limiting your queries to ~12gb, the max ram on one GPU, (beyond which PCIe I/O becomes a bottleneck) will be a problem for business use, I'd think
Re:BlazingDB uses GPUs to manipulate huge databases in no time by j1vms on Monday September 12, 2016 @11:46PM (#12485503)
For some reason I am surprised that anyone would want to ship the data whole and as is, to the GPU. Wouldn't it make more sense to use a representative, transformed "GPU-ready" data set, both much smaller in size & designed specifically for the queries that are to be optimized?
Re:BlazingDB uses GPUs to manipulate huge databases in no time by felipe_aramburu on Tuesday September 13, 2016 @02:18AM (#12485967)
We are not shipping all of the data as a whole to the gpu. We are going to be releasing some whitepapers that explain this in more detail but lets get a few things clear. Data is sent to the gpu compressed since it is compressed when it is stored. We can decompress VERY quickly on GPU's (30-50GB/s is easily achievable on a K80) and because each of our columns are compressed using one of our cascading compression algorithms (which everyone offers the best in terms of compression and throughput). We are a column store and only send over the columns that are being used in processing. So for example

select id, name, age, avg(income) from people group by gender

In this case only the income and gender columns would actually be sent to the gpu and they would do so in a compressed fashion to increase the "effective" bandwidth of data over PCIE. Even more interesting is that id, name, and age, would be pulled from our horizontal store instead of our compressed columnar store in order to minimize the number of iops necessary to fill the result set.

Re:BlazingDB uses GPUs to manipulate huge databases in no time by Johnny555 on Tuesday September 13, 2016 @12:11AM (#12485581)
Once you read and prune out the dataset to only include the relevant data, then what's left for the GPU to do?
Re:BlazingDB uses GPUs to manipulate huge databases in no time by j1vms on Tuesday September 13, 2016 @12:50AM (#12485704)
The transformation to GPU-ready would not be as trivial and effectively redundant as pruning the data of course. It would be produce a secondary data structure, like an index on a column, though in this case of course destined to be processed within the math-oriented, high-branch-cost setting of a GPU.
Re:BlazingDB uses GPUs to manipulate huge databases in no time by lmeyerov on Tuesday September 13, 2016 @03:26AM (#12486193)
This is basically the bread and butter of columnar compute systems, not just GPU ones. GPUs ones just get to throw more compute at them, and thus do even better for these kinds of space/time trade-offs. Interestingly, most big data systems are increasingly columnar.
Re:BlazingDB uses GPUs to manipulate huge databases in no time by dharma1 on Tuesday September 13, 2016 @02:08AM (#12485943)
When did you ask? GPUs have been getting a lot faster year on year.

Though, I would like to see Xeon Knights Landing compared to GPUs for db uses.

Re:BlazingDB uses GPUs to manipulate huge databases in no time by dspillett on Tuesday September 13, 2016 @06:15AM (#12486774)
The data bandwidth between main memory and that which the GPU works with isn't speeding up by the same factors though. This is fine when working with a dataset that fits into the GPU's memory pool and your workload involves relatively few (or zero) changes because you can transfer it once and repeatedly ask the GPUs to analyse it in what-ever ways. As soon as the common dataset doesn't fit neatly into the GPU's RAM (leaving enough spare for scratch space) you end up thrashing the channel and it becomes the main bottleneck.
Re:BlazingDB uses GPUs to manipulate huge databases in no time by dharma1 on Tuesday September 13, 2016 @08:29AM (#12487507)
That's true. There are some workarounds though, like distributing the workload between multiple GPUs - actively under development in machine learning for instance