Re: CUDA Sorting

From: Vitor Reus <vitor(dot)reus(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <stark(at)mit(dot)edu>, Greg Smith <greg(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: CUDA Sorting
Date: 2011-09-19 15:43:55
Message-ID: CALf5ONrOdgKm0Cea+6Th+1quKaUZZjxPueSgSj7Pdi=mHWCo9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/9/19 Thom Brown <thom(at)linux(dot)com>
> Is your aim to have this committed into core PostgreSQL, or just for
> your own version?  If it's the former, I don't anticipate any
> enthusiasm from the hacker community.

This is a research thesis and I'm not confident to commit it on the
core just by myself. I will, however, release the source, and I
believe it will open the way to future work be committed on core
PostgreSQL.

2011/9/19 Greg Stark <stark(at)mit(dot)edu>
> Of course that could change if adding a GPU would help Postgres... I
> would expect it to help mostly for data warehouse batch query type
> systems, especially ones with very large i/o subsystems that can
> saturate the memory bus with sequential i/o. "Run your large batch
> queries twice as fast by adding a $400 part to your $40,000 server"
> might be a pretty compelling sales pitch :)

My focus is also energy proportionality. If you add a GPU, you will
increase the power consumption in about 2 times, but perhaps could
increse the efficiency much more.

> That said, to help in the case I described you would have to implement
> the tapesort algorithm on the GPU as well. I expect someone has
> implemented heaps for CUDA/OpenCL already though.

For now, I'm planning to implement just the in-memory sort, for
simplicity and to see if it would give a real performance gain.

2011/9/19 Greg Stark <stark(at)mit(dot)edu>:
> In which case you could call a specialized qsort which
> implements that comparator inlined instead of calling the standard
> function.

Actually I'm now trying to make a custom comparator for integers, but
I didn't had great progress. If this works, I'll port it to GPU and
start working with the next comparators, such as float, then strings,
in a incremental way.

2011/9/19 Thom Brown <thom(at)linux(dot)com>:
> Found it! http://www.cs.cmu.edu/afs/cs.cmu.edu/Web/People/ngm/15-823/project/Final.pdf
This is a really great work, and I'm basing mine on it. But it's
implemented using OpenGL (yes, not OpenCL), and therefore has a lot of
limitations. I also tried to contact naju but didn't get any answer.

Vítor Uwe Reus

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2011-09-19 15:44:13 Re: A little pg_dump patch
Previous Message Enrico Pirozzi 2011-09-19 15:42:44 Re: A little pg_dump patch