shared memory Configuration

Shared Memory Configuration

blueline.gif

McIDAS-X 200x uses shared memory for a variety of tasks including frame. allocation. By default, the shared memory facility is activated and should have sufficient maximum segment size on HP, IBM and SGI systems. However, this is not true for Sun systems running Solaris 2.x or Digital systems running True64. On Linux systems, the amount of available shared memory appears is equivalent to the combination of physical RAM and swap.

The system administrator should complete the steps below the first time McIDAS-X 200x is installed on Sun Solaris or Digital True64 workstations or if they desire to increase shared memory defaults on HP, IBM, or SGI systems.

Sun Solaris 2.X
SGI IRIX 6.x
HP HP-UX 10, 11
IBM AIX
Compaq Tru64 UNIX
RedHat Linux
FreeBSD 4.[789]
MacOS-X 7.4.0

Sun Solaris 2.x

The system administrator must complete the steps below the first time McIDAS-X is installed on a Sun workstation running Solaris 2. x .

1. Force the kernel to activate the shared memory system at boot time by adding the line below to the appropriate location in the file
/etc/system .


forceload: sys/shmsys

2. Check the maximum size of a shared memory segment using the command below. The value is indicated in bytes; the example lists a 512 MB maximum shared memory segment.

Type: /usr/sbin/sysdef | grep SHMMAX


536870912 max shared memory segment size (SHMMAX)

If your value is less than 512 MB, go to step 3. If your value is 512 MB or greater, go to step 4.

3. Set the shared memory size to 512 MB by adding the line below to the appropriate location in the file /etc/system .


set shmsys:shminfo_shmmax = 536870912

4. Reboot the system so the forceload entry and 512 MB maximum shared memory size take effect.

SGI IRIX 6.x

On Irix, SHMMAX defaults to 512 MB (0x20000000 bytes), so tuning this parameter is unlikely to be needed. SHMMAX is found in /var/sysgen/mtune/shm.

HP HP-UX 10, 11

On HP-UX 10 and 11, the maximum value for SHMMAX is 1024 MB (0x40000000; the default value for 64 MB (0x04000000). SHMMAX is found in /etc/conf/master.d/core-hpux.

The procedure for changing the parameter is similar, if not identical, to the one described for HP-UX 9.

One way to check the current value of SHMMAX is to enter the following command:

Type: grep SHMMAX /etc/master

If the grep does not print anything, you are using the default value of 64 MB. If the grep prints something, the output might look like this:

 shmmax          SHMMAX              0X20000000 

The value is bytes, so here the maximum segment size has been set to 512 MB.

IBM AIX 4.x

The shmget(2) man page says that the maximum shared-memory segment size is 256 MB (0x10000000); this limit does not appear to be tunable.

Compaq Tru64 UNIX

The easiest way to increase shared-memory allocation on True64 is to use the GUI called dxkerneltuner, but one can also use the sysconfigdb command-line interface.

Running dxkerneltuner and increasing the shared-memory size to 64 MB will result in the following entry in the file /etc/sysconfigtab:

 ipc:
       shm-max=67108864
The following are the out-of-the-box defaults for the ipc subsystem for OSF/1 Version 4.0. They may be helpful for True64:
% sysconfig -q ipc
ipc:
msg-max = 8192
msg-mnb = 16384
msg-mni = 64
msg-tql = 40
shm-max = 4194304
shm-min = 1
shm-mni = 128
shm-seg = 32
sem-mni = 16
sem-msl = 25
sem-opm = 10
sem-ume = 10
sem-vmx = 32767
sem-aem = 16384
num-of-sems = 60
max-kernel-ports = 22487
port-hash-max-num = 1124350
port-reserved-max-num = 22487
set-max-num = 1029
ssm-threshold = 8388608
ssm-enable-core-dump = 1

RedHat Linux

There appears to be two ways of (re)defining the amount of shared memory in your system (tips thanks to Dave Glowacki of SSEC):

  • add this line to your /etc/rc.d/rc.local file:

    echo shared_memory_size > /proc/sys/kernel/shmmax

    (where shared_memory_size is the amount of shared memory you want to declare in bytes) and reboot.

    Note: since this will be the last thing run before your system comes up, your McIDAS session won't get a larger shared memory segment if it's started during the boot process).

  • a more permanent solution would be to change the value of SHMMAX in /usr/src/linux/include/asm/shmparam.h and rebuild your kernel

FreeBSD 4.[789]

Shared memory parameters are only read when the system goes from single user to multi user mode.

Add setting of shared memory max to /etc/sysctl.conf

# $FreeBSD: src/etc/sysctl.conf,v 1.1.2.3 2002/04/15 00:44:13 dougb Exp $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#
kern.ipc.shmmax=536870912
and then reboot.

MacOS-X 7.4.0 (Panther)

In the Panther release of MacOS-X, shared memory is set in the file /etc/rc. The default settings will look something like:

# System tuning
sysctl -w kern.maxvnodes=$(echo $(sysctl -n hw.physmem) '33554432 / 512 * 1024 +p'|dc)
sysctl -w kern.sysv.shmmax=4194304
sysctl -w kern.sysv.shmmin=1
sysctl -w kern.sysv.shmmni=32
sysctl -w kern.sysv.shmseg=8
sysctl -w kern.sysv.shmall=1024

We recommend changing this to:

# System tuning
sysctl -w kern.maxvnodes=$(echo $(sysctl -n hw.physmem) '33554432 / 512 * 1024 +p'|dc)
sysctl -w kern.sysv.shmmax=536870912
sysctl -w kern.sysv.shmmin=1
sysctl -w kern.sysv.shmmni=4096
sysctl -w kern.sysv.shmseg=4096
sysctl -w kern.sysv.shmall=131072

After making these changes, the system will need to be rebooted for the changes to take effect. <!--


[Unidata McIDAS-X HomePage] [Go to Previous] [Go to Next]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17065702/viewspace-622340/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/17065702/viewspace-622340/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值