修改系統ulimit值

來源:互聯網
上載者:User

標籤:修改系統ulimit值

    


修改/etc/security/limits.conf

* soft   nofile   32768                    
* hard nofile 65536


注意:

這個當中的硬限制是實際的限制,而軟式節流,是warnning限制,只會做出warning;其實ulimit命令本身就有分軟硬設定,加-H就是硬,加-S就是軟
預設顯示的是軟式節流,如果運行ulimit命令修改的時候沒有加上的話,就是兩個參數一起改變。


生效:

重新登陸即可(reboot其實也行)我分別用root和www使用者登陸,用ulimit -a分別查看確認,做這之前最好是重啟下ssh服務,service sshd restart。



[[email protected] ~]# ulimit -a

core file size          (blocks, -c) 0

data seg size           (kbytes, -d) unlimited

scheduling priority             (-e) 0

file size               (blocks, -f) unlimited

pending signals                 (-i) 127448

max locked memory       (kbytes, -l) 64

max memory size         (kbytes, -m) unlimited

open files                      (-n) 32768

pipe size            (512 bytes, -p) 8

POSIX message queues     (bytes, -q) 819200

real-time priority              (-r) 0

stack size              (kbytes, -s) 10240

cpu time               (seconds, -t) unlimited

max user processes              (-u) 127448

virtual memory          (kbytes, -v) unlimited

file locks                      (-x) unlimited



[[email protected] ~]# ulimit -n

32768



本文出自 “Fate” 部落格,請務必保留此出處http://czybl.blog.51cto.com/4283444/1535798

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.