Securing and Optimizing Linux: RedHat Edition -A Hands on Guide | ||
---|---|---|
Prev | Chapter 6. Linux General Optimization | Next |
Linux itself has a Max Processes per user limit. This feature allows us to control the number of processes an existing user on the server may be authorized to have. To improve performance, we can safely set the limit of processes for the super-user root to be unlimited. Edit the .bashrc file vi /root/.bashrc and add the following line:
ulimit -u unlimited |
[root@deep] /# ulimit -a |
: You may also do ulimit -u unlimited at the command prompt instead of adding it to the /root/.bashrc file.
Increases the system limit on open files for instance a process on Red Hat 6.0 with kernel 2.2.5 could open at least 31000 file descriptors this way and a process on kernel 2.2.12 can open at least 90000 file descriptors this way. The upper bound seems to be available memory. To increases the number of open files to 90000 for the root account do the following: Edit the .bashrc file vi /root/.bashrc and add the following line:
ulimit -n 90000 |
[root@deep] /# ulimit -a |
: In older 2.2 kernels, though, the number of open files per process is still limited to 1024, even with the above changes.