• 配置greenplum参数


    在进行一个greenplum安装之前需要进行配置一下相关的系统参数,否则很容易出现意想不到的错误.

    1.修改系统参数
    编辑 /etc/sysctl.conf ,以下是最小配置 
    kernel.shmmax = 500000000
    kernel.shmmni = 4096
    kernel.shmall = 4000000000
    kernel.sem = 250 512000 100 2048
    kernel.sysrq = 1
    kernel.core_uses_pid = 1
    kernel.msgmnb = 65536
    kernel.msgmax = 65536
    kernel.msgmni = 2048
    net.ipv4.tcp_syncookies = 1
    net.ipv4.ip_forward = 0
    net.ipv4.conf.default.accept_source_route = 0
    net.ipv4.tcp_tw_recycle = 1
    net.ipv4.tcp_max_syn_backlog = 4096
    net.ipv4.conf.all.arp_filter = 1
    net.ipv4.ip_local_port_range = 1025 65535
    net.core.netdev_max_backlog = 10000
    net.core.rmem_max = 2097152
    net.core.wmem_max = 2097152
    vm.overcommit_memory = 2  
    修改后需要reboot
    2.修改文件打开数等限制
    编辑/etc/security/limits.conf
    * soft nofile 65536
    * hard nofile 65536
    * soft nproc 131072
    * hard nproc 131072
    
    编辑/etc/security/limits.d/90-nproc.conf
    * soft nofile 65536
    * hard nofile 65536
    * soft nproc 131072
    * hard nproc 131072
    
    3.修改scheduler
    编辑scheduler,原先默认是cfq
    echo deadline > /sys/block/vda/queue/scheduler
    [root@bigdata03 ~]# more  /sys/block/vda/queue/scheduler 
    noop anticipatory [deadline] cfq 
    
    4.编辑/boot/grub/grub.conf
    新增 elevator=deadline
    [root @bigdata03 ~]# more /boot/grub/grub.conf
    ...elevator=deadline crashkernel=auto ...
    
    5.编辑设备块大小
    [root@bigdata03 ~]# /sbin/blockdev --setra 16384 /dev/vda
    [root@bigdata03 ~]# /sbin/blockdev --getra /dev/vda
    16384

    具体参考:http://gpdb.docs.pivotal.io/4370/prep_os-system-params.html#topic3

    其实我没改相关系统参数之前,碰到最多的错误就是"设备磁盘空间不足".

    官网给出的修改方案固然可行,不过有更方便的修改方案:

    针对第一条:修改系统参数

    sysctl -p - >> /etc/sysctl.conf <<EOF
    kernel.shmmax = 500000000
    kernel.shmmni = 4096
    kernel.shmall = 4000000000
    kernel.sem = 250 512000 100 2048
    kernel.sysrq = 1
    kernel.core_uses_pid = 1
    kernel.msgmnb = 65536
    kernel.msgmax = 65536
    kernel.msgmni = 2048
    net.ipv4.tcp_syncookies = 1
    net.ipv4.ip_forward = 0
    net.ipv4.conf.default.accept_source_route = 0
    net.ipv4.tcp_tw_recycle = 1
    net.ipv4.tcp_max_syn_backlog = 4096
    net.ipv4.conf.all.arp_filter = 1
    net.ipv4.ip_local_port_range = 1025 65535
    net.core.netdev_max_backlog = 10000
    net.core.rmem_max = 2097152
    net.core.wmem_max = 2097152
    vm.overcommit_memory = 2
    EOF
    这样修改的可以不用reboot
  • 相关阅读:
    四则运算 2
    《你的灯亮着吗》读后感 (前两篇)
    四则运算设计思路
    读书目标
    课堂总结
    人月神话感想
    软件工程概论11
    软件工程概论10
    bnu——GCD SUM (莫比乌斯反演)
    POJ1108_Split Windows 解题报告
  • 原文地址:https://www.cnblogs.com/codeblock/p/5207357.html
Copyright © 2020-2023  润新知