Re: Jonathan's book and related rant.

From: Charles Hooper <hooperc2001_at_gmail.com>
Date: Sun, 4 Dec 2011 08:20:41 -0800 (PST)
Message-ID: <562407c9-61e4-4ad8-bd6f-bc2a4c381b90_at_y18g2000yqy.googlegroups.com>



On Dec 3, 3:23 pm, Mladen Gogala <gogala.mla..._at_gmail.com> wrote:
> I started reading the "Oracle Core" book and have suddenly realized how
> lacking Oracle documentation is. The only document even mentioning
> private redo strands on MoS is 372557.1. In memory undo was described
> earlier in a paper by Craig Shallenheimer, but there were some doubts
> about the accuracy of that description, expressed by Jonathan in this OTN
> discussion:https://forums.oracle.com/forums/message.jspa?messageID=3974313#3974313
>
> Private redo strands and in-memory undo are very significant changes to
> the common mechanisms, which weren't described either in the official
> Oracle documentation, including MOS, or in semi-official Oracle
> documentation, like the Tom Kyte's books.
> I don't understand why Oracle is hiding such crucial information from the
> DBA's. The first information about oracle redo allocation latches and
> Oracle copy latches was available on the web, from the internal Oracle
> sources, since Oracle 6. This hasn't changed until 9.2, with the
> log_parallelism parameter, which was never adequately explained. The redo
> control parameters have indeed vanished from the parameter tables, after
> having played prominent roles in Oracle versions 6.0 to 9.1, for more
> than a decade. The control is indeed gone, but it would be comforting to
> explain the new mechanism.
> I, for one, am deeply grateful to Jonathan for systematizing and bringing
> this topic up, but I am extremely worried by the new spirit in the Oracle
> Corp. which hides and omits such information from their customers.

Mladen,

It could be the case that the Oracle Database documentation authors were not told about the changes in sufficient detail to provide the typical reader of the Oracle documentation library with much useful information. The enhancements are not entirely undocumented: http://docs.oracle.com/cd/B28359_01/server.111/b28320/waitevents003.htm#autoId78 "log file switch (private strand flush incomplete): User sessions trying to generate redo, wait on this event when LGWR waits for DBWR to complete flushing redo from IMU buffers into the log buffer; when DBWR is complete LGWR can then finish writing the current log, and then switch log files."

OK, the above confuses me (and possibly a couple of other readers) a little, redo is in the in-memory undo (IMU) buffers?

I found a presentation from 2007 that was created by Stephan Haisley (of Oracle Corp.). Although I have not examined the presentation closely, it appears that the document provides much of the information that probably should have appeared in the Oracle documentation library:
http://www.teamycc.com/RMOUG_2008_Conference/PDF/Haisley.pdf

Craig Shallahamer's "Oracle Performance Firefighting" book attempted to describe the redo and undo optimizations in recent Oracle Database releases. Pages 280-289 of his book describe in-memory undo and I believe that pages 298-306 are intended to describe the redo enhancements. I reviewed this book roughly 17 months ago (http:// hoopercharles.wordpress.com/2010/06/25/book-review-oracle-performance- firefighting-fourth-printing/ )- my review indicates that I found a couple of errors in these pages of the book, without really attempting to drill into what is correct or incorrect about his description of inmemory  undo. Craig mentioned in the book that he used an Intel CPU with 512MB of memory and Oracle Database 11.1 for his testing - the documentation for Oracle Database 11.1 states that a minimum of 1GB of memory is required for 11.1, so I am not sure if that partially invalidates some of the tests.

There is a significant difference in the writing style and depth of detail when comparing Craig's book and Jonathan's "Oracle Core" book. For example, page 280 of the "Oracle Performance Firefighting" book states: "Unfortunately, even if an undo segment buffer is changed, its change must also be recorded in the redo log buffer. But since IMU nodes are not undo segments, their changes do not generate redo! So, IMU will reduce the amount of redo an instance generates."

Pages 15-16 of the "Oracle Core" book does seem to show a decrease in the amount of redo generated. However, on page 17 the "Oracle Core" book then makes the following statement, "This show us that the private memory areas for a session allow roughly 64KB for 'forward' changes, and the same again for 'undo' changes. For a 64-bit system this would be closer to 128KB each." And on page 19, "An obvious case where Oracle has to abandon the new mechanism is when either the private redo thread or the in-memory undo pool becomes full... When an area is full, Oracle creates a single redo record, copies it to the public redo thread, and then continues using the public redo thread in the old way."

There were excited statements in the "Oracle Performance Firefighting" book, and as best as I can tell, no mention that the new optimizations could be abandoned. Yet, Tanel Poder (the technical reviewer of "Oracle Core") was aware of that limitation back in 2006 and mentioned it in an Oracle-L thread:
http://www.freelists.org/post/oracle-l/First-17-updated-records-disappeared-from-REDOLOG-files,2

I suspect that the "Oracle Core" book will establish a new standard for the detail level of information that is expected from a technical book. Although I must admit that I was startled to see a description of a block dump early in the book - on page 7. For some reason, I thought that this book was intended for people with only the Oracle Fundamentals understood, but I am happy to see that it is a much more rigorous piece of work (I am only about 30 pages into the book – please do not spoil the plot of the book :-) ).

(On a side note, Oracle Press books are not published by Oracle Corporation, or even endorsed by Oracle Corporation. I do not think that the exclusion of the new feature descriptions was intended to enhance book sales.)

Charles Hooper
http://hoopercharles.wordpress.com/
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. Received on Sun Dec 04 2011 - 10:20:41 CST

Original text of this message