Linux system is an important parameter tuning

Entry into force of the current session

ulimit -u -> to view the current maximum number of processes
ulimit -n -> view the current maximum number of files
ulimit -u xxx -> change the current maximum number of processes to xxx
ulimit -n xxx -> change the current maximum number of files to xxx

Permanent

1.vi /etc/security/limits.conf, add the following line

  • soft noproc 11000
  • hard noproc 11000
  • soft nofile 4100
  • hard nofile 4100 Description:
  • Representatives for all users
    noproc represent the largest number of processes
    nofile represent the maximum number of open files

2. Let Login to accept SSH login program, easy to view the end ulimit -a resource constraints ssh client:

  • 1), vi / etc / ssh / sshd_config
    the value of UserLogin to yes, and the # Notes removed
  • 2), restart sshd service
    /etc/init.d/sshd restart
  • 3), modify environment variables for all users linux file:
    vi / etc / Profile
    ulimit -u 10000
    ulimit -n 4096
    ulimit -d Unlimited
    ulimit -m Unlimited
    ulimit -s Unlimited
    ulimit -t Unlimited
    ulimit -v Unlimited
  • 4), effective
    source / etc / profile

Guess you like

Origin blog.51cto.com/14309075/2414019