This discussion is archived
4 Replies Latest reply: Apr 21, 2012 3:57 AM by 603349 RSS

smart flash cache algorithm

897831 Newbie
Currently Being Moderated
I'd like to understand exactly how smart flash cache algorithm works.
I’ve read the Oracle white paper on smart flash cache. It says following:
Exadata Smart Flash Cache provides an automated caching mechanism for frequently-accessed data in the Exadata Database Machine.
What is the algorithm to figure out "frequently accessed data”?

It also say following -
The Oracle Database and Exadata Storage Server Software work closely together to cache frequently accessed data.
When the database sends a read or write request to Exadata Storage Server, it includes additional information in the request about whether the data is likely to be read again and therefore whether it should be cached.
Again what's the algorithm to figure out that data is likely to be read again?
Does it simply cache all random reads against tables and indexes and ignores all sequential reads, scans, writing backups and mirrored blocks?

I’ve also read that, Exadata tags each DB I/O is with metadata indicating I/O type which influence caching . Can somebody shed light on what are various I/O types and which ones are cached?
  • 1. Re: smart flash cache algorithm
    897831 Newbie
    Currently Being Moderated
    would appreciate any inputs on this.
  • 2. Re: smart flash cache algorithm
    UweHesse Expert
    Currently Being Moderated
    Let me try to answer that one:
    >
    I’ve also read that, Exadata tags each DB I/O is with metadata indicating I/O type which influence caching . Can somebody shed light on what are various I/O types and which ones are cached?
    >

    At least as important as to know what to cache, it is to know what doesn't make sense caching. Here, iDB kicks in.
    Because the storage is aware about the kind of I/O (also about the origin) through iDB, it will always cache e.g.

    Headers of Datafiles
    Controlfiles

    because we need that all time.

    It will not cache e.g.

    Backups
    Secondary ASM Extents

    because these will not likely get accessed for reading again. A dumb storage would cache them regardless :-)

    Kind regards
    Uwe Hesse

    "Don't believe it, test it!"
    http://uhesse.com
  • 3. Re: smart flash cache algorithm
    897831 Newbie
    Currently Being Moderated
    Thanks for your inputs.

    I see it knows what not to cache.
    However I was wondering if it has any special algorithm to decide frequently accessed data.
    It seems it will cache all random read/writes and of course file headers and control files.
  • 4. Re: smart flash cache algorithm
    603349 Explorer
    Currently Being Moderated
    user12254641 wrote:
    Thanks for your inputs.

    I see it knows what not to cache.
    However I was wondering if it has any special algorithm to decide frequently accessed data.
    It seems it will cache all random read/writes and of course file headers and control files.
    There are really two parts to caching: 1) what to cache and 2) the management of cached data.

    Assuming cell_flash_cache = default for these segments: index/table, any single block operation is cached. Also IIRC, multi-block reads (but not smart scan multi-block reads) are also cached, up until a certain size (64k or 128K are numbers that comes to mind, but I don't have the code open to check at this moment).

    The cache management is basically LRU based, like the db buffer cache -- frequently accessed data is kept on the hot end, and data is aged out on the cold end and replaced.

    While I'm sure "algorithms" are interesting for the geek in us, I 'm not sure how this info aids in any management or decision making. Questions are generally better formulated discussing what you would like to do so that appropriate advice can be given. You're question is context free.

    --
    Regards,
    Greg Rahn | blog | twitter | linkedin

Legend

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