Sunday, January 23, 2011

Performance Implications

All this use of rollback buffers sounds like it might take up a lot of resources, which would impact perfor-
mance. Granted, the Oracle database is a complex piece of software, but rollback buffers have been built into the core of the Oracle database for over 15 years. Oracle uses a variety of techniques to reduce the overhead of using this unique architecture. Although we hesitate to make performance claims for any software, since much of performance depends on good design and implementation, industry standard benchmarks have
shown the Oracle database to certainly be one of the fastest and most scalable databases in the world.
There is another side performance benefit of the way that the Oracle database implements locking that
is not directly related to MVRC but does have to do with locks. Most other databases manage locks
in memory. Since these databases typically use more locks than Oracle, they keep track of these locks in
memory for faster performance. Memory is typically one of the more constrained resources, so the over-
head of managing locks can take away from the memory used by the database. In addition, database
administrators have to make sure that there is sufficient memory to manage all the locks in the database,
since a problem with the lock manager can impact the entire database.
Oracle does not store locks in memory. Instead, the Oracle database keeps track of row locks in the header
of the physical page that contains the row. This header also stores the location of a previous version of its
rows in the rollback segments. If a row is going to be accessed for an SQL operation, the page it resides on
has to be retrieved, so the lock information will be present in the page header. Because of this, there is no
need for a separate lock manager. In addition, there is no increased overhead for an increased number of
rows with locks. So Oracle not only eliminates the number of locks used to handle large numbers of users
but also eliminates one of the ways that larger numbers of users demand greater resource usage.
Of course, the performance benefits delivered by reduced contention can be extremely significant. It
doesn’t matter how fast your database can go if you are waiting on locked rows. Add to this the fact that
you, as a developer, don’t have to spend any time writing code to achieve this level of concurrency and
data integrity, and you have a significant advantage overall.

No comments:

Post a Comment