Solaris10中如何设置ndd参数

  Solaris10中如何设置ndd参数  2011-02-14 14:54:43

分类: Linux


在solaris10上,某些内核参数可以通过ndd命令来修改。ndd命令主要用来设置和获取driver configuration parameter。

? 用于列出driver支持的所有参数。例如: ndd /dev/tcp \? 可以列出所有tcp driver参数。 "\"用于避免shell把"?"当作特殊字符。

大部分ndd参数可以通用ndd命令进行在线修改。

如: ndd -set /dev/udp udp_xmit_hiwat 65536

但系统重启后,该更改会失效,一般需要把设置加到启动脚本中。

方式一:加入到/etc/rc2.d/Sxxxx 脚本中

/etc/rc2.d/S99ndd sets the parameters:

ndd -set /dev/udp udp_xmit_hiwat 65536 
ndd -set /dev/udp udp_recv_hiwat 65536

方式二:加入到/etc/inittab脚本中

/etc/inittab set parameters:

n1::sysinit:/usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000 > /dev/console

n2::sysinit:/usr/sbin/ndd -set /dev/udp udp_largest_anon_port 65500 > /dev/console

需要注意,在solaris10上直接加到/etc/system里可能并不会生效。

附:oracle安装文件中对于设置UDP参数的说明

4.2.2 Checking UDP Parameter Settings

The User Data Protocol (UDP) parameter settings define the amount of send and receive buffer space for sending and receiving datagrams over an IP network. These settings affect cluster interconnect transmissions. If the buffers set by these parameters are too small, then incoming UDP datagrams can be dropped due to insufficient space, which requires send-side retransmission. This can result in poor cluster performance.

On Solaris, the UDP parameters are udp_recv_hiwat and udp_xmit_hiwat. On Solaris 10 the default values for these parameters are 57344 bytes. Oracle recommends that you set these parameters to at least 65536 bytes.

To check current settings for udp_recv_hiwat and udp_xmit_hiwat, enter the following commands:

# ndd /dev/udp udp_xmit_hiwat
# ndd /dev/udp udp_recv_hiwat

On Solaris 10, to set the values of these parameters to 65536 bytes in current memory, enter the following commands:

# ndd -set /dev/udp udp_xmit_hiwat 65536
# ndd -set /dev/udp udp_recv_hiwat 65536

On Solaris 9, to set the values of these parameters to 65536 bytes on system restarts, open the /etc/system file, and enter the following lines:

set udp:udp_xmit_hiwat=65536
set udp:udp_recv_hiwat=65536

On Solaris 10, to set the UDP values for when the system restarts, the ndd commands have to be included in a system startup script. For example, The following script. in /etc/rc2.d/S99ndd sets the parameters:

ndd -set /dev/udp udp_xmit_hiwat 65536 
ndd -set /dev/udp udp_recv_hiwat 65536

===========
进程数没有限制,最大进程数为29995个
#ulimit -a
core file size        (blocks, -c) unlimited
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
open files                    (-n) 16384
pipe size          (512 bytes, -p) 10
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) 29995
virtual memory        (kbytes, -v) unlimited
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script> 阅读(336) | 评论(0) | 转发(0) |
评论热议
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值