Answer for KodeKloud Question -Linux Resource Limits

 On our Storage server in Stratos Datacenter we are having some issues where nfsuser user is holding hundred of processes, which is degrading the performance of the server. Therefore, we have a requirement to limit its maximum processes. Please set its maximum process limits as below:

a. soft limit = 79

b. hard_limit = 100

Sample Answer:

#login to server 

    ssh <user>@<server>

# switch to root user

    sudo su 

# navigate to below location 

    cd /etc/security/

#Then edit limit.conf file as below

    vi limits.conf
    
    Type i for insert mode in editor and add the following lines ( check the username and limits values form your question )

nfsuser soft nproc 79
nfsuser hard nproc 100

    Now press ESC  and write :wq! to save and exit the editor.

#Finally check the limits by typing this command

    cat /etc/security/limits.conf | grep nproc | grep -v ^#

Note: **The Question copied it for learning purposes.** Commands are correct but based on your question the server, user name, and other details might differ, so please do check.

No comments:

Post a Comment

Featured Post

Answer for Kodekloud DEVOPS Questions - Init container in Kubernetes

Question: 1. Create a Deployment named as ic-deploy-devops. 2. Configure spec as replicas should be 1 , labels app should be ic-devops , ...