473,511 Members | 15,156 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question on Package Cache Overflows

Running DB2 8.1.6A on AIX 5.1

We are experience package cache overflows.

The high water mark for package cache is showing as 16,108,513 bytes,
or
approximately 3933 4K pages.

The package cache size is set at Maxapples * 8
Maxapples is at 500.

Makes the package cache size 4000 (4K pages).

We are not clear on how we can be experiencing overflows when the high
water mark is showing as less than the cfg parameter.

Is it that we are not accounting for overhead on the page?

Thanks in advance.
Gerry

Nov 12 '05 #1
10 4830
Would it not be because the last insert into package cache requested more
than 67 (4000-3933)pages of cache that it would cause it to signal an
overflow.
It would have to "push" something large enough to make room for the request.
I believe that would cause an overflow to be signalled.
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
<da*******@yahoo.com> a écrit dans le message de news:
11**********************@f14g2000cwb.googlegroups. com...
Running DB2 8.1.6A on AIX 5.1

We are experience package cache overflows.

The high water mark for package cache is showing as 16,108,513 bytes,
or
approximately 3933 4K pages.

The package cache size is set at Maxapples * 8
Maxapples is at 500.

Makes the package cache size 4000 (4K pages).

We are not clear on how we can be experiencing overflows when the high
water mark is showing as less than the cfg parameter.

Is it that we are not accounting for overhead on the page?

Thanks in advance.
Gerry


Nov 12 '05 #2
Pierre Saint-Jacques wrote:
Would it not be because the last insert into package cache requested
more than 67 (4000-3933)pages of cache that it would cause it to signal
an overflow.
It would have to "push" something large enough to make room for the
request.
I believe that would cause an overflow to be signalled.
HTH, Pierre.

I'm not privy to the details of the implementation of the cache, but it
may also be that there isn't sufficient contigeous space available
(fragmentation).

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #3
Serge Rielau wrote:
Pierre Saint-Jacques wrote:
Would it not be because the last insert into package cache requested
more than 67 (4000-3933)pages of cache that it would cause it to
signal an overflow.
It would have to "push" something large enough to make room for the
request.
I believe that would cause an overflow to be signalled.
HTH, Pierre.

I'm not privy to the details of the implementation of the cache, but it
may also be that there isn't sufficient contigeous space available
(fragmentation).

Aside.. Do you use SQL Procedures? If so I recommend being generous with
the cache.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #4
"Serge Rielau" <sr*****@ca.ibm.com> wrote in message
news:3j************@individual.net...
I'm not privy to the details of the implementation of the cache, but it
may also be that there isn't sufficient contigeous space available
(fragmentation).

Aside.. Do you use SQL Procedures? If so I recommend being generous with
the cache.

Cheers
Serge

--
Serge Rielau


Is it better to define a fixed cache, or to use the default formula based on
connections?
Nov 12 '05 #5
Mark A wrote:
"Serge Rielau" <sr*****@ca.ibm.com> wrote in message
news:3j************@individual.net...
I'm not privy to the details of the implementation of the cache, but it
may also be that there isn't sufficient contigeous space available
(fragmentation).


Aside.. Do you use SQL Procedures? If so I recommend being generous with
the cache.

Cheers
Serge

--
Serge Rielau

Is it better to define a fixed cache, or to use the default formula based on
connections?

Starting with the default is a good start for a generic use.
But especially in those "no SQL in the App other than CALL" type of apps
where the you have thousands of procs, many of which only containing
only an open cursor or a single UPDATE/DELETE/INSERT statement you
essentially have doubled the number of packages (1 dynamic CALL + 1
procedure) and thrashing packages can become the dominant factor.
Just yesterday I learned from an ISV porting to DB2 where performance
improved 10 fold(!) just by fixing the package cache.
Needless to say they are a lot happier with DB2 now ;-)

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #6
I certainly appreciate all the responses. However I am still wondering
why the 'high water mark' (less than 4K) did not reflect a value that
was more than the set parameter (4K) if there were overflows.

Nov 12 '05 #7

<da*******@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I certainly appreciate all the responses. However I am still wondering
why the 'high water mark' (less than 4K) did not reflect a value that
was more than the set parameter (4K) if there were overflows.


The high water mark will ALWAYS be less than the size of the cache. This is
because the package cache cannot grow to be larger than it's configured
size -- it's a hard limit.

An overflow occurs when a new package needs to be entered in the package
cache and there is not enough contingous free space for it. hence the cache
is deemed to have "overflowed" and something is removed to make room for the
new package.

In your case, seeing a large number of package cache overflows and a
high-water-mark that is very close to the configured size of the package
cache simply means that you need to make your cache larger -- if you make it
large enough, overflows will cease to happen.

If you increase your package cache too large (say you increase it to 16K
pages) and the high-water mark after running for a while is only around 5K
pages, then you can easily see that you have too much package cache and can
reduce it to a "safe" value such as 6K or 8K pages.

The optimal configuration for the package cache is one where the
high-water-mark is very close to the configured size, but with NO overflows.

--
Matt Emmerton
Nov 12 '05 #8
Matt, I thought that since V8 if the package cache is full or close to it,
DB2 would "steal" the required pages to insert the package (still generating
an overflow signal) but also pushing the cache HWM to greater than defined
in the cfg.
In V8.1, the stealing was allowed if db cfg parm. database_memory was not
reached, then stealing happened.
I haven't read all of the intrcacies of V8.2, but I seem to remeber that
V8.2 now "allocates" some memoey buffer from which it can dynamically expand
caches of shared memory, on demand.
Imay have misread stuff but I do clearly rember seeing a HWM higher than
max. defined for both catalog and package cache.
Regards, Pierre.
PS: Overflows will still get signaled anyway.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Matt Emmerton" <me******@nospam.yahoo.com> a écrit dans le message de news:
TM********************@rogers.com...

<da*******@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I certainly appreciate all the responses. However I am still wondering
why the 'high water mark' (less than 4K) did not reflect a value that
was more than the set parameter (4K) if there were overflows.


The high water mark will ALWAYS be less than the size of the cache. This
is
because the package cache cannot grow to be larger than it's configured
size -- it's a hard limit.

An overflow occurs when a new package needs to be entered in the package
cache and there is not enough contingous free space for it. hence the
cache
is deemed to have "overflowed" and something is removed to make room for
the
new package.

In your case, seeing a large number of package cache overflows and a
high-water-mark that is very close to the configured size of the package
cache simply means that you need to make your cache larger -- if you make
it
large enough, overflows will cease to happen.

If you increase your package cache too large (say you increase it to 16K
pages) and the high-water mark after running for a while is only around 5K
pages, then you can easily see that you have too much package cache and
can
reduce it to a "safe" value such as 6K or 8K pages.

The optimal configuration for the package cache is one where the
high-water-mark is very close to the configured size, but with NO
overflows.

--
Matt Emmerton


Nov 12 '05 #9
Pierre,

What you say is possible -- but it is obviously not happening since the HWM
in this case is always less than the configured size.

Matt

"Pierre Saint-Jacques" <se*****@invalid.net> wrote in message
news:GL********************@wagner.videotron.net.. .
Matt, I thought that since V8 if the package cache is full or close to it,
DB2 would "steal" the required pages to insert the package (still generating an overflow signal) but also pushing the cache HWM to greater than defined
in the cfg.
In V8.1, the stealing was allowed if db cfg parm. database_memory was not
reached, then stealing happened.
I haven't read all of the intrcacies of V8.2, but I seem to remeber that
V8.2 now "allocates" some memoey buffer from which it can dynamically expand caches of shared memory, on demand.
Imay have misread stuff but I do clearly rember seeing a HWM higher than
max. defined for both catalog and package cache.
Regards, Pierre.
PS: Overflows will still get signaled anyway.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Matt Emmerton" <me******@nospam.yahoo.com> a écrit dans le message de news: TM********************@rogers.com...

<da*******@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I certainly appreciate all the responses. However I am still wondering
why the 'high water mark' (less than 4K) did not reflect a value that
was more than the set parameter (4K) if there were overflows.


The high water mark will ALWAYS be less than the size of the cache. This is
because the package cache cannot grow to be larger than it's configured
size -- it's a hard limit.

An overflow occurs when a new package needs to be entered in the package
cache and there is not enough contingous free space for it. hence the
cache
is deemed to have "overflowed" and something is removed to make room for
the
new package.

In your case, seeing a large number of package cache overflows and a
high-water-mark that is very close to the configured size of the package
cache simply means that you need to make your cache larger -- if you make it
large enough, overflows will cease to happen.

If you increase your package cache too large (say you increase it to 16K
pages) and the high-water mark after running for a while is only around 5K pages, then you can easily see that you have too much package cache and
can
reduce it to a "safe" value such as 6K or 8K pages.

The optimal configuration for the package cache is one where the
high-water-mark is very close to the configured size, but with NO
overflows.

--
Matt Emmerton

Nov 12 '05 #10
Again, many thanks.

Nov 12 '05 #11

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

Similar topics

1
5582
by: xixi | last post by:
i am using db2 udb v8.1 on win 64 bit, i found this on my db2diag.log 2003-11-12-13.20.05.550001 Instance:DB2 Node:000 PID:1840(db2syscs.exe) TID:3068 Appid:AC100453.G761.00F8D15749BE...
22
3449
by: xixi | last post by:
hi, we are using db2 udb v8.1 for windows, i have changed the buffer pool size to accommadate better performance, say size 200000, if i have multiple connection to the same database from...
2
4173
by: xixi | last post by:
we are using db2 udb v8.1 on win64bit 2003 server, i found this in db2diag.log, our application used jdbc for connection to this remote server, why the overflow number keep increasing, what should...
4
7605
by: xixi | last post by:
the formula for package cache hit ratio is 1 - (package cache inserts/package cache lookups), what the result would be a effective ratio? currently we have cache inserts=25, cache lookups=35, so...
1
1688
by: hype | last post by:
Hi, could anyone explain the relationship between the "Catalog cache heap" in the db2mtrk output and the database config parameter catalogcache_sz. Thanks, Hype.
1
2576
by: aj | last post by:
DB2 v8 FP5 Red Hat AS/EL 2.1 I found the following in my db2diag.log: 2004-09-07-10.01.37.747898 Instance:oltp Node:000 PID:14637(db2agent (NDRDB)) TID:8192 ...
0
1906
by: shterke | last post by:
Good day, I've been monitoring a DB2 system and noticed a low package cache hit ratio, I calculated it based on the formula in the db2 information center: ...
3
2754
by: PaulR | last post by:
Hi, I am trying to understand what invalidates Dynamic Packages in the Package Cache. By monitoring the Size of the Package Cache, it appears the following does 1. Performing a Runstats on...
45
4049
by: Robbie Hatley | last post by:
Hello, group. I've been doing too much C++ programming lately, and I'm starting to become rusty at some aspects of the C way of doing things, esp. efficient low-level data copies. ...
0
7251
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,...
0
7148
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7089
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...
0
7517
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...
0
5673
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5072
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3217
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1581
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 ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.