Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101338933
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: DB2/Informix

2008-03-19 20:30:30

  
Problem 
How to allocate a large memory space for Informix shared memory segments on Red Hat Linux 3 (RHEL3).  
  
Solution 
PROBLEM
When you try to allocate Informix IDS shared memory above 1.8 GB (Gigabytes) on Red Hat Linux 3 you get the error message:

13:52:26  shmat: [ENOMEM][12]: out of available data space, check system memory parameters (e.g. MAXMEM).

reported in the online log file.

SCOPE
The following products and operating systems are affected:
Product Name Product Version(s) Hardware Vendor Operating System 
IBM? Informix? Dynamic Server? 10.00.UC3  All Red Hat Linux 3 

CAUSE
The limitation of 1.8 GB is due to the placement of the Informix IDS Shared Memory base address, which by default is 0x44000000.
Important: This is only one possible cause of the problem. If this document does not provide you with a solution to your problem, you should search for other documents that refer to this topic.

SOLUTION
The layout of shared memory can be inspected by running this command, where "pid" is the process id of the main CPU VP :
> cat /proc/"pid"/maps

089f8000-08b7c000 rw-p 009b0000 08:02 655537     /usr3/products/10.0/bin/oninit
08b7c000-08bfe000 rw-p 00000000 00:00 0 
0a01b000-0a03c000 rw-p 00000000 00:00 0 

44000000-45419000 rw-s 00000000 00:04 8519685    /SYSV52c44801 (deleted)
45419000-49419000 rw-s 00000000 00:04 8552455    /SYSV52c44802 (deleted)
49419000-494a0000 rw-s 00000000 00:04 8585224    /SYSV52c44803 (deleted)

b75ea000-b75ed000 rw-p 00001000 00:00 0
bffbc000-c0000000 rwxp fffc0000 00:00 0
So, with the default SHMBASE, a total shared memory allocation (i.e. RESIDENT plus MESSAGE plus VIRTUAL) of:
0xb75ea000 - 0x44000000 = 0x735EA000
= 1935581184
= 1,845 MB approximately
can be achived.
This can be seen by this output of the "onstat" command:
>onstat -g seg
IBM Informix Dynamic Server Version 10.00.UC3     -- On-Line -- Up 00:00:16 -- 1821120 Kbytes
Segment Summary:
id       key        addr     size       ovhd     class blkused  blkfree
8617989  1388595201 44000000 21073920   215476   R     5141     4
8650759  1388595202 45419000 1843200000 56904    V     3490     446510  
8683528  1388595203 b31e9000 552960     672      M     135      0
Total:   -          -        1864826880 -        -     8766     446514
   (* segment locked in memory)
However, if the Shared Memory Base address is lowered down from 0x44000000 to 0x0b000000, a total memory allocation of :
0xb75ea000 - 0x0b000000 = 0xAC5EA000
= 2891882496
= 2,757 MB approximately
can be acheived.
Set: 
SHMBASE 0xB000000L
in the "onconfig" file, and increase shared memory parameters to utilise more memory.
> onstat -g seg
IBM Informix Dynamic Server Version 10.00.UC3     -- On-Line -- Up 00:00:21 -- 2721120 Kbytes
Segment Summary:
id       key        addr     size       ovhd     class blkused  blkfree
8880133  1388595201 b000000  21073920   215476   R     5141     4
8912903  1388595202 c419000  2764800000 85024    V     3486     671514
8978441  1388595204 b10d1000 552960     672      M     135      0
Total:   -          -        2786426880 -        -     8762     671518
   (* segment locked in memory)
> cat /proc/731/maps

089f8000-08b7c000 rw-p 009b0000 08:02 655537     /usr3/products/10.0/bin/oninit
08b7c000-08bfe000 rw-p 00000000 00:00 0
08f32000-08f53000 rw-p 00000000 00:00 0
0b000000-0c419000 rw-s 00000000 00:04 10813445   /SYSV52c44801 (deleted)
0c419000-5ea75000 rw-s 00000000 00:04 10846215   /SYSV52c44802 (deleted)
5ea75000-b10d1000 rw-s 00000000 00:04 10878984   /SYSV52c44803 (deleted)
b10d1000-b1158000 rw-s 00000000 00:04 10911753   /SYSV52c44804 (deleted)
b75ea000-b75ed000 rw-p 00000000 00:00 0
bffbe000-c0000000 rwxp fffc0000 00:00 0
Note that the operating system has split the virtual memory segment into 2 equal sizes, as the virtual segment is greater than 2 GB and the operating system segment size has been limited to 2 GB:
> ipcs -ma
------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x52c44801 10813445   root      660        21073920   14
0x52c44802 10846215   root      660        1382400000 14
0x52c44803 10878984   root      660        1382400000 14
0x52c44804 10911753   root      666        552960     14
The product is designed to work this way.
 
阅读(758) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~