Re: Shared memory segments never freed
Posted in 2003
Willaert Doris wrote:
> Hi all,
>
> On one of our systems we have the following problem: RS6000 AIX 4.3.2.0 IDS
> version 7.30.UC6
Quite an old version now.
> One of the application programs adds 3 shared memory segments in. When the
> program is terminated, this shared memory segments are never automaticaly
> freed (see output of onstat -g seg)
>
> Informix Dynamic Server Version 7.30.UC6 -- On-Line -- Up 6 days 18:33:05
> -- 246112 Kbytes
>
> Segment Summary:
> id key addr size ovhd class blkused blkfree
> 1 1394821121 30000000 48087040 1592 R 5862 8
> 2 1394821122 40000000 153600000 2940 V 18651 99
> 3 1394821123 50000000 606208 608 M 67 7
> 131077 1394821124 60000000 8388608 724 V 868 156
> 131076 1394821125 70000000 8388608 724 V 206 818
> 6 1394821126 80000000 8388608 724 V 8 1016
>
> 1310727 1394821127 90000000 8388608 724 V 1 1023
> 131080 1394821128 a0000000 8388608 724 V 1 1023
> 1048585 1394821129 b0000000 8388608 724 V 1 1023
> Total: - - 252624896 - - 25665 5173
It appears you already have 3 virtual segments allocated, plus the 3
additional ones. Having 6 virtual segments is not good on any system,
but there is probably a limit of 10 segments in total on your system.
> If we execute an onmode -F the 3 shared memory segments are freed. Why are
> they not automaticaly freed ?
Because it is quite an overhead to allocate a segment. If they are freed
automatically, then they may be required again soon after, thus
incurring additional overhead.
You need to find out why the application requires so much memory, and
either reduce its requirements, or allocate the memory in the first segment.
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /|
| Mydas Solutions Ltd http://MydasSolutions.com |///// / //|
| +-----------------------------------+//// / ///|
| |We value your comments, which have |/// / ////|
| |been recorded and automatically |// / /////|
| |emailed back to us for our records.|/ ////////|
+----------------------+-----------------------------------+-----------+