zoukankan      html  css  js  c++  java
  • linux 6.4下max_user_processes和open_file修改

    这里只介绍一种永久性的修改方式

    使用root用户修改配置文件:/etc/security/limits.conf

    增加如下内容

    * soft nproc 10240

    * hard nproc 10240

    * soft nofile 10240

    * hard nofile 10240

    其中nofile对应open_files

    nproc对应max_user_processes

    但是在Linux 6.4之后,如果只修改了该文件中的nproc,那么其他非root用户对应的max_user_processes并不会改变,仍然是1024,这个是因为受到了下面这个文件的影响

    /etc/security/limits.d/90-nproc.conf

    查看一下:

    [root@rhf ~]# cat /etc/security/limits.d/90-nproc.conf

    # Default limit for number of user's processes to prevent

    # accidental fork bombs.

    # See rhbz #432903 for reasoning.

    *          soft    nproc    1024

    root     soft    nproc     unlimited

    此时有两种方法解决该问题:

    1、修改/etc/security/limits.d/90-nproc.conf将

    * soft nproc 1024

    修改为:

    * soft nproc 10240

    2、修改/etc/security/limits.conf,将

    * soft nofile 10240

    修改为

    oracle  soft nofile 10240

    我现在一般采用第一种方法

  • 相关阅读:
    Sequence-to-Sequence 论文精读(多层LSTM)
    End-to-End Memory Networks 端到端的记忆网络 精读
    深度之眼PyTorch训练营第二期---16、模型保存与加载
    二叉树
    窗体window
    选项卡tabs
    分割按钮splitbutton
    面板pannel
    分页组件pagination
    信息messager
  • 原文地址:https://www.cnblogs.com/qidongbo/p/8243846.html
Copyright © 2011-2022 走看看