ubuntu自带apt是10的版本,要想编译还需要下面这些
apt-get install libicu-dev postgresql-server-dev-all postgresql-common libpq-dev
然后自己安装CUDA支持,其实apt都能干了 apt的驱动是390的,cuda是9。1 够了
然后
git clone https://github.com/heterodb/pg-strom.git
cd pg-strom
$ make PG_CONFIG=/usr/bin/pg_config
$ sudo make install PG_CONFIG=/usr/bin/pg_config
再然后
http://heterodb.github.io/pg-strom/install/
Setup postgresql.conf
Next, edit postgresql.conf which is a configuration file of PostgreSQL. The parameters below should be edited at least to work PG-Strom. Investigate other parameters according to usage of the system and expected workloads.
shared_preload_libraries
PG-Strom module must be loaded on startup of the postmaster process by the shared_preload_libraries. Unable to load it on demand. Therefore, you must add the configuration below.
shared_preload_libraries = '$libdir/pg_strom'
max_worker_processes
PG-Strom internally uses several background workers, so the default configuration (= 8) is too small for other usage. So, we recommand to expand the variable for a certain margin.
max_worker_processes = 100
shared_buffers
Although it depends on the workloads, the initial configuration of shared_buffers is too small for the data size where PG-Strom tries to work, thus storage workloads restricts the entire performance, and may be unable to work GPU efficiently.
So, we recommend to expand the variable for a certain margin.
shared_buffers = 10GB
Please consider to apply SSD-to-GPU Direct SQL Execution to process larger than system's physical RAM size.
work_mem
Although it depends on the workloads, the initial configuration of work_mem is too small to choose the optimal query execution plan on analytic queries.
An typical example is, disk-based merge sort may be chosen instead of the in-memory quick-sorting.
So, we recommend to expand the variable for a certain margin.
work_mem = 1GB
据说要启动还需要这个。。。
This happened because pg_ctlcluster in (Ubuntu 18.04 or 16.04) does not read environment varibel in user profiles and pg_ctlcluster's environment file is empty.
As stated in /etc/init.d/postgresql, you must set PATH environment in /etc/postgresql/<version>/<cluster>/environment.
For example, if you use postgresql 9.6 with default installation, then it will be /etc/postgresql/9.6/main/environment. Add this to the file:
PATH = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
Or you can set it in /etc/postgresql-common/environment for all clusters.
还据说使用centos7的话可以顺滑搞定。。。。
这个渣渣的GPU0 GeForce GTX 750 Ti 。。。。。。看来一个P106-90或者-100是必须滴了
GPU Device
PG-Strom requires at least one GPU device on the system, which is supported by CUDA Toolkit, has computing capability 6.0 (Pascal generation) or later;
note001:GPU Availability Matrix shows more detailed information. Check this list for the support status of SSD-to-GPU Direct SQL Execution.
2019-01-28 17:37:53.802 CST [8529] LOG: PG-Strom built for PostgreSQL 10
2019-01-28 17:37:53.834 CST [8529] LOG: PG-Strom: GPU0 GeForce GTX 750 Ti - CC 5.0 is not supported
2019-01-28 17:37:53.834 CST [8529] FATAL: PG-Strom: no supported GPU devices found