473,394 Members | 1,774 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.

Tuning for rollbacks?

Dear Oracle/DB2 DBAs,

I'm looking for advice on tuning Oracle 9i and DB2 8.1 for rollbacks.

I have a number of developers, who each build and test our
client/server database application privately on their local machine.
Each developer's machine has:
* an OS, either Windows 2000 or XP; and
* a database, either Oracle 9i or DB2 8.1.

The developers have a JUnit test suite which runs several thousand
tests and which takes over an hour to complete. I'm currently looking
at ways to trim down the execution time of the JUnit test suite on
developers' machines.

Each test in the suite effectively does the following:
* setUp - start a database transaction
* test some application functionality
* tearDown - rollback the database transaction, effectively "restoring"
the database state ready for the next test.

The rollback at the end of each test essentially means that the tests
are independent and can be run in any order (or moreover tests can be
added or removed without affecting other tests).

I've observed though that if I change the rollback to be a commit, then
the tests run faster (although some functional checks now fail, as
tests start to "interfere" with one another). We want to preserve the
independence of our tests and so wish to keep the rollbacks - but makes
me wonder whether the rollbacks can be "tuned".

I'm assuming (and please forgive any naivety on my part) that the
default configuration of Oracle/DB2 is to expect commits to be common,
and rollbacks to be rare, and as such by default are tuned to perform
better for commits.

Is my assumption correct? If so, are there any easy tuning parameters
my developers can apply, which would help the thousands of rollbacks
perform any better?

Any help greatly appreciated (and apologies in advance if the
information above is too scant).

Many thanks,

Renny Barrett
renny _at_ eircom _dot_ net

Nov 12 '05 #1
5 3490
In Oracle, commit means: write a commit marker.
Rollback means: read the associated rollback segments and update the
corresponding database blocks.
This should explain why a rollback is 'slower' and why your method is
very strange.
And no: you can't 'tune' rollback, apart from tuning your rollback
segments, as rollback ought to be very rare, and not by design.
--
Sybrand Bakker
Senior Oracle DBA

Nov 12 '05 #2
Hi Sybrand,

Thanks for the response.
This should explain why a rollback is 'slower' and why your method is
very strange.


Yes, I agree what we're doing with our test suite is a perverse use of
a database - from your reply it would seem that the slow performance of
rollbacks compared to commits is something we'll have to live with.

Kind regards,;

Renny

Nov 12 '05 #3

re***@eircom.net wrote:
Hi Sybrand,

Thanks for the response.
This should explain why a rollback is 'slower' and why your method is
very strange.


Yes, I agree what we're doing with our test suite is a perverse use of
a database - from your reply it would seem that the slow performance of
rollbacks compared to commits is something we'll have to live with.

Kind regards,;

Renny


For DB2 you can increase the size of the LOGBUFSZ (the log buffer). I
would set it to 256 or 512 pages for an OLTP application even if you
were not doing a lot of rollbacks. This memory comes out of the DBHEAP,
so you will need to increase that by a corresponding amount (all other
things being equal).

Nov 12 '05 #4
It's not that commits are better tuned than rollbacks. For every
database (Informix, DB2, Oracle,...) changes are done immediately, so a
commit simply marks the transaction as ended and frees locks/advances
SCN. A rollback must put everything back again as it was before,
undoing the modifications, so it's evident that a rollback will always
be slower than a commit and there is no solution to that. Obviously,
should a crash occur before a commit, pending transaction is rolled
back at instance startup, because it's not marked as committed. That's
the function of redo logs.

Basically, substituting commits for rollbacks, you have made tests
twice faster, eliminating the rollback part.

Nov 12 '05 #5
re***@eircom.net wrote:
Hi Sybrand,

Thanks for the response.

This should explain why a rollback is 'slower' and why your method is
very strange.

Yes, I agree what we're doing with our test suite is a perverse use of
a database - from your reply it would seem that the slow performance of
rollbacks compared to commits is something we'll have to live with.

Kind regards,;

Renny


And in 9i you should not be using rollback segments at all. Rather
you should be using UNDO where you have nothing to say about anything
except retention time. The two versions you mention are best
configured with completely different solutions.
--
Daniel A. Morgan
http://www.psoug.org
da******@x.washington.edu
(replace x with u to respond)
Nov 12 '05 #6

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

Similar topics

1
by: Clemente | last post by:
Hi, I want tuning the coulor of a picture with GD libraries, is it possible?
3
by: Maryam | last post by:
Hi, I am having problems getting anything useful out of the index tuning wizard. I have created a table and inserted data into it. When i run the index tuning wizard i expect 2 indexes to be...
1
by: Jean-Marc Blaise | last post by:
Hi, I find much regrettable that Database Engine Tuning Advisor be not part of MS-Express Edition ... A server without such help is not a server. Besides, you've got the tutorials, but not the...
0
by: meytal.weiss | last post by:
Hi, I am using the dta utility successfully. I have problem to tune query without specifying the schema as prefix in case the tuning session is not with the login that own the schema, the dta...
3
by: mleal | last post by:
Does anyone have some more detailed information about how Oracle and MS implement / allow Tuning on Oracle 10g and SQL Server 2005 and the differences between them? Which of them, In a deep...
13
by: atlaste | last post by:
Hi, I'm currently developing an application that uses a lot of computational power, disk access and memory caching (to be more exact: an information retrieval platform). In these kind of...
0
by: Medhatithi | last post by:
Hi, I have been in several ways benefiited from this site. I would like to share some sql tuning techniques(simple, but effective) with you all. SQL Tuning Tips Oracle Tips Session #6 ...
4
by: Tommy Hayes | last post by:
Hello all, I want to use the SQL Server 2005 Tuning Advisor on our database, and I'm hoping someone here can just confirm the steps for me. We have a 10GB database that has a number of...
3
by: dunleav1 | last post by:
In 9.1 and 9.5 (Linux 64 bit) when a buffer pool is set to self- tuning, how are blocks configured in respect to blocked vs non-blocked when self-tuning is set to on? (ie) I have one bufferpool...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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.