zoukankan      html  css  js  c++  java
  • [20190523]修改参数后一些细节注意.txt

    [20190523]修改参数后一些细节注意.txt

    --//昨天远程给别人解决一个小问题,就是配置使用hugepage.一些细节必须注意,通过例子说明问题.

    1.环境:
    # cat /proc/version
    Linux version 2.6.32-220.el6.x86_64 (mockbuild@c6b18n3.bsys.dev.centos.org) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Tue Dec 6 19:48:22 GMT 2011

    2.配置hugepages要修改/etc/security/limits.conf,加入如下注解部分:
    # grep memlock /etc/security/limits.conf
    #        - memlock - max locked-in-memory address space (KB)
    #*   soft  memlock  53248000
    #*   hard  memlock  53248000

    --//当前是没有打开.相当于修改配置文件.登录oracle用户:

    $ ps -ef | grep bas[h] | grep oracl[e]
    oracle   25704 25703  5 10:38 pts/0    00:00:00 -bash
    --//bash进程号=25704

    $ cat /proc/25704/limits
    Limit                     Soft Limit           Hard Limit           Units
    Max cpu time              unlimited            unlimited            seconds
    Max file size             unlimited            unlimited            bytes
    Max data size             unlimited            unlimited            bytes
    Max stack size            10485760             unlimited            bytes
    Max core file size        0                    unlimited            bytes
    Max resident set          unlimited            unlimited            bytes
    Max processes             16384                16384                processes
    Max open files            65536                65536                files
    Max locked memory         65536                65536                bytes
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Max address space         unlimited            unlimited            bytes
    Max file locks            unlimited            unlimited            locks
    Max pending signals       30408                30408                signals
    Max msgqueue size         819200               819200               bytes
    Max nice priority         0                    0
    Max realtime priority     0                    0
    Max realtime timeout      unlimited            unlimited            us

    --//如果你在别的窗口修改/etc/security/limits.conf:
    *   soft  memlock  53248000
    *   hard  memlock  53248000

    --//进程号=25704配置并不会改变,也就是要退出再登录才生效,这样情况下使用这个环境启动数据库肯定无法启动.
    --//在登录1个窗口:

    $ ps -ef | grep bas[h] | grep oracl[e]
    oracle   25704 25703  0 10:38 pts/0    00:00:00 -bash
    oracle   25844 25842  7 10:42 pts/1    00:00:00 -bash

    --//新增加1个窗口,进程号=25844

     $ cat /proc/25844/limits
    Limit                     Soft Limit           Hard Limit           Units
    Max cpu time              unlimited            unlimited            seconds
    Max file size             unlimited            unlimited            bytes
    Max data size             unlimited            unlimited            bytes
    Max stack size            10485760             unlimited            bytes
    Max core file size        0                    unlimited            bytes
    Max resident set          unlimited            unlimited            bytes
    Max processes             16384                16384                processes
    Max open files            65536                65536                files
    Max locked memory         54525952000          54525952000          bytes
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Max address space         unlimited            unlimited            bytes
    Max file locks            unlimited            unlimited            locks
    Max pending signals       30408                30408                signals
    Max msgqueue size         819200               819200               bytes
    Max nice priority         0                    0
    Max realtime priority     0                    0
    Max realtime timeout      unlimited            unlimited            us

    --//注意看下划线. 54525952000/1024 = 53248000 KB.
    --//也就是一些细节在工作中一定要注意.

  • 相关阅读:
    hdu 5524 Subtrees 递推
    一些数论函数
    hdu 5480 Conturbatio (前缀和)
    hdu 5479 Scaena Felix (好坑的简单题)
    hdu 5465 Clarke and puzzle(树状数组 或 前缀和 + Nim游戏)
    uva 10534 Wavio Sequence(LIS)
    MFC简单绘制安卓机器人
    解决kubuntu(KDE4.8.5桌面环境)找不到中文语言包
    Windows系统完全退出VMware方法
    【VC6.0】getline需要输入2次回车才会结束的BUG修复方法
  • 原文地址:https://www.cnblogs.com/lfree/p/10910994.html
Copyright © 2011-2022 走看看