Book
August 7, 2009 - 2pm Central time zone
Reviewer: A reader
Craig Shallahamer's new book explains these things in great detail (chapter 6 to be specific)
http://resources.orapub.com/Oracle_Performance_Firefighting_Book_p/ff_book.htm
I'm currently reading this book and so far the information is excellent.
Tom, I hope you're OK with me posting this in your site.
Followup August 7, 2009 - 3pm Central time zone:
not at all, please do
read by other session
August 13, 2009 - 12pm Central time zone
Reviewer: A reader from india
Dear Tom
how to fix " read by other session " waits
i found three sessions are running with same sql ( select ) .. each sessions waiting for the above
wait event in circular manner. so here can we run one by one rather running concurrently three
sessions ... to avoid the above event .. or is there any other workaround
thanks in advance
Ali
Followup August 13, 2009 - 12pm Central time zone:
preload all of the data into the buffer cache.
Do you understand that "read by other session" is really just a "db file sequential read" wait with more detail - you are waiting for physical IO to complete, you are not doing the physical IO but you still must wait for it.
To remove these waits, you have to remove the physical IO in the first place, then no other session could exist to be waiting on.
Understanding
August 13, 2009 - 10pm Central time zone
Reviewer: Aru from NZ
Hi Tom,
After reading about buffer busy waits here, I am getting that only one session/process can access
or read or write to a buffer in memory. If one process updates a row in the buffer (and makes it
dirty), he has a latch on the buffer and no other process can even read from the buffer for the
duration of changing the row. After the update is done the latch is released and other session in
line can do the read or write etc. and take out a latch of his own.
Is my understanding right or am I climbing the wrong tree as I so often do?
Regards and thank you,
Aru.
Followup August 24, 2009 - 7am Central time zone:
only one session at a time can have a block in what is known as current mode, and that is the mode the block has to be in in order to modify the bits and bytes on it.
So yes, in order to modify something on a given block you will
a) gain exclusive access to this block to modify it (other sessions that only need to READ the block - a consistent read - won't be bothered, just sessions that want to MODIFY the block)
b) make the modification
c) immediately release the block
the latch (lock) taken in (a) is held for an extremely small amount of time...
read by otrher session
August 14, 2009 - 9am Central time zone
Reviewer: ali from india
Dear Tom ,
Thanks for your useful reply ..
we are using 11i application. three concurrent requests fired same time and they are running same
SQL statement ...
File # Block # Reason Code
---------- ---------- -----------
95 54104 1
95 54104 1
95 54104 1
95 54104 1
95 54104 1
95 54104 1
95 54104 1
95 54104 1
127 128539 1
95 54104 1
101 41249 1
95 54104 1
369 102890 1
but file#,block# changed continuosly .. ie. it is touching more datafiles ... so i could not
colect all data details
you said in your previous reply " preload all of the data into the buffer cache. " will solve the
issue
could you please hep me " how to preload the data into buffer in this situation
Thanks in advance
Ali
Followup August 24, 2009 - 7am Central time zone:
my suggestion to preload the buffer cache was sort of "tongue in cheek"
You asked how to 'fix' something that is not something to be fixed
Once you see that 'read by another session' is really "waiting for a physical IO", the only thing you can do is "reduce physical IO"
Of course the block number will be changing - once it is read into the buffer cache and in the cache, you won't have a 'read by another session' wait on it - it was already read, it is already in the cache.
You have to wait for physical IO to complete - the only way to 'reduce that' is
a) reduce the number of physical IO calls you need (query tuning typically, algorithm changing too)
b) make physical IO faster
read by other session
October 20, 2009 - 2pm Central time zone
Reviewer: vicmaq from Mexico
Hi Tom
After upgrade to 10.2.0.4 (from 10.2.0.3), the database was hang and the waits events was "read by
other session"
without changes in the number of concurrents session and the same user activity before the patch.
I was returned to 10.2.0.3 patchset and the database works fine again.
I reviewed all the logs and configurations and i found nothing. But the performance graphics
indicate that with 10.2.03 there are no parallel process queries,
and with 10.2.0.4 starts automatically some parallel procesess.
It is possible that the 10.2.0.4 enables some functionality that starts parallel query processing
and that derive on concurrency and "read by other session" wait events ?
Followup October 22, 2009 - 5pm Central time zone:
read by other session used to just be buffer busy wait.
and if it was parallel, you wouldn't have buffer busy waits, we use direct io (bypass the cache). So, it is not parallel (you would see parallel plans, I doubt you do)
If 10.2.0.4 was starting parallel processes and 10.2.0.3 was not - I would say there is a good chance you had different parameter files.
what else changed here, besides the patch.

December 2, 2010 - 1pm Central time zone
Reviewer: A reader
This was really good explanation with examples ........
Writers blocking readers?
December 2, 2010 - 8pm Central time zone
Reviewer: BA from Seattle, WA
On August 24, 2009, you made the following comment
"in order to modify something on a given block you will
a) gain exclusive access to this block to modify it (other sessions that only need to READ the
block - a consistent read - won't be bothered, just sessions that want to MODIFY the block)"
Does this mean that reading sessions should no longer experience buffer busy waits (since the
introduction of 'read by other session' waits)?
Put differently ...
Is there any way in which a writer on a block could block other sessions that only need to READ the
block - a consistent read? Can a writing session trigger a buffer busy wait for those reading
sessions?
Followup December 7, 2010 - 9am Central time zone:
reading sessions would not experience a buffer busy wait due to a write - but they can experience buffer busy waits (the cache might be full and dbwr needs to clean it out a bit for example, or read by other session)
The writing session will not block the reader.
Why do we need higher inittrans if concurrent sessions cannot modify buffers
December 16, 2010 - 11pm Central time zone
Reviewer: Haris from Herndon, VA
In your earlier response you stated that at any given time only one process can modify data in
buffer. It leads me to my question that do we have any value in having higher INITTRANS in the
following example?
Lets say we have a table t created by all objects and we are updating with this statement. Given
that we have 2 DBWR in our system with 8 CPU machine and parallel processing enabled. At any point
there will be 8 concurrent users updating different rows residing in the same block.
I guess what I don't understand is the point of keeping the inittrans high when we can't update the
buffer by multiple processes?
Followup December 20, 2010 - 7am Central time zone:
because only one person at a time can write to a data structure (the block buffer) but many people can concurrent have a transaction going on it.
The get a buffer in current mode for a very very VERY short period of time, just enough time to move the bytes around for your modification - then you immediately let go of the buffer so someone else can get it in current mode.
But you haven't committed yet - your transaction is still active - you are taking up a slot in the ITL for that block and you will be until you commit.
modifying a block in current mode - very very fast.
transactions - very very long relatively speaking.
ITLs - they are for transactions - they support multiple concurrent transactions on the block.
is select statement required "current mode"
April 30, 2012 - 2am Central time zone
Reviewer: goh
Hi Tom,
Appreicate if you can help to explain the following. Thanks in advance.
a) if select a block where some other user is updating the rows in the block will cause buffer
busy wait.
rdgs
goh
Followup April 30, 2012 - 8am Central time zone:
no, reads are not blocked by writes - we use a consistent get for the select - not a current mode get.
Execellent
April 30, 2012 - 11am Central time zone
Reviewer: goh
Thank you sir.
|