473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Any suggestion on how to speed up large batch inserts?

We are using 8.2.9 Windows 64 edtion, in one of our projects we need
to recreate a few lager tables which have many millions of rows each,
we have used concurrent Java threads to read from data source and do
batch inserts to the target tables concurrently, to speed up the
inserts we have used the following configuration policies:

1. Use large page size (32K) and extend size (256) on the target db,
2. Use large buffer pools for the tablespaces which contains the large
tables on the target db.
3. Set num_cleaners to 4 to speed up moving data from bufferpool to
disks on the target db, we have 4 4-core CPU on the server.
4. Set chngpgs_thresh to 80%, using this value we mean avoiding DB2 to
moving data from bufferpool to disk too frequtenlly, because when
doing these inserts we have not other readers on the target.
5. Use lage page size(32K) and extend size(256) and prefetch size
(256) on the source db.
6. Use lage bufferpool on the source db.
7. Set num_ioservers to 4, we have 4 4-core cpu on the source db.

We are not sure about the chngpgs_thresh value, any suggestions?
Jul 14 '08 #1
3 3547
"Amber" <gu**********@gmail.comwrote in message
news:89**********************************@e39g2000 hsf.googlegroups.com...
We are using 8.2.9 Windows 64 edtion, in one of our projects we need
to recreate a few lager tables which have many millions of rows each,
we have used concurrent Java threads to read from data source and do
batch inserts to the target tables concurrently, to speed up the
inserts we have used the following configuration policies:

1. Use large page size (32K) and extend size (256) on the target db,
2. Use large buffer pools for the tablespaces which contains the large
tables on the target db.
3. Set num_cleaners to 4 to speed up moving data from bufferpool to
disks on the target db, we have 4 4-core CPU on the server.
4. Set chngpgs_thresh to 80%, using this value we mean avoiding DB2 to
moving data from bufferpool to disk too frequtenlly, because when
doing these inserts we have not other readers on the target.
5. Use lage page size(32K) and extend size(256) and prefetch size
(256) on the source db.
6. Use lage bufferpool on the source db.
7. Set num_ioservers to 4, we have 4 4-core cpu on the source db.

We are not sure about the chngpgs_thresh value, any suggestions?
Instead of modifying the chngpgs_thresh, set the
DB2_USE_ALTERNATE_PAGE_CLEANING to ON (with db2set).

In the db cfg, set you logbuffsz to about 256. This requires that you
increase DBHEAP by same amount since it is part of DBHEAP memory.
Jul 14 '08 #2
On Jul 14, 11:42*am, "Mark A" <nob...@nowhere.comwrote:
"Amber" <guxiaobo1...@gmail.comwrote in message

news:89**********************************@e39g2000 hsf.googlegroups.com...


We are using 8.2.9 Windows 64 edtion, in one of our projects we need
to recreate a few lager tables which have *many millions of rows each,
we have used concurrent Java threads to read from data source and do
batch inserts to the target tables concurrently, to speed up the
inserts we have used the following configuration policies:
1. Use large page size (32K) and extend size (256) on the target db,
2. Use large buffer pools for the tablespaces which contains the large
tables on the target db.
3. Set num_cleaners to 4 to speed up moving data from bufferpool to
disks on the target db, we have 4 *4-core CPU on the server.
4. Set chngpgs_thresh to 80%, using this value we mean avoiding DB2 to
moving data from bufferpool to disk too frequtenlly, because when
doing these inserts we have not other readers on the target.
5. Use lage page size(32K) and extend size(256) and prefetch size
(256) on the source db.
6. Use lage bufferpool on the source db.
7. Set num_ioservers to 4, we have 4 4-core cpu on the source db.
We are not sure about the chngpgs_thresh value, any suggestions?

Instead of modifying the chngpgs_thresh, set the
DB2_USE_ALTERNATE_PAGE_CLEANING to ON (with db2set).

In the db cfg, set you logbuffsz to about 256. This requires that you
increase DBHEAP by same amount since it is part of DBHEAP memory.- Hide quoted text -

- Show quoted text -
This has become a performance tuning thread, but I'd use a cursor load
instead, great speed, no space usage..
Jul 14 '08 #3
On Jul 14, 5:10*am, Amber <guxiaobo1...@gmail.comwrote:
We are using 8.2.9 Windows 64 edtion, in one of our projects we need
to recreate a few lager tables which have *many millions of rows each,
we have used concurrent Java threads to read from data source and do
batch inserts to the target tables concurrently, to speed up the
inserts we have used the following configuration policies:

1. Use large page size (32K) and extend size (256) on the target db,
2. Use large buffer pools for the tablespaces which contains the large
tables on the target db.
3. Set num_cleaners to 4 to speed up moving data from bufferpool to
disks on the target db, we have 4 *4-core CPU on the server.
4. Set chngpgs_thresh to 80%, using this value we mean avoiding DB2 to
moving data from bufferpool to disk too frequtenlly, because when
doing these inserts we have not other readers on the target.
5. Use lage page size(32K) and extend size(256) and prefetch size
(256) on the source db.
6. Use lage bufferpool on the source db.
7. Set num_ioservers to 4, we have 4 4-core cpu on the source db.

We are not sure about the chngpgs_thresh value, any suggestions?
If you are using SMS tablespace, I highly recommend enabling multipage
file allocation. Formatting one page at a time is a big performance
hit. See http://publib.boulder.ibm.com/infoce...e/r0002054.htm.

HTH,
Norm
Jul 29 '08 #4

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

Similar topics

9
by: Jean-David Beyer | last post by:
When initially populating a database, it runs slower that I would have supposed. Checking here and there, especially with iostat, reveals that most of the time is spent writting the logfiles. In...
1
by: ML | last post by:
We have a large batch type update process that the user needs to launch from a button on an ASP.NET webpage. The process basically does some queries against SQL Server, loops through the result...
11
by: Sezai YILMAZ | last post by:
Hello I need high throughput while inserting into PostgreSQL. Because of that I did some PostgreSQL insert performance tests. ------------------------------------------------------------ --...
11
by: Schraalhans Keukenmeester | last post by:
I have a substantial random stream of (numerical, long int) data (coming from several SCADA sources) that needs to be passed thru a function that tallies the occurrences of several different bit...
2
by: Private Pyle | last post by:
We are prototyping an application that is inserting 500 rows into a table. One method is to using batching and make one database call to insert all 500 rows, the other method is to make 500...
9
by: Paul | last post by:
I have a process that I want to speed up. It first was written in Microsoft Access then converted to VB.NET. I would like to hear some suggestions on how to speed it up. The process is to match...
45
by: charles.lobo | last post by:
Hi, I have recently begun using templates in C++ and have found it to be quite useful. However, hearing stories of code bloat and assorted problems I decided to write a couple of small programs...
24
by: Frank Swarbrick | last post by:
We have a batch process that inserts large numbers (100,000 - 1,000,000) of records into a database each day. (DL/I database.) We're considering converting it to a DB2 table. Currently we have...
2
by: palgre | last post by:
Hi ALL, I am working in an windows based application using SQL Server 2000 as database. There are few tables (refer parent tables) in the application which are uploaded by a seprate application....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.