GP database parameter configuration

Operating system : Windows is not supported, the following UNIX-like operating systems are supported, and RHEL 6 is preferred.

  • SUSE Linux SLES 10.2 or higher;
  • CentOS 5.0 or higher;
  • RedHat Enterprise Linux 5.0 or higher;
  • Solaris x86 v10 update 7
  • file system :
    • It is recommended to use XFS file system under Linux, and ZFS is recommended under Solaris
    • For Raid, choose Hard Raid or Soft Raid according to your needs. If you need more space, it is recommended to use Raid. If you have higher performance requirements, you can choose Raid 1+0.
  • CPU:
    • If you only have a few processes running on a single processor, consider a faster CPU (Intel is the leader in single-core speed). Conversely, if you have a lot of concurrent processes running on all processors, consider having more cores (AMD excels at multi-core processing).
    • The corresponding relationship between the number of CPUs on the host and segments: One CPU is configured with one main segment.
  • Memory : In GP, ​​memory is mainly used to aggregate and save intermediate results (such as sorting, HashJoin, etc.) during SQL execution. If the memory is not enough, GP will choose to use disk cache data, which greatly reduces the performance of SQL execution.
  • Network : GP recommends configuring a gigabit NIC for each primary segment on the segment machine, or configuring each machine to have a 10 gigabit NIC.

Server system parameter configuration

Under Linux , three types of parameters generally need to be modified to optimize GP performance: shared memory, network, and user restrictions.

  • Shared memory and network parameter configuration
Server parameter default value best value
kernel.shmmax 5000000000 5000000000 (modification is not recommended)
kernel.shmmni 4096 4096 (modification not recommended)
kernel.shmall 40000000000 40000000000 (modification not recommended)
kernel.sem 250 5120000 100 20480 250 5120000 100 20480
kernel.sysrq 1 1
kernel.core_uses_pid 1 1
kernel.msgmnb 65536 65536
kernel.msgmax 65536 65536
kernel.msgmni 2048 2048
net.ipv4.tcp_syncookies 1 1
net.ipv4.ip_forward 0 0
net.ipv4.conf.default.accept_source_route 0 0
net.ipv4.tcp_tw_recycle 1 1
net.ipv4.tcp_max_syn_backlog 4096 4096
net.ipv4.conf.default.rp_filter 1 1
net.ipv4.conf.default.arp_filter 1 1
net.ipv4.conf.all.arp_filter 1 1
net.ipv4.ip_local_port_range 1025 65535 1025 65535
net.core.netdev_max_backlog 10000 10000
vm.overcommit_memory 2 Unique suggested value –> 2
  • Modify file limit

    • soft nofile 65536
    • hard nofile 65536
    • soft nproc 131072
    • hard nproc 131072
  • I/O parameter configuration

    • The read-ahead size of the device containing the data directory should be set to 16384

      /sbin/blockdev --getra /dev/sdb16384
      
    • The I/O scheduling algorithm for the device containing the data directory is set to deadline.

      # cat /sys/block/sdb/queue/schedulernoop anticipatory [deadline] cfq
      
    • Increase the number of operating system files and processes through /etc/security/limits.conf .

      * soft nofile 65536* hard nofile 65536* soft nproc 131072* hard nproc 131072
      
    • Enable dumping of core files and save to a known location. Make sure the core dump file is allowed in limits.conf.

      kernel.core_pattern = /var/core/core.%h.%t# grep core /etc/security/limits.conf* soft core unlimited
      
  • The port configuration
    ip_local_port_range setting should not conflict with the Greenplum Database port range, for example:

    net.ipv4.ip_local_port_range = 3000
    65535PORT_BASE=2000MIRROR_PORT_BASE=2100REPLICATION_PORT_BASE=2200MIRROR_REPLICATION_PORT_BASE=2300
    

Backup Node Allocation Skills

If a mirror node is configured, it will be distributed on all segments. By default, all standby nodes corresponding to the primary node on the same server will be allocated on one server, so that once a computing node dies, all standby nodes will be on the same server. On the server, performance is reduced by 50%. When initializing the database, you can specify the -S parameter to break up the standby nodes corresponding to the master node on the unified server to refer to different servers in the cluster.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326402460&siteId=291194637