trying to free virtual memory
Posted in 2009
Kamran ran several IDS instances on one machine and found virtual memory grew over time (partly from sessions idle for days); killing idle sessions didn't return memory, so only restarting the instance freed it. Replies suggested running 'onmode -F' (optionally via cron, or scheduled in the IDS 11 scheduler with admin('onmode','F')), plus a developerWorks tip for terminating idle users, and fixing the app to close/free cursors and prepared statements. Kamran noted onmode -F often didn't help; Rob Schmitz explained it only frees entirely unused virtual segments — check 'onstat -g seg' for V-class segments with blkused near 1.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: General Discussion
Hi, We are running more than one instance of Informix IDS on single machine. We observed that there are some issues with our application that with the passage of time idle sessions keep on increasing (idle for days doing nothing). The virtual memory also keep on increasing. If we find and kill the long idle sessions, even then virtual memory is not get free which can be used by other instance running on same machine. The only way to free that memory we found is to restart the instance. Please suggest, how can we cope with this problem. regards, Kamran
I use the command:
# onmode -F
HTH
Jonathan B. Smaby
Pomona College
phone: (909) 621-8506
email: jonathan.smaby@pomona.edu
--
"If everyone is thinking alike, someone isn't thinking."
- George S. Patton, U.S. Army General (Nov. 11, 1885 - Dec. 21, 1945)
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
KAMRAN HAQ
Sent: Tuesday, June 02, 2009 8:50 AM
To: ids@iiug.org
Subject: trying to free virtual memory [15886]
Hi,
We are running more than one instance of Informix IDS on single machine.
We
observed that there are some issues with our application that with the
passage
of time idle sessions keep on increasing (idle for days doing nothing).
The
virtual memory also keep on increasing. If we find and kill the long
idle
sessions, even then virtual memory is not get free which can be used by
other
instance running on same machine. The only way to free that memory we
found is
to restart the instance. Please suggest, how can we cope with this
problem.
regards,
Kamran
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.
Have you tried running onmode -F on each instance to release unused shared
memory from the instance back to the OS?
Second, fix your apps so that they are properly closing and freeing prepared
statements and cursors that are no longer needed. These are what are taking
up memory in the servers and forcing the servers to allocate additional
shared memory segments.
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Tue, Jun 2, 2009 at 11:50 AM, KAMRAN HAQ <khaq@i2cinc.com> wrote:
> Hi,
> We are running more than one instance of Informix IDS on single machine. We
> observed that there are some issues with our application that with the
> passage
> of time idle sessions keep on increasing (idle for days doing nothing). The
> virtual memory also keep on increasing. If we find and kill the long idle
> sessions, even then virtual memory is not get free which can be used by
> other
> instance running on same machine. The only way to free that memory we found
> is
> to restart the instance. Please suggest, how can we cope with this problem.
>
> regards,
> Kamran
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636c5b54f48a001046b600b7b
We also have an crontab process schedulled to execute the "onmode -F"
command on each database server.
And we also optimized our virtual memory sizes, to increase the inicial
and additional segments.
Regards.
Alexandre Marini
Analista de Tecnologia da Informação - DBA
msn: alexandre_marini@hotmail.com
SEFAZ-MS / UIMP / Sistemas: Fronteiras e SIG-DW
Jonathan Smaby escreveu:
> I use the command:
>
> # onmode -F>
> HTH
>
> Jonathan B. Smaby
> Pomona College
> phone: (909) 621-8506
> email: jonathan.smaby@pomona.edu
>
If you are using version 11 you can schedule this in the database
scheduler. The
example below will run it once a day at 1AM.
INSERT INTO ph_task
(
tk_name,
tk_type,
tk_group,
tk_description,
tk_execute,
tk_start_time,,tk_frequency
)
VALUES
(
"Free IDS Memory",
"TASK",
"PERFORMANCE",
"Fee IDS Memory.",
"execute function admin('onmode','F')",
DATETIME(01:00:00) HOUR TO SECOND,
INTERVAL ( 1 ) DAY TO DAY
);
John F. Miller III
STSM, Support Architect
miller3@us.ibm.com
503-578-5645
IBM Informix Dynamic Server (IDS)
=
From: "Art Kagel" <art.kagel@gmail.com> =
=
To: ids@iiug.org =
=
Date: 06/02/2009 09:32 AM =
=
Subject: Re: trying to free virtual memory [15890] =
=
Sent by: ids-bounces@iiug.org =
=
Have you tried running onmode -F on each instance to release unused sha=
red
memory from the instance back to the OS?
Second, fix your apps so that they are properly closing and freeing
prepared
statements and cursors that are no longer needed. These are what are ta=
king
up memory in the servers and forcing the servers to allocate additional=
shared memory segments.
Art
Art S. Kagel
Oninit (?www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinion=
s
and
do not reflect on my employer, Oninit, the IIUG, nor any other organiza=
tion
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any
entity
with which I am affiliated nor those of the entities themselves.
On Tue, Jun 2, 2009 at 11:50 AM, KAMRAN HAQ <khaq@i2cinc.com> wrote:
> Hi,
> We are running more than one instance of Informix IDS on single machi=
ne.
We
> observed that there are some issues with our application that with th=
e
> passage
> of time idle sessions keep on increasing (idle for days doing nothing=
).
The
> virtual memory also keep on increasing. If we find and kill the long =
idle
> sessions, even then virtual memory is not get free which can be used =
by
> other
> instance running on same machine. The only way to free that memory we=
found
> is
> to restart the instance. Please suggest, how can we cope with this
problem.
>
> regards,
> Kamran
>
>
>
>
***********************************************************************=
********
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636c5b54f48a001046b600b7b
***********************************************************************=
********
Forum Note: Use "Reply" to post a response in the discussion forum.
=
If you are version 11 and want to kill idle user try this. http://www.ibm.com/developerworks/blogs/page/idsteam?entry=3Dterminate_= idle_users_with_the John F. Miller III STSM, Support Architect miller3@us.ibm.com 503-578-5645 IBM Informix Dynamic Server (IDS) = From: "KAMRAN HAQ" <khaq@i2cinc.com> = = To: ids@iiug.org = = Date: 06/02/2009 08:52 AM = = Subject: trying to free virtual memory [15886] = = Sent by: ids-bounces@iiug.org = = Hi, We are running more than one instance of Informix IDS on single machine= . We observed that there are some issues with our application that with the passage of time idle sessions keep on increasing (idle for days doing nothing).= The virtual memory also keep on increasing. If we find and kill the long id= le sessions, even then virtual memory is not get free which can be used by= other instance running on same machine. The only way to free that memory we f= ound is to restart the instance. Please suggest, how can we cope with this prob= lem. regards, Kamran ***********************************************************************= ******** Forum Note: Use "Reply" to post a response in the discussion forum. =
We observed that "onmode -F" usually does not free the memory. But sometimes
it does.
regards,
Kamran
This is an old gripe going back millennia (or it just seems that way!)
KAMRAN HAQ wrote:
> We observed that "onmode -F" usually does not free the memory. But sometimes
> it does.
> regards,
> Kamran
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
Kamram,
onmode -F will only free completely unused virtual memory segments. If you run"onstat -g seg" to view the virtual memory segments you can see if any are
candidates for being freed. The last section, named Segment Summary, will have
lines with a V in the class column. These are the lines you're interested in.
If the value under the blkused column is greater than 1, then onmode -F will
not free it. (If memory serves, the minimum is 1 - must be some sort of
overhead.) HTH
Rob Schmitz
Embarq Data Management
rob.b.schmitz@embarq.com
www.embarq.com
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of KAMRAN
HAQ
Sent: Wednesday, June 03, 2009 10:20 AM
To: ids@iiug.org
Subject: Re: trying to free virtual memory [15922]
We observed that "onmode -F" usually does not free the memory. But sometimes
it does.
regards,
Kamran
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g