GUC Parameters

This session introduces PG-Strom's configuration parameters.

Enables/disables a particular feature

Parameter Type Default Description
pg_strom.enabled bool on Enables/disables entire PG-Strom features at once
pg_strom.enable_gpuscan bool on Enables/disables GpuScan
pg_strom.enable_gpuhashjoin bool on Enables/disables GpuJoin by HashJoin
pg_strom.enable_gpunestloop bool on Enables/disables GpuJoin by NestLoop
pg_strom.enable_gpupreagg bool on Enables/disables GpuPreAgg
pg_strom.enable_partitionwise_gpujoin bool on Enables/disables whether GpuJoin is pushed down to the partition children. Available only PostgreSQL v10 or later.
pg_strom.enable_partitionwise_gpupreagg bool on Enables/disables whether GpuPreAgg is pushed down to the partition children. Available only PostgreSQL v10 or later.
pg_strom.pullup_outer_scan bool on Enables/disables to pull up full-table scan if it is just below GpuPreAgg/GpuJoin, to reduce data transfer between CPU/RAM and GPU.
pg_strom.pullup_outer_join bool on Enables/disables to pull up tables-join if GpuJoin is just below GpuPreAgg, to reduce data transfer between CPU/RAM and GPU.
pg_strom.enable_numeric_type bool on Enables/disables support of numeric data type in arithmetic expression on GPU device
pg_strom.cpu_fallback bool off Controls whether it actually run CPU fallback operations, if GPU program returned "CPU ReCheck Error"
pg_strom.nvme_strom_enabled bool on Enables/disables the feature of SSD-to-GPU Direct SQL Execution
pg_strom.nvme_strom_threshold int 自動 Controls the table-size threshold to invoke the feature of SSD-to-GPU Direct SQL Execution

Optimizer Configuration

Parameter Type Default Description
pg_strom.chunk_size int 65534kB Size of the data blocks processed by a single GPU kernel invocation. It was configurable, but makes less sense, so fixed to about 64MB in the current version.
pg_strom.gpu_setup_cost real 4000 Cost value for initialization of GPU device
pg_strom.gpu_dma_cost real 10 Cost value for DMA transfer over PCIe bus per data-chunk (64MB)
pg_strom.gpu_operator_cost real 0.00015 Cost value to process an expression formula on GPU. If larger value than cpu_operator_cost is configured, no chance to choose PG-Strom towards any size of tables

Executor Configuration

Parameter Type Default Description
pg_strom.global_max_async_tasks int 160 Number of asynchronous taks PG-Strom can throw into GPU's execution queue in the whole system.
pg_strom.local_max_async_tasks int 8 Number of asynchronous taks PG-Strom can throw into GPU's execution queue per process. If CPU parallel is used in combination, this limitation shall be applied for each background worker. So, more than pg_strom.local_max_async_tasks asynchronous tasks are executed in parallel on the entire batch job.
pg_strom.max_number_of_gpucontext int auto Specifies the number of internal data structure GpuContext to abstract GPU device. Usually, no need to expand the initial value.

Columnar Cache Configuration

Parameter Type Default Description
pg_strom.ccache_base_dir string '/dev/shm' Specifies the directory path to store columnar cache data files. Usually, no need to change from /dev/shm where tmpfs is mounted at.
pg_strom.ccache_databases string '' Specified the target databases for asynchronous columnar cache build, in comma separated list. It does not affect to the manual cache build by pgstrom_ccache_prewarm().
pg_strom.ccache_num_builders int 2 Specified the number of worker processes for asynchronous columnar cache build. It needs to be larger than or equeal to the number of databases in pg_strom.ccache_databases.
pg_strom.ccache_log_output bool false Controls whether columnar cache builder prints log messages, or not
pg_strom.ccache_total_size int auto Upper limit of the columnar cache in kB. Default is the smaller in 75% of volume size or 66% of system physical memory.

gstore_fdw Configuration

Parameter Type Default Description
pg_strom.gstore_max_relations int 100 Upper limit of the number of foreign tables with gstore_fdw. It needs restart to update the parameter.

Configuration of GPU code generation and build

Parameter Type Default Description
pg_strom.program_cache_size int 256MB Amount of the shared memory size to cache GPU programs already built. It needs restart to update the parameter.
pg_strom.num_program_builders int 2 Number of background workers to build GPU programs asynchronously. It needs restart to update the parameter.
pg_strom.debug_jit_compile_options bool off Controls to include debug option (line-numbers and symbol information) on JIT compile of GPU programs. It is valuable for complicated bug analysis using GPU core dump, however, should not be enabled on daily use because of performance degradation.
pg_strom.debug_kernel_source bool off If enables, EXPLAIN VERBOSE command also prints out file paths of GPU programs written out.

GPU Device Configuration

Parameter Type Default Description
pg_strom.cuda_visible_devices string '' List of GPU device numbers in comma separated, if you want to recognize particular GPUs on PostgreSQL startup. It is equivalent to the environment variable CUDAVISIBLE_DEVICES
pg_strom.gpu_memory_segment_size int 512MB Specifies the amount of device memory to be allocated per CUDA API call. Larger configuration will reduce the overhead of API calls, but not efficient usage of device memory.
pg_strom.max_num_preserved_gpu_memory int 2048 Upper limit of the number of preserved GPU device memory segment. Usually, don't need to change from the default value.