如何/etc/system中的descriptors参数,我需要的是永久的实现,需要配置成1024,我在csh中,使用limit descriptors 1024后,一退出该会话后,再重新登陆,有变成默认的了! ( 版本7) 现在有没有好的办法,只实现一个用户下的环境,最好不要重起机器!

race 回复于:2003-12-12 23:57:05
能够参考Solaris Tunable Parameters Reference Manual
docs.sun.com能够下载

dw1234 回复于:2003-12-16 11:35:43
文档我已看过了,写得不是很细,能不能给出个例子?
另外,假如要limit descriptors 4096 是否需要重新起机器?
假如我从该会话结束后,是否limit就失效了?
能不能给个正面的答复? 谢谢!

race 回复于:2003-12-16 11:40:07
没做过这些修改,l单独使用应该立即生效,修改etc/system必须启动

laoxia 回复于:2003-12-16 11:55:58
两种方式:

1。把 ulimit -n 1024 在那个进程的起动脚本中(在/etc/rc#.d下)。如此只改变一
个某一具体进程的fd限制。

2。在/etc/system里设set rlim_fd_cur=1024 然后重起机器。这样改变整个系统的
fd限制。

laoxia 回复于:2003-12-16 11:59:40
[size=18:e3d03aafe8][b:e3d03aafe8]Solaris Kernel Tuning[/b:e3d03aafe8][/size:e3d03aafe8]

sysdef -i reports on several system resource limits. Other parameters can be checked on a running system using adb -k :


[color=red:e3d03aafe8]adb -k /dev/ksyms /dev/mem
parameter-name/D
^D (to exit) [/color:e3d03aafe8]More information on kernel tuning is available in Sun's online documentation.


[color=red:e3d03aafe8]maxusers[/color:e3d03aafe8]
The maxusers kernel parameter is the one most often tuned. By default, it is set to the number of Mb of physical memory or 1024, whichever is lower. It cannot be set higher than 2048.

Several kernel parameters are set when maxusers is set unless otherwise overridden by the /etc/system file. Some of these formulas differ between different versions of Solaris:

[color=red:e3d03aafe8]max_nprocs[/color:e3d03aafe8]: Number of processes = 10 (16 x maxusers)
[color=red:e3d03aafe8]ufs_ninode[/color:e3d03aafe8]: Inode cache size = (17xmaxusers) 90 (Solaris 2.5.1) or 4x(maxusers max_nprocs) 320 (Solaris 2.6-8). See the Disk I/O page for more information.
[color=red:e3d03aafe8]ncsize[/color:e3d03aafe8]: Name lookup cache size = (17xmaxusers) 90 (Solaris 2.5.1) or 4x(maxusers max_nprocs) 320 (Solaris 2.6-8). See the Disk I/O page for more information.
[color=red:e3d03aafe8]ndquot[/color:e3d03aafe8]: Quota table size = (maxusers x 10) max_nprocs
[color=red:e3d03aafe8]maxuproc[/color:e3d03aafe8]: User process limit = max_nprocs - 5


[color=red:e3d03aafe8]ptys[/color:e3d03aafe8]
Solaris 8 dynamically sizes the number of ptys available to a system, so you are less likely to run into pty starvation than was the case under Solaris 2.5.1-7. There are still hard system limits that are set based upon hardware configuration, and it may be necessary to increase the number of ptys manually as in Solaris 2.5.1-7.

If the system is suffering from pty starvation, the number of ptys available can be increased by increasing pt_cnt above the default of 48. Solaris 2.5.1 and 2.6 systems should not have pt_cnt set higher than 3844 due to limitations with the telnet and rlogin daemons. Solaris 7 does not have this restriction, but there may be other system issues that prevent setting pt_cnt arbitrarily high. Once pt_cnt is increased, a reconfiguration boot (boot -r) is required to build the ptys.

If pt_cnt is increased, some sources recommend that other variables be set at the same time. Other sources (such as the Solaris2 FAQ) suggest that this advice is spurious and results in a needless consumption of resources. See the notes below before making any of these changes; setting the values too high may result in wasted memory. In any case, one form of these recommendations is:


[color=red:e3d03aafe8]npty[/color:e3d03aafe8]: Set to pt_cnt (see the note below)
[color=red:e3d03aafe8][color=red]nautopush[/color:e3d03aafe8][/color]: Set to twice the value of pt_cnt
[color=red:e3d03aafe8]sadcnt[/color:e3d03aafe8]: Set to same value as pt_cnt

npty limits the number of BSD ptys. These are not usually used by applications, but may need to be increased on a system running a special service. In addition to setting npty in the /etc/system file, the /etc/iu.ap file will need to be edited to substitute the value npty-1 in the third field of the ptsl line. After both changes are made, a boot -r is required for the changes to take effect. Note that Solaris does not support any more than 176 BSD ptys in any case.

sadcnt sets the number of STREAMS addressable devices and nautopush sets the number of STREAMS autopush entries. nautopush should be set to twice sadcnt. Whether or not these values need to be increased as above depends on the types of activity on the system.

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!