热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

优化Greenplum初始化配置文件(gpinitsystem_config)的学习指南

在安装Greenplum的过程中,正确配置`gpinitsystem_config`文件是至关重要的一步。本文详细介绍了如何优化该文件,以确保数据库集群的高效初始化和稳定运行。通过调整关键参数,用户可以更好地适应不同的硬件环境和业务需求,从而提升系统的整体性能。

修改初始化(gpinitsystem_config)文件


在安装greenplum的最后几步中,在运行初始化工具之前(-c gpinitsystem_config),先要修改(gpinitsystem_config)文件,各个参数信息如下:


1.对于primary和mirror的地址路径而言,在一台segment主机上要建立几个节点,就写入几个地址;而且在新建集群初始化的时候,mirror节点的分布是grouped模式,加-S在初始化时候为spread模式

2.如果在新建的集群中,只要primary而想在后续的过程中加入mirror节点的话,就不要修改可选镜像的参数了(#不要删除),一旦开启mirror,在后续的增加节点等,就不能只加入primary节点了,对应的mirror节点也要加入

3.可以通过修改该文件直接初始化一个数据库,就不用在启动gp后,指定系统数据库(如template1)来新建数据库




# FILE NAME: gpinitsystem_config       文件名:gpinitsystem_config




# Configuration file needed by the gpinitsystem  配置文件所需的gpinitsystem




################################################

#### REQUIRED PARAMETERS         所需的参数

################################################




#### Name of this Greenplum system enclosed in quotes.这个Greenplum系统加引号的名字。

ARRAY_NAME="EMC Greenplum DW"                         array_name =“EMC Greenplum数据仓库”   




#### Naming convention for utility-generated data directories.

SEG_PREFIX=gpseg




#### Base number by which primary segment port numbers 

#### are calculated.             计算主段端口号的基本数。

PORT_BASE=40000




#### File system location(s) where primary segment data directories 

#### will be created. The number of locations in the list dictate

#### the number of primary segments that will get created per

#### physical host (if multiple addresses for a host are listed in 

#### the hostfile, the number of segments will be spread evenly across

#### the specified interface addresses).

declare -a DATA_DIRECTORY=(/data/primary)将创建主段数据目录的文件系统位置




#### OS-configured hostname or IP address of the master host.操作系统配置的主机名或IP地址的主机

MASTER_HOSTNAME=master




#### File system location where the master data directory 

#### will be created.                        将创建主数据目录的文件系统位置。

MASTER_DIRECTORY=/data/master





#### Port number for the master instance. 主实例的端口号。

MASTER_PORT=5432




#### Shell utility used to connect to remote hosts.  用于连接到远程主机的ssh。

TRUSTED_SHELL=ssh




#### Maximum log file segments between automatic WAL checkpoints.动 WAL checkpoints检查点之间的最大日志文件段

CHECK_POINT_SEGMENTS=8




#### Default server-side character set encoding.默认的服务器端字符集编码。

ENCODING=UNICODE




################################################

#### OPTIONAL MIRROR PARAMETERS               可选的镜像参数

################################################




#### Base number by which mirror segment port numbers 

#### are calculated.                            计算镜像段端口号的基本数。

MIRROR_PORT_BASE=50000                        




#### Base number by which primary file replication port 

#### numbers are calculated.                               计算主文件复制端口号的基本编号。

REPLICATION_PORT_BASE=41000




#### Base number by which mirror file replication port 

#### numbers are calculated.                                 计算镜像文件复制端口号的基数。

MIRROR_REPLICATION_PORT_BASE=51000




#### File system location(s) where mirror segment data directories 

#### will be created. The number of mirror locations must equal the

#### number of primary locations as specified in the 

#### DATA_DIRECTORY parameter.

declare -a MIRROR_DATA_DIRECTORY=(/data/mirror)

建立节点的镜像mirror节点的地址




################################################

#### OTHER OPTIONAL PARAMETERS         其他可选参数

################################################




#### Create a database of this name after initialization.     初始化后创建这个名称的数据库。

#DATABASE_NAME=name_of_database




#### Specify the location of the host address file here instead of

#### with the the -h option of gpinitsystem.

在这里指定主机地址文件的位置而不是与非H选择gpinitsystem。


#MACHINE_LIST_FILE=/home/gpadmin/gpconfigs/hostfile_gpinitsystem

推荐阅读
author-avatar
百变精装绣
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有