如何/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.
文章整理:西部数码--专业提供域名注册、虚拟主机服务 相关文章
热点关注
IDC资讯
虚拟主机
域名注册
托管租用
vps主机
智能建站
网站运营 建站经验 策划盈利 搜索优化 网站推广 免费资源 网站联盟 联盟新闻 联盟介绍 联盟点评 网赚技巧 行业资讯 业界动态 搜索引擎 网络游戏 门户动态 电子商务 广告传媒 网络编程 Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它 服务器技术 Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护 软件技巧 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷 Internet Explorer 网页制作 FrontPages Dreamweaver Javascript css photoshop fireworks Flash 程序设计 Java技术 C/C++ VB delphi 网络知识 网络协议 网络安全 网络管理 组网方案 Cisco技术 操作系统 Win2000 WinXP Win2003 Mac OS Linux FreeBSD |



