473,394 Members | 1,693 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,394 software developers and data experts.

Improving Performance in DB2

Hi,

We have been migrating to DB2 and it has been the trend that the
application has become somewhat slow.
It could be because of the application problems or it could be because
i am not very aware of how to try to improve the performance of the
DB2.
The only thing i am aware is about the RunStats utility.

Can somebody give me various steps that i can take to try to improve
the application performance?

I think the problem will grow a lot when all the people start using
DB2 and performance testing is done.

Thanks

Rahul

Aug 30 '07 #1
5 2422
On Aug 30, 4:52 am, Rahul B <rahul.babb...@gmail.comwrote:
Hi,

We have been migrating to DB2 and it has been the trend that the
application has become somewhat slow.
It could be because of the application problems or it could be because
i am not very aware of how to try to improve the performance of the
DB2.
The only thing i am aware is about the RunStats utility.

Can somebody give me various steps that i can take to try to improve
the application performance?

I think the problem will grow a lot when all the people start using
DB2 and performance testing is done.

Thanks

Rahul
A few things to get you started:

db2 reorgchk command will inform you of which tables are in need of
reorganization. Results are built on database statistics, so runstats
needs to have been done recently.

db2 update monitor switches using bufferpool on
db2 get snapshot for bufferpools on database_name

those two commands will show you how the bufferpools look. Find the
BP hit ratio by taking (assync read / (assync read + physical read) )

For oltp 95% BP hit ratio is good, DSS closer to 50% is acceptable.

db2 list applications show detail

Check to see if certain applications are frequently in Lock-wait
state. DB2 default isolation levels are more strict than other
databases such as SQL server, so many times conversions will have
issues with lock contention if isolation levels are not submitted by
the application.

These are just a few things. It would be helpful to post your (db2
get db cfg) and (db2 get dbm cfg) as well as (db2set -all) output so
that your configuration settings can be examined.

Aug 31 '07 #2
rdudejr wrote:
On Aug 30, 4:52 am, Rahul B <rahul.babb...@gmail.comwrote:
>Hi,

We have been migrating to DB2 and it has been the trend that the
application has become somewhat slow.
It could be because of the application problems or it could be because
i am not very aware of how to try to improve the performance of the
DB2.
The only thing i am aware is about the RunStats utility.

Can somebody give me various steps that i can take to try to improve
the application performance?

I think the problem will grow a lot when all the people start using
DB2 and performance testing is done.

Thanks

Rahul

A few things to get you started:

db2 reorgchk command will inform you of which tables are in need of
reorganization. Results are built on database statistics, so runstats
needs to have been done recently.

db2 update monitor switches using bufferpool on
db2 get snapshot for bufferpools on database_name

those two commands will show you how the bufferpools look. Find the
BP hit ratio by taking (assync read / (assync read + physical read) )

For oltp 95% BP hit ratio is good, DSS closer to 50% is acceptable.

db2 list applications show detail

Check to see if certain applications are frequently in Lock-wait
state. DB2 default isolation levels are more strict than other
databases such as SQL server, so many times conversions will have
issues with lock contention if isolation levels are not submitted by
the application.

These are just a few things. It would be helpful to post your (db2
get db cfg) and (db2 get dbm cfg) as well as (db2set -all) output so
that your configuration settings can be examined.
You may also want to run the DB2 Configuration Advisor to get a good
baseline for the system configuration. And running the workload through
the DB2 Design Advisor would also be good.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Aug 31 '07 #3
Do you use any tools to migrate (e.g. Migration Tool Kit)?
Automated tools "fluff up" the code and can make execution slow.
(I have seen 20x is some bad cases).
What you need to do is isolate the critical areas, compare your source
SQL with the produced SQL and remove any excess emulations that aren't
needed.
In the case of Oracle for example hunt for ORA8 function or COALESCE
especially in predicates.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Sep 1 '07 #4
On Mon, 03 Sep 2007 05:02:21 +0000, Rahul B scribbled:
Here are the database manager and database configuration parameters.
Please suggest the changes that may be required in these.
/home/db2inst1>db2 get dbm cfg
[snipped huge output dump]

I strongly recommend that instead of posting your entire database config
(which is quite pointless - see below) you first try to follow the many
excellent suggestions people have provided you with, including but not
limited to:

1) Run your workload through the DB2 configuration advisor. By "workload"
I mean a good sized sample of the queries and other operations you will
be running against the database (as per Knut's message)

2) Use the REORGCHK command to check for tables and indexes in need of
reorganization, and check the buffer pool hit ratios (see rdudejr's
message)

3) Check any migrated logic for unnecessary emulations and performance
critical statements (see Serge's message)

Please understand that the optimal configuration values for the database
and the database manager depend variously on what workload you are
expecting it to perform (OLTP? OLAP?), the hardware you're using (small?
big? distributed?), and several other factors - for which you have
provided scant information (beyond "it's been migrated from Oracle" and
"I've tried runstats").

Incidentally, that's not a request for another enormous pile of
information - try the suggestions above first.
Cheers,

Dave.
Sep 3 '07 #5
Dave Hughes wrote:
On Mon, 03 Sep 2007 05:02:21 +0000, Rahul B scribbled:
>Here are the database manager and database configuration parameters.
Please suggest the changes that may be required in these.
/home/db2inst1>db2 get dbm cfg
[snipped huge output dump]

I strongly recommend that instead of posting your entire database config
(which is quite pointless - see below) you first try to follow the many
excellent suggestions people have provided you with, including but not
limited to:

1) Run your workload through the DB2 configuration advisor. By "workload"
I mean a good sized sample of the queries and other operations you will
be running against the database (as per Knut's message)

2) Use the REORGCHK command to check for tables and indexes in need of
reorganization, and check the buffer pool hit ratios (see rdudejr's
message)

3) Check any migrated logic for unnecessary emulations and performance
critical statements (see Serge's message)

Please understand that the optimal configuration values for the database
and the database manager depend variously on what workload you are
expecting it to perform (OLTP? OLAP?), the hardware you're using (small?
big? distributed?), and several other factors - for which you have
provided scant information (beyond "it's been migrated from Oracle" and
"I've tried runstats").

Incidentally, that's not a request for another enormous pile of
information - try the suggestions above first.
I would like to add the following. The OP said that "the application has
become somewhat slow". What does that mean? Does the application still
meet its performance goals? If not, an application trace should reveal
where the performance is lost. (Assuming that the application has the
capabilities to collect such a trace.)

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Sep 3 '07 #6

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

Similar topics

3
by: Andy Tran | last post by:
I built a system using mysql innodb to archive SMS messages but the innodb databases are not keeping up with the number of SMS messages coming in. I'm looking for performance of 200 msgs/sec where...
14
by: Ron Johnson | last post by:
Hi, While on the topic of "need for in-place upgrades", I got to think- ing how the pg_restore could be speeded up. Am I wrong in saying that in the current pg_restore, all of the indexes are...
8
by: murphy | last post by:
I'm programming a site that displays info from AWS Commerce Service 4.0. At each change of the asp.net application the first load of a page that uses the web service takes 30 seconds. Subsequent...
1
by: Brian Basquille | last post by:
Hello all. Have been working on the Air Hockey game on and off for a couple of weeks now.. but have had plenty of other assignments to keep me busy along with it. But i would like some...
29
by: Olaf Baeyens | last post by:
Because of historical reasons, I have both C# and C++ managed/unmanaged code mixed together in my class library. But I prefer to port code to C# since it compiles faster and the syntax is much...
1
by: Robin | last post by:
For an asp.net project that is deployed to a load balanced web servers, are there any performance changes that can be made in .Net runtime or IIS 6? Also are there any additional tips for...
1
by: Larry Neylon | last post by:
Hi, I'm working on a VBScript application on IIS6 and I'm looking for some advice about the best way of replacing or improving session variable usage. The application is in a secure extranet...
1
by: mjheitland | last post by:
Hello, does anyone know if an update is available (or at least planned) for the much cited standard reference IMPROVING .NET APPLICATION PERFORMANCE AND SCALABILITY? link:...
3
by: Michel Esber | last post by:
Hello, Environment: DB2 LUW v8 FP15 / Linux I have a table with 50+ Million rows. The table structure is basically (ID - Timestamp). I have two main applications - one inserting rows, and the...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...
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...
0
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...

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.