Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1772952
  • 博文数量: 323
  • 博客积分: 5970
  • 博客等级: 大校
  • 技术积分: 2764
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-03 23:13
文章分类

全部博文(323)

文章存档

2018年(2)

2017年(11)

2016年(10)

2015年(27)

2014年(2)

2013年(30)

2012年(197)

2011年(44)

分类: SOLARIS

2015-09-14 15:17:13

 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
阅读(1281) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~