This discussion is archived
5 Replies Latest reply: Feb 2, 2013 9:02 AM by tychos RSS

Exadata and undo/redo and read consistency

Mohamed Houri Pro
Currently Being Moderated
Dears,

I would like to understand how exadata handles undo and read consistency. Let me explain what I have already understood in the context of a classical database and what I want to understand in the context of an exadata machine.

In a classical database when a user issues a select, Oracle will look after the user desired data in the buffer cache and, if not found, get it from the disk, put it in the buffer cache and feeds back the end user with this requested data. That’s fine.

If the end user modifies the selected data, Oracle will write a redo vector in which there are undo and redo information and put that redo vector into the redo log buffer. And then, at appropriate moments, LGWR and DBWR will write their corresponding information into the online redo log files and datafiles respectively.

In the case of a select that needs to see consistent data, Oracle will use information in the undo rollback segments to re-construct a consistent image of the data at it was at the beginning of the select. That’s also fine.

Now, in the context of exadata, suppose that I have issued a select which has been serviced by an exadata smart scan and by a predicate offloading. We all know that, for this smart scan to be possible, the select should by pass the buffer cache (of the database server) and will send me the data via a direct path read. That’s again fine.

Suppose that I will modify this selected data:

1)     Where that modified data will be temporary stored? Is there a buffer cache in the storage tier where this modified data are put?
2)     When I commit those modifications, will the DBWR (when it will wake up) puts the modified data into the exadata cells disks taking the modified data blocks from the storage buffer cache?

I have a couple of other questions related to read consistency and how redo are put in the redo logfile in an exadata machine; but for the moment I will wait first to clear the above points

Thanks in advance
Mohamed Houri
www.hourim.wordpress.com
  • 1. Re: Exadata and undo/redo and read consistency
    gsalem Explorer
    Currently Being Moderated
    Mohamed,
    When a smart scan occurs, data will be read directly into the PGA, not the SGA. For a smart scan to be used, you have to have direct reads on the segment.

    When you do an update on any row, the blocks containing this row will be read into the SGA, and modified, like in any non-Exadata Oracle database.
    Commit, undo and redo are generated the same way. and LGWR and DBWR work the same way on Exadata as on any other platform.
    There's no special handling of this.

    And, no there's no 'buffer cache' in the storage that behaves the same way as the buffer cache in the SGA, there's a flashcache, but that has nothing to do with the SGA buffer cache.

    rgds
  • 2. Re: Exadata and undo/redo and read consistency
    Mohamed Houri Pro
    Currently Being Moderated
    Salem

    Thanks for your answer,
    LGWR and DBWR work the same way on Exadata as on any other platform.
    Ok. Then the sole difference is that LGWR and DBWR will write on exadata cell disks instead of normal disks
    When you do an update on any row, the blocks containing this row will be read into the SGA, and modified, like in any non-Exadata Oracle database.
    So, when you know that

    (a) the main added value of exadata is Smart Scan and the reduction of data volume flowing between the database server and the storage server
    (b) that this Smart Scan is possible only when you bypass the buffer cache

    Then I might conclude that exadata at least is of no added value for OLTP highly concurrent database because when you update data you need to put them on the buffer cache (so no smart scan)

    What do you think about exadata and OLTP databases

    Best regards
    Mohamed Houri
    www.hourim.wordpress.com
  • 3. Re: Exadata and undo/redo and read consistency
    gsalem Explorer
    Currently Being Moderated
    Well,
    What I think of the value of Exadata in a high OLTP case is no value, it is what the actual clients in this market segment think and do.

    There are several clients I know of who are using Exadata to run EBS and SAP, and they like the performance gains a lot.

    rgds
  • 4. Re: Exadata and undo/redo and read consistency
    UweHesse Expert
    Currently Being Moderated
    Although it is true that an OLTP access pattern will not benefit from Smart Scan, there are other components of Exadata that speed up OLTP access:
    The most important one is the Smart Flash Cache , delivering superior IOPS rates, now also for writes (The Write-Back Flash Cache feature).

    Kind regards
    Uwe Hesse

    "Don't believe it, test it!"
    http://uhesse.com
  • 5. Re: Exadata and undo/redo and read consistency
    tychos Expert
    Currently Being Moderated
    Hi Mohamed,
    1)     Where that modified data will be temporary stored? Is there a buffer cache in the storage tier where this modified data are put?
    The same as in a normal database it will be even before commit changed in the buffer cache and flushed to disk if the block ages out (same for the undo).
    2)     When I commit those modifications, will the DBWR (when it will wake up) puts the modified data into the exadata cells disks taking the modified data blocks from the
    storage buffer cache?
    Before or after commit the DBWR will put the modified data into the exadata cells disks. So when you do a smart scan the SCN of your session will be leading and oracle will bring all blocks with a lower SCN into the PGA.
    Next to that blocks with a higher SCN will be hit as well and these blocks will be put on a list in the cell.
    This list with block info will be transferred back to the session as a bundle of blocks which need some extra work to get the consistent image via the buffer cache.
    Regards,
    Tycho

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points