Re: GSoC - Idea Discussion

Поиск
Список
Период
Сортировка
От hitesh ramani
Тема Re: GSoC - Idea Discussion
Дата
Msg-id BAY176-W320344C14CFF238AAB114BDC010@phx.gbl
обсуждение исходный текст
Ответ на Re: GSoC - Idea Discussion  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: GSoC - Idea Discussion  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: GSoC - Idea Discussion  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: GSoC - Idea Discussion  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
Hello Tomas,


> Could you please elaborate more why to choose CUDA, a nvidia-only
> technology, rather than OpenCL, supported by much wider range of
> companies and projects? Why do you consider OpenCL unsuitable?
>
> Not that CUDA is bad - it certainly works better in some scenarios, but
> this is a cost/benefits question, and it only works with devices
> manufactured by a single company. That significantly limits the
> usefulness of the work, IMHO.


I will never say OpenCL is unsuitable, I just meant, as per the research I did, CUDA came out with better results. I do agree OpenCL is also a great tool to exploit the power of GPUs. My aim is to enhance the performance using CUDA, though OpenCL implementation might work great too!


> You mention that you ran into issues with PG Strom. What issues?

While I was trying to compile, I ran into the error "src/main.c:27:29: fatal error: utils/ruleutils.h: No such file or directory", when I did make to the branch of Postgres suggested in the description, i.e the custom_join branch, I still ran into the same issue. Moreover, I couldn't locate the file.


> Can we see some examples, what this actually means? What you can and
> can't do at this point, etc.? Can you share some numbers how this
> improves the performance?

I did some benchmarking on quicksort for 1M random numbers(range 0 to 0xffffff) on GPU and CPU, the results showed enhancement of 700% on the GPU.

What this means and what I can do at this point - My aim was to integrate CUDA with Postgres so that I can make a call to the GPU for sorting operation. To start, I made a simple CUDA hello world program, and edited the code to call it from qsort, ran into name mangling issues, so sorted that out by creating 2 different .h files one for CUDA program and for the call I made from qsort. Finally, edited the make file to compile the CUDA program with the Postgres compilation itself and now when I compile my Postgres code, the CUDA file gets compiled too and prints the needed on the server end.

What I still haven't done - I still haven't actually enhanced the sorting yet, I'm still analyzing the code, how to tinkle with it, the right approach.


> That's really difficult to judge, because you have not provided any
> source code, examples or anything else to support this.
>
> >
> > Please give in your valuable suggestions and views on this.
>
> From where I sit, this looks interesting, but rather as a research
> project rather than something than can be integrated into PostgreSQL in
> a foreseeable future. Not sure that's what GSoC is intended for.
>
> Also, we badly need more details on this - current status, examples, and
> especially project plan explaining the scope. It's impossible to say
> whether the sort can be implemented within the GSoC time frame.

What I actually see it is as is to be a branch of Postgres which has CUDA compatible features. I wanted to start it by sorting which can further be improved. To be honest, I'm still analyzing the sort code for elements above a million integer elements(in a single row, for now) so that the use of GPUs is actually significant. As I saw, Postgres uses external sort for that.

If you feel this isn't feasible in such a time span, I would love to hear any suggestion for any small function which can leverage off by parallelism.

Thanks and Regards,
Hitesh Ramani

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: "cancelling statement due to user request error" occurs but the transaction has committed.
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: GSoC - Idea Discussion