Re: A question on shared memory usage
Posted in 1998
Hello,
In article <34dcff94.500279443@10.209.30.200>,
jharris@westpac.com.au wrote:
>
> 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>
Of course I understand this. But my question wasn't about
shared memory segments. It was about the session memory usage
inside a (or some) shared memory segments. The count of blocks used
inside a shared memory segment is shown as --blkused-- by
onstat -g seg. And this blocks should be freed (in my opinion) assoon as a session is freeing some resources (cursors, statements).
So, the question is: why the count of blocks used in a shared memory
segment doesn't change when I close and FREE the cursor ?
Sorry for my bad English. May be this was the cause of confusion.
> 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
>
Octav
----------------------------------------------------------------------------------------------------------------------
>
> >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
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading