473,778 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 memory usage help

Im runnign various versions of DB2 on various UNIX platforms
(Solaris / AIX).

DB2 is generally eating up about 30% of memory on these systems (4Gb
of RAM, which equates to over a gig). i want to limit DB2s memory
usage to a couple of hundred meg in total for the entire application,
but cannot seem to find out how to do this.

When i check the instance memory usage with db2mtrk, it says its only
using a few Megs. I cannot find out how to limit the whole operation
to something like 250M or 500M or there abouts.

Can anyone help?
Jun 27 '08 #1
12 9946
On May 28, 7:51 am, bomahony <bomah...@gmail .comwrote:
Im runnign various versions of DB2 on various UNIX platforms
(Solaris / AIX).

DB2 is generally eating up about 30% of memory on these systems (4Gb
of RAM, which equates to over a gig). i want to limit DB2s memory
usage to a couple of hundred meg in total for the entire application,
but cannot seem to find out how to do this.

When i check the instance memory usage with db2mtrk, it says its only
using a few Megs. I cannot find out how to limit the whole operation
to something like 250M or 500M or there abouts.

Can anyone help?
Hello,

If you're using DB2 9.5, you can set the INSTANCE_MEMORY database
manager configuration parameter to your desired memory cap, and leave
all other memory configuration parameters at their default (AUTOMATIC)
settings.

If you're using DB2 9 or earlier, you'll likely have to update several
different memory configuration parameters. Your best choice may be to
use the AUTOCONFIGURE command, specifying your desired memory limit.
The AUTOCONFIGURE command will then recommend (and apply, if desired)
changes to various memory configuration parameters to get you
reasonably close to your desired limit.

Cheers,
Liam.
Jun 27 '08 #2
On May 28, 2:37 pm, Liam Finnie <lfin...@ca.ibm .comwrote:
On May 28, 7:51 am, bomahony <bomah...@gmail .comwrote:
Im runnign various versions of DB2 on various UNIX platforms
(Solaris / AIX).
DB2 is generally eating up about 30% of memory on these systems (4Gb
of RAM, which equates to over a gig). i want to limit DB2s memory
usage to a couple of hundred meg in total for the entire application,
but cannot seem to find out how to do this.
When i check the instance memory usage with db2mtrk, it says its only
using a few Megs. I cannot find out how to limit the whole operation
to something like 250M or 500M or there abouts.
Can anyone help?

Hello,

If you're using DB2 9.5, you can set the INSTANCE_MEMORY database
manager configuration parameter to your desired memory cap, and leave
all other memory configuration parameters at their default (AUTOMATIC)
settings.

If you're using DB2 9 or earlier, you'll likely have to update several
different memory configuration parameters. Your best choice may be to
use the AUTOCONFIGURE command, specifying your desired memory limit.
The AUTOCONFIGURE command will then recommend (and apply, if desired)
changes to various memory configuration parameters to get you
reasonably close to your desired limit.

Cheers,
Liam.
Thanks Liam

We havent started with DB2 9.5 yet.

I will look into the autoconfigure option. Is this a live change, or
does the db or instance have to be restarted?

I will look into this command now anyways.
Jun 27 '08 #3
Liam

when i use autoconfigure, is the mem_precent a percentage of system
memory or free memory available?
Jun 27 '08 #4
"bomahony" <bo******@gmail .comwrote in message
news:1e******** *************** ***********@e53 g2000hsa.google groups.com...
Im runnign various versions of DB2 on various UNIX platforms
(Solaris / AIX).

DB2 is generally eating up about 30% of memory on these systems (4Gb
of RAM, which equates to over a gig). i want to limit DB2s memory
usage to a couple of hundred meg in total for the entire application,
but cannot seem to find out how to do this.

When i check the instance memory usage with db2mtrk, it says its only
using a few Megs. I cannot find out how to limit the whole operation
to something like 250M or 500M or there abouts.

Can anyone help?
Effective use of DB2 requires adequate bufferpool sizes (in addition to
other memory uses). Failure to allocate sufficient bufferpool memory is a
seriously misguided. If you don't have 1 GB to allocate for DB2, then you
should think about buying a cheap PC with several GB of memory and running
it on there (Linux or Windows).
Jun 27 '08 #5
On May 28, 10:05 am, bomahony <bomah...@gmail .comwrote:
Liam

when i use autoconfigure, is the mem_precent a percentage of system
memory or free memory available?
Hello,

mem_percent is a percentage of system memory. A lot of the
configuration parameters are updateable on-line, but some aren't, so
you'll likely need to deactivate the db/stop the instance, and
restart, for the full changes to take effect.

From the sounds of it, you really want the 'Simplified Memory
Configuration' feature in DB2 9.5. That, combined with the UNIX/Linux
threaded engine architecture (DB2 on Windows was always threaded), and
other useability enhancements added in 9.5, should make configuring
your DB2 instance much easier.

BTW - if you can't move to 9.5, the more/less equivalent of
sga_max_size in DB2 9 is the 'database_memor y' configuration parameter
(assuming you leave your bufferpool sizes, shared sort space, etc at
AUTOMATIC, DB2 STMM will self-tune those other memory areas to optimal
values within your specified database_memory limit). database_memory
should contain the bulk of memory allocations required by the
instance. However, database_memory does not include agent-private
memory allocations, and instance-wide memory allocations (not sure if
sga_max_size includes all those equivalent memory allocations either).

Cheers,
Liam.
Jun 27 '08 #6
I'm curious as to what you could be using DB2 for in a build process
(at least, in the way described - a few connections, no heavy
processing). Are you testing some SQL against various different engines?
Exactly.
Never run across DB2 memory leaks, personally. Still, if you've found
one, open a PMR (or report it to the Express-C forum if you're using
the free edition).
I just find that DB2 never releases its memory properly, even when
issued db2stop commands.
I want to limit the total amount of memory DB2 uses to a maximum. If
the connections fail after a while because of that, then so be it,
these will be reported in the logs. Only one out of every three or
four builds (multiple builds per night) uses DB2. Currently, db2 uses
up the memory that should be used for other stuff, and the builds get
slower and slower during the night.
I dont understand how this is so hard. All i have to do in oracle is
set one variable (sga_max_size) and viola. Oracle uses 500m max.
The issue is not the quality of DB2 or whether it runs correectly. Its
a matter of limiting what it can use. Nothing else will do.

Assuming you're just using DB2 to test some portable SQL syntax in a
build/test process I suspect your best option is simply to use DB2 9.5
Express-C (the free one).
Not possible. we need to test with specific FPs and versions of DB2
for verification.
As mentioned earlier in the thread, memory management is a /lot/ easier
with 9.5 (you've got the "one parameter to rule them all",
INSTANCE_MEMORY - which sounds rather like Oracle's sga_max_size from
your description). Express-C's limits (2 cores, 2Gb of RAM, IIRC?) fit
well within the limits you wish to impose and it should implement all
the functionality you're interested in testing (assuming it's SQL
intended to be portable, it must be pretty basic?).

If you wish to stick with whatever version you're currently on, the
AUTOCONFIGURE command's mem_percent parameter is percentage of system
memory, not free memory. However, DB2's quite a memory hog - I wouldn't
recommend allocating less than half a gig to it, even for simple test
purposes (9.5's a bit less memory heavy given the new threaded
architecture, although things like the auto memory tuning process can
gobble up some of the savings).

Cheers,

Dave.


I wish i caould run 9.5 with the ability to set it like that. However,
im stuck with what ever version the engineers request. Ill get back to
the mem_percent in my next post.
Jun 27 '08 #7
Last night i set the mem_percent on both a AIX and SOLARIS builder.
There is two DBs on each instance.

AIX is running DB2 8.1 fp11
SOLARIS is running DB2 9.1 fp4

I ran the command :
db2 autoconfigure using mem_percent 15 apply db and dbm after
connecting to BOTH databases per system.

BTW sorry if i have come accross short in any of these replies, this
is getting on my nerves, and unfortunately i dont have a choice in the
matter of what version / db we use.

All of your help is more than welcome.

BTW is there a network GUI monitoring / administration tool available
for DB2, like Oracles Enterprise Manager?

Jun 27 '08 #8
On May 29, 12:31 pm, "Dave Hughes" <d...@waveform. plus.comwrote:
bomahony wrote:
BTW is there a network GUI monitoring / administration tool available
for DB2, like Oracles Enterprise Manager?

That's the control center (db2cc) - although whether you'll find it
much use is another matter; I'm not a fan of it, personally I find the
command line the best way to administer the server - along with the
db2mc (http://db2mc.dfw.ibm.com/) tool to aid with monitoring (only
useful with DB2 9 and above, unfortunately). Anyway...
Thanks Dave

Ive used the db2cc, and also prefer the command line. I was hoping
there was some centralised tool i could use to manage lots of
instances / servers from one location.... Guess not ...

thanks anyways
Jun 27 '08 #9
On May 29, 8:23*am, bomahony <bomah...@gmail .comwrote:
... clipped
That's exactly what the CC allows you to do.
All You need to do is have the DAS running on each server.
From your CC you can then catalog each server's admin node (local or
remote) and then for each server you can catalog each instance and
their db's (local or remote).
This then gives you a central point to manage systems, instances, and
db's.
By the way each das admin cfg has a parameter allowing you to have at
each server a tools catalog or identify a db in the network that will
allow you to centralize each server's tools catalog at a single db
site.
The tools catalog is only required if you set up tasks in the task
center of a system and/or use db2's task scheduling facilities.
Regards, Pierre.
Ive used the db2cc, and also prefer the command line. I was hoping
there was some centralised tool i could use to manage lots of
instances / servers from one location.... Guess not ...

thanks anyways
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3675
by: rbt | last post by:
Would a Python process consume more memory on a PC with lots of memory? For example, say I have the same Python script running on two WinXP computers that both have Python 2.4.0. One computer has 256 MB of Ram while the other has 2 GB of Ram. On the machine with less Ram, the process takes about 1 MB of Ram. On the machine with more Ram, it uses 9 MB of Ram. Is this normal and expected behavior?
2
422
by: Jarvis | last post by:
I've made a testing program to test the memory usage of some Data Forms. I create a MDI parent form with one single MDI child form, which is a Data Form generated by .NET Data Form Wizard. To test the stuff, I keep to open that child data form for about 10 times. the memory usage shown in GC and task manager both increase. Then I close all those forms. and perform GC collect. The memory usage shown in GC falls, however, the memory...
6
3708
by: Ganesan selvaraj | last post by:
I using C# .net. i want to split the text files based of the some condition. my source text file size may be 4 kb to 4 gb. some time when i split the i got the "out of memory exception. when i read from the file i read the 10mb and split the this content and clear the buffer and read the second 10 mb and so on. How can i rectify the problem?
7
4972
by: Jon Trickey | last post by:
We migrated to 8.1 from 7.2 this weekend. Everything ran ok over the weekend, but we have a light user load then (about 200 users.) Today when we had close to 600 users connecting and running applications, the db2syscs.exe process started gobbling up memory until it hit about 1.7 gigs (which seems to be the limit from what I've read) then it started crapping out.. We have shrunk the buffer pools to much lower that they used to be in 7,...
4
6468
by: RH | last post by:
Hi, I am building a windows application that has a feature that retrieves a set of records when a button is clicked. When the records are being retrieved I experience a complete system degradation, including other programs that become unresponsive. Here's what I found while the retrieval process is running: Using the Windows Task Manager, I can see the the "Page File (PF) Usage"
7
7173
by: Clement | last post by:
hi, i have an asp.net site and is using SQL Server 2k. i realize the aspnet_wp.exe memory usage keep growing and i will receive an error for the pages that call the sql connection. others page with no sql connection is fined. At the time when i encounter the error, i check the memory usage for aspnet_wp.exe = 60000kb sqlmangr.exe = 40000kb
7
2438
by: Rich Denis | last post by:
Hello, I have been trying to solve a mysterious memory leak problem and was hoping that you could help me out on my stuck point. First a bit of background. We have two app servers in an app center cluster that are each running a number of web applications. For some reason one of the boxes' asp_wp process keeps recylcing on us. It seems that the memory just grows and grows and then recycles on us. I cam across and have read the...
16
2392
by: JCauble | last post by:
We have a large Asp.net application that is currently crashing our production servers. What we are seeing is the aspnet_wp eat up a bunch of memory and then stop unexpectedly. Does not recycle. Example: After about 5 hours with a concurrent user base of about 150 users the application raises the aspnet_wp memory usage by almost 500MB. If our server guys modify the web.config this data is released and the workerprocess goes back to a...
4
3910
by: Ethan Chan | last post by:
I have recently been deploying a asp.net extranet application. The asp.net worker process starts off with 30MB virtual memory and then upon serving a few pages, the memory usage increases to a WHOOPIN! 200MB and eventully the asp.net process restarts at 300MB and my application becomes "unavailable" with my sessions being destroyed. Is there an explanation why the asp.net process uses that much memory? After i have logged out of my...
1
2047
by: Jean-Paul Calderone | last post by:
On Tue, 22 Apr 2008 14:54:37 -0700 (PDT), yzghan@gmail.com wrote: The test doesn't demonstrate any leaks. It does demonstrate that memory usage can remain at or near peak memory usage even after the objects for which that memory was allocated are no longer live in the process. This is only a leak if peak memory goes up again each time you create any new objects. Try repeated allocations of a large dictionary and observe how memory...
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5368
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.