Solved

db2 on NT unable to allocate memory to bufferpools

Posted on 2004-03-24
7
1,087 Views
Last Modified: 2012-06-27
While Restarting the Database in order to capture the logs, The following commands are used to stop and start the database
 
db2stop force
db2admin stop
db2admin start
db2start
 
After this Db2diag.log says, Unable to allocate memory to bufferpools. Database is starting two tiny bufferpools. At this stage i cannot even open text files. This problem will be solved once i shutdown and restart the machine.

Hardware          :-        UNISYS ES5000
Processor         :-        Intel Pentium II 450 Mhz
Memory            :-        4 GB RAM
Disk Capacity    :-        400 GB using Mylex   RAID 0 - Fibre Channel Disk
Local Hard Disk :-         2 SCSI Harddisk of Capacity 17 GB each ( C Drive & E Drive)
 
 
Software Configuration :-
 
Operating System      :-     Windows NT 4 with NT Service pack 6 Installed
DB Version                :-     IBM UDB DB2 Version 7.2.3 Enterprise Edition For Windows NT  ( Version 7.01 with Fixpack 3 and 5 installed)
 
Operating System is installed on Local SCSI harddisk ( C Drive) and DB2 is installed on E drive. Database is residing on Fibre Channel Disk. It is divided into five Logical drives  Tablespaces are spanned over 5 logical drives.
 
Total Size of the DB is 110 GB, and is roll-forward enabled.
 
0
Comment
Question by:crocmike
  • 3
  • 2
7 Comments
 
LVL 13

Assisted Solution

by:ghp7000
ghp7000 earned 200 total points
ID: 10682414
It means your bufferpools are not sized properly. On NT, the maximum addressable memory space is 2GB unless you enable extended memory. If you attempt to create bufferpools with memory greater than this amount, db2 will start with 2 small emergency bufferpools.

You can see the size of your bufferpools with
db2 select * from syscat.bufferpools
The bufferpool should be sized according to this formula:
NPAGES*PAGESIZE/1024=Bufferpoolsize in KByte, keeping in mind that your OS and other programms also need some memory.

If your bufferpools are sized correctly, then the other place to lookis the machine. Usually, if the problem clears after reboot, then it is a machine memory issue, possibly some other process corrupting the address space that DB2 is trying to use to create the bufferpools. Look at anti virus programs or other programs that were running concurrent with the DB2.



0
 
LVL 18

Assisted Solution

by:BigSchmuh
BigSchmuh earned 300 total points
ID: 10694925
If your NT is an Enterprise edition, you can use up to 3gb of RAM per process using /3GB switch in your boot.ini. Details can be seen here
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;171793
I do not think you can use extended memory before W2K (The /PAE switch and the AWE zone in db2)...

There is an easy way to size your bufferpools:
-First size them small (4K pages x N1 +16K pages x N2 +32K pages x N3 near 1 Gb)
-Restart your db
-Connect to it (This result in db2 allocating its bufferpools)
-Check db2diag.log to confirm that your error message "...tiny bufferpools..." is not there any more
-Check NT taskmanager to see how much memory db2 uses and how much is still available
-Resize your bufferpools and think that every session although requires memory to run

Info: A 4Gb NT without the /3GB switch won't use more than 1.6 Gb at start allowing about 20-40 users to connect

Hope this helps.
0
 

Author Comment

by:crocmike
ID: 10739084
Thanks to GHP7000 and BigSchmuh for your suggestions.

Apologies for our slow response to your suggestions.

We have currently been sidetracked by unrelated hardware problems, so have been delayed in implementing the suggestions.

We are confident, however, that the suggestions are pointing us in the right direction and we expect to be able to provide feedback over the next few days.

Thanks and regards
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:crocmike
ID: 10788833
Thank you very much for your answers. We are still waiting for the hardware to test in test database for
/3GB switch setting in NT.

In the meantime we have checked in the
process on the NT task manager. It uses 1 GB only for
db2syscs process. Other processes takes only about max
10k. Meanwhile i have lowered some of the
bufferpools sizes. In NT task manager,

Totals
------

Handles         7127
Threads         480
Processes       34


Commit Charge
-------------

Total           1363984
Limit           28746180
Peak            1380264


Physical Memory
---------------

Total           3734920
Available       2398064
File Cache      201664


Kernel Memory
-------------

Total           200936
Paged           190500
Nonpaged        10436


If the total memory crosses 1400000, i am getting
memory error. Also if i copy 1 GB file from one disk
to another disk, NT is giving error message 'NOT
ENOUGH QUOTA TO PROCESS THIS COMMAND'. After this when
i am connecting to DB, i am getting SQL902n with
reason code 1450.

In the DB, Most of the bufferpools are configured to
use extended memory. Also in the DB, Estore_segs_sz is
configured as 16000 pages and Num_estore_segs is
configured to 0. I am getting error message in the
DB2DIAG.LOG saying that 'ESTORE IS OFF BUT BUFFERPOOLS
ARE CONFIGURED TO USE IT' After this i configured
Num_estore_segs as 20, it is giving SQL1022C.

My question is why i cannot use extended memory ?

Any advice greatly appreciated.

When our test system is restored (tomorrow we hope) will implemenet your suggestions and award points accordingly.

Many thanks for advice.

Regards

Michael

0
 
LVL 18

Accepted Solution

by:
BigSchmuh earned 300 total points
ID: 10796483
1/ Reading your Task manager stats
Available Physical Memory at 2,4Go means you are not using this 2,4Go memory at all.
Peak Commit Charge at 1,3Go means you never used more than this for all processes.
==> Keep an eye on those 2

2/ Breaking the 2Gb virtual memory barrier on NT (or W2K)
On NT Enterprise Edition (or W2K Advanced Server), you can use the /3GB parameter I posted before.
NT Standard Edition (or W2K Server) are not supposed to use this /3GB parameter
==> A NT (or W2K) process can not use more than 2Go address space without this parameter setted

3/ Using more memory for a process than its address space accepts
a) W2K only
W2K introduced support for Intel Physical Addressing Extension (PAE) in W2K which allow to map more memory (up to 16GB but i am not sure). Some disk controllers can load pages directly into real memory thus giving its best from a W2K platform.
DB2 supports this through the Address Windowing Extensions (AWE) API which is the API set dedicated to PAE.
AWE allows to define part of your address space (let say 512Mo) as a "window" on another address space (the PAE one), then a bufferpool can use this "window" to map many GB (=N x 512Mo) of real RAM...

b) DB2 extended memory
I think this is the proprietary way for DB2 to store some pages in non addressable real memory (named extended segments) while keeping them usable through the bufferpools. This necessary involve more pagination to map those "external pages" to the addressable memory of the bufferpools.
The DB parameters estore_seg_sz and num_estore_segs seems not being usable for every bufferpool because it allow only one page size.

Conclusion/
The easiest way to extend your use of your 4Gb server is to use the /3GB parameter if you use a NT Enterprise edition and to give more space to your bufferpools.
If you have a NT Server Standard Edition, you can try to choose your extended page size using the most used bufferpool and define the 2 DB params to create some "extended memory segments" while offering a single heavy loaded bufferpool some "extended memory segments" to take care of...

Hope this helps.
0
 

Author Comment

by:crocmike
ID: 12429283
Thanks BigSchmuh and ghp7000 for assistance in resolving these issues.
Apologies for any in delays in responding.

Mike
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now