我要评分
获取效率
正确性
完整性
易理解

Removing System Resource Restrictions

Principle

Reasonable resource restrictions and allocations are not only necessary conditions for ensuring system availability, but also closely related to the performance of software running on the system. ulimit can play a great role. It is a simple and effective way to implement resource limitation.

ulimit is used to restrict the resources occupied by the shell startup process. The following restrictions are supported:

  1. Size of the created kernel file
  2. Size of a process data block
  3. Size of the file created by the Shell process
  4. Size of locked memory
  5. Size of the resident memory set
  6. Number of opened file descriptors
  7. Maximum size of the allocated stack
  8. CPU time
  9. Maximum number of threads allowed for a user.
  10. Maximum virtual memory that can be used by the Shell process

To achieve optimal performance in HPC scenarios, you are advised to remove the restrictions on hardware and software resources.

Procedure

  1. Run the following command to modify the /etc/security/limits.conf configuration file.
    1. vi /etc/security/limits.conf
    2. Press I to enter the editing mode and add the following content to the end of the /etc/security/limits.conf configuration file.
      * soft stack unlimited
      * hard stack unlimited
      * soft nproc unlimited
      * hard nproc unlimited
      * soft memlock unlimited
      * hard memlock unlimited
    3. Press Esc, enter :wq!, and press Enter to save the file and exit.