473,698 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2432
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
949
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 1 msg is 1 database row. I'm running on Red Linux: 2.4.20-8bigmem #1 SMP Thu Mar 13 17:32:29 EST 2003 i686 i686 i386 GNU/Linux The machine has dual CPU and 2G of RAM.
14
3707
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 created in serial? How about this new, multi-threaded way of doing the pg_restore: 0. On the command line, you specify how many threads you want.
8
2491
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 calls are snappy. From what I've learned this overhead is for processing the wsdl file (which has of course not changed). The file is large, 2200 lines. Is there a way to use this file locally on the web server or cache the result of the...
1
1344
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 suggestions on improving it. It's far from fully working, but some suggestions on the following would be great. Please download it from: http://homepage.eircom.net/~basquilletj/AirHockey.rar.
29
1789
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 more readable so I can do more in less time. The big question now, will I gain/lose performance, given the fact that I create pure managed code, if I port the managed C++ classes to C# classes? I cannot port all the classes at once, too much to...
1
1139
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 reviewing the asp.net (VB) code for improving performance?
1
1994
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 environment. Currently the application has a search customers page with 10 search fields which list the results below the search fields. The requirement for this screen was that the user could return to this result page at any point from any page...
1
1519
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: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenet.asp or as a download:
3
12326
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 other reading/deleting rows. The 'deleter' application runs a MIN/MAX (timestamp) for each ID and, if the difference between min/max is greater than 1h, it reads all
0
8598
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9152
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8885
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7708
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2320
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1995
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.