Solutions for enabling the DB2 database to use all memory

Source: Internet
Author: User

This article describes how to use all the memory in the DB2 database, if you are interested in the actual operations related to the actual operation methods used by the DB2 database for all the memory, you can click to view the following articles.

Introduction

Have you heard of creative stress? It belongs to one of those pseudo-spiritual philosophies, and its ability to claim interaction creates things as a by-product of struggle. This is a bit like a struggle between good and evil in a book. Now, I don't want to say that all software engineers are good people, or all hardware engineers are bad people, but there is creative pressure between them.

As Joseph Campbell said, "Do not confuse your eyes with your inpractical hate for science, so that you cannot see the glorious realm of computer chips ." If the overall appearance of the waves flow out of the disk and into the memory, what is more romantic than this?

Sometimes, software engineers lament that hardware is growing too slowly: The machine disk speed is too slow, the memory group is too small, and the clock speed is crawling like a snail bait. (When the hardware development catches up, we may forget Java™The application used to be so slow .) When a new generation of hardware emerged, the operating system first adapted, but left users with the pain of running 16-bit or (panic) 8-bit DOS applications with a 32-bit architecture.

Now the pressure is on software engineers: when will they recompile the application and use the new data types and memory addressable capabilities provided by the new hardware? In the final analysis, when you compare the BASIC running on 8086 with the C ++ running on 24 SMP, running the "Hello World" program takes about as long as writing the program.

However, what DB2 database needs to do is to output "Hello World" to the display ". Similar to Web server software's expectation for higher-speed lines, database software expects to benefit as much as possible from each upgrade of disk speed, capacity, and addressable memory.

Although application programmers may complain that they must recompile 16-bit programs for 32-bit machines (it is already running well), Database engineers like the idea: store data in memory rather than on disks before sorting, clustering, or sending data to users. I/O is the killer of so many demanding workloads-that's why you distribute 1 TB of data to 5 TB disks (more disks = more axes), this means more parallel I/O, at least in the benchmark world ).

Now, in the world of Proteus and iSCSI, the 64-bit architecture is gradually becoming a standard that allows commercial UNIX®(For example, AIX®, HP-UX, Solaris, etc.) to provide a lot of memory for your favorite relational database. The addressing capability of 32-Bit Memory is about 4 GB, and many UNIX machines have 20 to 100 GB memory, so you certainly want to use this large memory. The Intel world is not far behind: at present, Linux and Windows 2000 running on 64-bit Intel chips are a reality in operating systems, compilers, and database software laboratories, and will soon be sold on the websites around you.

So if both the hardware and the operating system are ready to use huge memory and the DB2 database can also use large memory, how do you combine them and make them work? Use DB2®In version 7, we must first understand that, internally, DB2 assumes that it uses 32-Bit Memory and hardware. To take advantage of larger memory, you must tell DB2 how to use it and how to use it.

Do not blame DB2-most DB2 clients and many DB2 servers will run on 32-bit Intel machines in the next few years. And even if DB2 detects 96 GB of memory on your machine, who can be sure that you want DB2 to use all the memory instead of sharing it with other applications?

When using this large memory, you have several options. The most obvious choice is to create a 64-bit DB2 instance. DB2 version 7 on AIX, Solaris, and HP-UX now supports this operation. If you have version 7.1, you must download revision package 1 to install the 64-bit DB2 database. If you have version 7.2 or later, you do not have to install the revision package to create a 64-bit DB2 instance. To create a 64-bit DB2 instance, run the db2icrt command and specify the value of-w as 64. For example:

Db2icrt-w 64-u db2fenc1 db2inst1

The manuals used by DB2 in the 64-bit environment are located:

Http://www-4.ibm.com/cgi-bin/db2www/database/db2/udb/winos2unix/support/document.d2w/report? Fn1_db2q9e71frm3toc.htm

1 + 1 = 2. The power of 2 is a great number.

Each 32-bit DB2 instance can address 4 GB memory. Generally, you want to allocate most of the memory to the buffer pool. However, memory segments on AIX, HP-UX, and Windows Limit the maximum buffer pool size to 4 GB. Even on Solaris with a very clean Memory Model in the 32-bit world, the memory used for the DB2 Buffer Pool cannot exceed 3.35 GB; the remaining 4 GB memory space must be dedicated to other shared memory usage of DB2.

(Fortunately, the memory model is cleaner for all operating systems in the 64-bit world .) On the HP-UX, the maximum buffer pool that a 32-bit DB2 instance can create is approximately 800 MB. On a HP-UX, a buffer pool of more than 1 GB is available only when you run multiple instances by using Memory Windows on a 32-bit HP-UX. (HP Memory Windows is described in the DB2 Release Notes .) On Windows, the buffer pool is limited to 3 GB, 1.75 GB on AIX, and about 1 GB on Linux.

How to Make DB2 database use all memory

Author: bianceng, source: IT expert network forum,

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.