- 论坛徽章:
- 0
|
前几天重新启动服务器后,出现僵尸进程。经过查找终于发现是在/etc/system文件中有个变量maxusers设置为5。在网上搜索说是设置了远程登陆的机器数量,后来发现这个设置有问题。经过苦苦搜索发现了maxusers的解释如下:
The maxusers variable has nothing to do with the number of
user allowed on a system. It's one big knob that scales a number
of other parameters simultaneously. The standard settings and
derivations are more or less as follows, using /etc/system syntax:
* The big knob, scales automatically
set maxusers =
* Maximum number of allowable processes; currently at most 30000
set max_nprocs = 10 + 16 * maxusers
* Max processes per user (5 are reserved for the super user)
set maxuprc = max_nprocs - 5;
* Number of quota structures (need one per user per filesystem
* w/ quotas)
set ndquot = maxusers * NMOUNT / 4 + max_nprocs
* Maximum size of the directory name lookup cache (DNLC)
set ncsize = 4 * (max_nprocs + maxusers) + 320
set ufs_ninode = ncsize
注释掉maxusers的设置后系统僵死进程消失。所以,大家在设置这个参数时一定要注意三个参数一起设置,否则重新启动机器后系统文件生效系统可能就会有问题。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/19014/showart_115842.html |
|