Advertisement
albspirit86

increase ulimit open file

Dec 14th, 2014
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. How to increase ulimit open file and user processes in Linux/Centos/RHEL
  2.  
  3. Max Number of ulimit open file : It's provide open file resource availability in linux
  4.  
  5. Increase max number of ulimit open file in Linux.
  6.  
  7. 1- Step : open the sysctl.conf and add this line fs.file-max = 65536
  8.  
  9. vi /etc/sysctl.conf add end of line
  10. fs.file-max = 65536
  11.  
  12. save and exit.
  13.  
  14. 2. Step : vi /etc/security/limits.conf and add below the mentioned
  15.  
  16. * soft nproc 65535
  17. * hard nproc 65535
  18. * soft nofile 65535
  19. * hard nofile 65535
  20. save and exit check max open file ulimit
  21. [root@localhost# ulimit -a
  22. core file size (blocks, -c) 0
  23. data seg size (kbytes, -d) unlimited
  24. scheduling priority (-e) 0
  25. file size (blocks, -f) unlimited
  26. pending signals (-i) 127358
  27. max locked memory (kbytes, -l) 64
  28. max memory size (kbytes, -m) unlimited
  29. open files (-n) 65535
  30. pipe size (512 bytes, -p) 8
  31. POSIX message queues (bytes, -q) 819200
  32. real-time priority (-r) 0
  33. stack size (kbytes, -s) 10240
  34. cpu time (seconds, -t) unlimited
  35. max user processes (-u) 1024
  36. virtual memory (kbytes, -v) unlimited
  37. file locks (-x) unlimited
  38.  
  39. Increase max user processes in Linux
  40.  
  41. Follow the step:
  42.  
  43. vi /etc/security/limits.conf and add below the menstioed
  44.  
  45. * soft nproc 65535
  46. * hard nproc 65535
  47. * soft nofile 65535
  48. * hard nofile 65535
  49. and vi /etc/security/limits.d/90-nproc.conf
  50.  
  51. * soft nproc 65535
  52. * hard nproc 65535
  53. * soft nofile 65535
  54. * hard nofile 65535
  55. save and exit check the user max processes ulimit
  56. [root@localhost# ulimit -a
  57. core file size (blocks, -c) 0
  58. data seg size (kbytes, -d) unlimited
  59. scheduling priority (-e) 0
  60. file size (blocks, -f) unlimited
  61. pending signals (-i) 127358
  62. max locked memory (kbytes, -l) 64
  63. max memory size (kbytes, -m) unlimited
  64. open files (-n) 65535
  65. pipe size (512 bytes, -p) 8
  66. POSIX message queues (bytes, -q) 819200
  67. real-time priority (-r) 0
  68. stack size (kbytes, -s) 10240
  69. cpu time (seconds, -t) unlimited
  70. max user processes (-u) 65535
  71. virtual memory (kbytes, -v) unlimited
  72. file locks (-x) unlimited
  73.  
  74.  
  75. After make changes need to reboot system.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement