Re: A question on shared memory usage
Posted in 1998
Octav,
Once Infomrix allocates a shared memory segment it is not
automatically freed when no longer needed.
To make online free shared memeory segments do
onmode -f
If there is no memory being used in a segment it will be freed.
Its just allocated and waiting there, not still being used by your
process.
Jason
On Sat, 07 Feb 1998 08:36:39 -0600, com@netinfo.moldova.net wrote:
>Hi,
>
> I have a question on shared memory allocation in Informix OnLine server.
>
>I have performed a simple test. I've written a small program in 4GL that
>do the following thins:
> 1. Open a cursor on a view of transactions
> 2. Using foreach all the transactions are loaded
> into an array.
> 3. The foreach ends, the cursor is freed.
> 4. We display the data
> 5. The program ends
>
>To check the memory used by server I have used 'onstat -g seg' (as well
>as onstat -g ses).
>
>So, the results:
> blkused
>No programs running 740
>On step 1
>(program started) 770
>
>On step 2 (inside the
> foreach) 854
>On step 3 (end foreach) 831
>On step 4 (display data) 831 -- cursor is freed already
>On step 5
> (exit from program) 766
>
>
>Why when we CLOSE and FREE the cursor all the memory the cursor
>used is not freed. As a result the about ~480 K is locked into
>the shared memory (and this is not a very large set of data
>on which we work).
>May be it should be so, I don't know.
>
>While using more cursors (SQL statements) the memory used by a session
>is getting more and more.
>
>So, in a configuration with about 12 users the shared memory gets to
>100M at the end of the day.
>
>This was tested with Informix Workgroup Server 7.22 UC2 and
>Informix Dynamic Server 7.20 UC2 on SCO 3.2v5.0.2:
>the results were identical on both server versions.
>
>The 4GL was version 6.01UD4. But I don't think this is a 4GL problem.
>
>Thank You,
>Octav
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/ Now offering spam-free web-based newsreading