db2 on NT unable to allocate memory to bufferpools

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
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.
Who is Participating?
BigSchmuhConnect With a Mentor Commented:
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.

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.
ghp7000Connect With a Mentor Commented:
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.

BigSchmuhConnect With a Mentor Commented:
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
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.
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

crocmikeAuthor Commented:
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
crocmikeAuthor Commented:
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,


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
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
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.



crocmikeAuthor Commented:
Thanks BigSchmuh and ghp7000 for assistance in resolving these issues.
Apologies for any in delays in responding.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.