How to calculate the in use percentage of cache ?

Hi, All,
I have two questions here:
1. Can we calculate the proper cache size based on the average key/data pair size and the number of key/data pairs? Is there any formula or something? ( I doubt it :), so next is the second question )
2. If we set a fixed cache size, and ensure that it has almost 100% hit rate for all the entries accesses. Does this mean that the cache is enough? And if yes, can we calculate how much percentage of the cache is actually in use?
Thanks in advance.

Hi,
user647934 wrote:
1. Can we calculate the proper cache size based on the average key/data pair size and the number of key/data pairs? Is there any formula or something? ( I doubt it :), so next is the second question ) You can estimate that, just that you should also consider: the page size and how many records will fit on a page.
Depending on your type of access method, you can check here for formulas that are estimating the total database size (you can find them here: http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am_misc/diskspace.html ), and just translate that to the cache size. Be aware that any cache size less than 500MB is automatically increased by 25% to account for buffer pool overhead.
user647934 wrote:
2. If we set a fixed cache size, and ensure that it has almost 100% hit rate for all the entries accesses. Does this mean that the cache is enough? And if yes, can we calculate how much percentage of the cache is actually in use?I think that you can find everything you need by calling "db_stat -m" or DB_ENV->memp_stat for detailed cache statistics.
db_stat: http://www.oracle.com/technology/documentation/berkeley-db/db/utility/db_stat.html
DB_ENV->memp_stat: http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/memp_stat.html
The fields returned by this are:
size_t st_gbytes;
* Gigabytes of cache (total cache size is st_gbytes + st_bytes).
size_t st_bytes;
* Bytes of cache (total cache size is st_gbytes + st_bytes).
u_int32_t st_ncache;
* Number of caches.
u_int32_t st_max_ncache;
* Maximum number of caches, as configured with the DB_ENV->set_cache_max method.
roff_t st_regsize;
* Individual cache size, in bytes.
size_t st_mmapsize;
* Maximum memory-mapped file size.
int st_maxopenfd;
* Maximum open file descriptors.
int st_maxwrite;
* Maximum sequential buffer writes.
db_timeout_t st_maxwrite_sleep;
* Microseconds to pause after writing maximum sequential buffers.
u_int32_t st_map;
* Requested pages mapped into the process' address space (there is no available information about whether or not this request caused disk I/O, although examining the application page fault rate may be helpful).
u_int32_t st_cache_hit;
* Requested pages found in the cache.
u_int32_t st_cache_miss;
* Requested pages not found in the cache.
u_int32_t st_page_create;
* Pages created in the cache.
u_int32_t st_page_in;
* Pages read into the cache.
u_int32_t st_page_out;
* Pages written from the cache to the backing file.
u_int32_t st_ro_evict;
* Clean pages forced from the cache.
u_int32_t st_rw_evict;
* Dirty pages forced from the cache.
u_int32_t st_page_trickle;
* Dirty pages written using the DB_ENV->memp_trickle method.
u_int32_t st_pages;
* Pages in the cache.
u_int32_t st_page_clean;
* Clean pages currently in the cache.
u_int32_t st_page_dirty;
* Dirty pages currently in the cache.
u_int32_t st_hash_buckets;
* Number of hash buckets in buffer hash table.
u_int32_t st_hash_searches;
* Total number of buffer hash table lookups.
u_int32_t st_hash_longest;
* Longest chain ever encountered in buffer hash table lookups.
u_int32_t st_hash_examined;
* Total number of hash elements traversed during hash table lookups.
u_int32_t st_hash_nowait;
* Number of times that a thread of control was able to obtain a hash bucket lock without waiting.
u_int32_t st_hash_wait;
* Number of times that a thread of control was forced to wait before obtaining a hash bucket lock.
u_int32_t st_hash_max_nowait;
* The number of times a thread of control was able to obtain the hash bucket lock without waiting on the bucket which had the maximum number of times that a thread of control needed to wait.
u_int32_t st_hash_max_wait;
* Maximum number of times any hash bucket lock was waited for by a thread of control.
u_int32_t st_region_wait;
* Number of times that a thread of control was forced to wait before obtaining a cache region mutex.
u_int32_t st_region_nowait;
* Number of times that a thread of control was able to obtain a cache region mutex without waiting.
u_int32_t st_mvcc_frozen;
* Number of buffers frozen.
u_int32_t st_mvcc_thawed;
* Number of buffers thawed.
u_int32_t st_mvcc_freed;
* Number of frozen buffers freed.
u_int32_t st_alloc;
* Number of page allocations.
u_int32_t st_alloc_buckets;
* Number of hash buckets checked during allocation.
u_int32_t st_alloc_max_buckets;
* Maximum number of hash buckets checked during an allocation.
u_int32_t st_alloc_pages;
* Number of pages checked during allocation.
u_int32_t st_alloc_max_pages;
* Maximum number of pages checked during an allocation.
u_int32_t st_io_wait;
* Number of operations blocked waiting for I/O to complete.
Please let me know if this helps.
Thanks,
Bogdan

Similar Messages

  • Does anyone know how to calculate the impedance using waveforms

    does anyone know how to calculate the impedance using waveforms?

    studentproject wrote:
    the waveforms represent the voltage and current values across a capacitive load. I am trying to find out if there is a way to do automatic calculations using the inputs from the waveforms
    Hopefully a single sinusoid tone.  Otherwise things get really interesting.  Also know that impedance is based on the frequency.  I'll have to dig into this again.  I have not had to calculate an impedance in well over 10 years.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to calculate the subtotals using reuse_alv_grid_display_lvc

    Hi folks,
    How to get the subtotals of shipped quantity monthly wise using reuse_alv_grid_display_lvc.
    Thanks in Advance
    Rao

    Hi,
    As per the standard SAP, it is not possible to display the subtotal in a different field. The solution is remove the subtotal field from the internal table.
    In the slis_t_sortinfo_alv table pass the kunnr field with subtot = 'X'.
    I hope this will solve your query.
    Reward all useful answers.
    Thank you.

  • [svn:fx-trunk] 10545: Make DataGrid smarter about when and how to calculate the modulefactory for its renderers when using embedded fonts

    Revision: 10545
    Author:   [email protected]
    Date:     2009-09-23 13:33:21 -0700 (Wed, 23 Sep 2009)
    Log Message:
    Make DataGrid smarter about when and how to calculate the modulefactory for its renderers when using embedded fonts
    QE Notes: 2 Mustella tests fail:
    components/DataGrid/DataGrid_HaloSkin/Properties/datagrid_properties_columns_halo datagrid_properties_columns_increase0to1_halo
    components/DataGrid/DataGrid_SparkSkin/Properties/datagrid_properties_columns datagrid_properties_columns_increase0to1
    These fixes get us to measure the embedded fonts correctly when going from 0 columns to a set of columns so rowHeight will be different (and better) in those scenarios
    Doc Notes: None
    Bugs: SDK-15241
    Reviewer: Darrell
    API Change: No
    Is noteworthy for integration: No
    tests: checkintests mustella/browser/DataGrid
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-15241
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase .as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColu mn.as

    Hi Matthias,
    Sorry, if this reply seems like a products plug (which it is), but this is really how we solve this software engineering challenge at JKI...
    At JKI, we create VI Packages (which are basically installers for LabVIEW instrument drivers and toolkits) of our reusable code (using the package building capabilities of VIPM Professional).  We keep a VI Package Configuration file (that includes a copy of the actual packages) in each of our project folders (and check it into source code control just as we do for all our project files).  We also use VIPM Enterprise to distribute new VI Packages over the network.
    Also, as others have mentioned, we use the JKI TortoiseSVN Tool to make it easy to use TortoiseSVN directly from LabVIEW.
    Please feel free to contact JKI if you have any specific questions about these products.
    Thanks,
    -Jim 

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two looping to find the value of SPO2?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi rai,
    I would appreciate it as kind of respect for forum participants if you would clean up your VI before uploading it (or images of its block diagram)…
    That being said:
    - Your inner while loops each run exactly twice. Replace them with FOR loops!
    - Lots of unneeded operations, mainly induced by ExpressVI usage. Is there a reason to convert to DDT and immediately convert back to 1D array?
    - You already calculate some Min/Max values. Ratio is just a division of two values…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi Rai,
    You should post this into the LabVIEW forum rather than Real-Time since this isn't a Real-Time application. Your post will see more replies in the LabVIEW forum. 
    As far as your question is concerned, you can write the max and min from the respective loops to a local variable to send the data out of the loops to a third loop or just do the calculation in one of the loops. This would be ideal if you're trying to do this while the loop is running. 
    -Jayk
    Applications Engineering
    National Instruments

  • How to calculate the unit for RATE?

    Hey All,
    I am not sure if there is something standard for this or not.
    I am calculating the 'Rate' by using 'Value/Amount' and 'Quantity' as follows -
    Rate == Value /  Quantity
    I need to calculate the unit for the rate as below -
    Rate unit == Value unit (Currency) /  Quantity unit (Base_uom) 
    (for example -
    if value is 1000 USD and quantity is 10 TO then Rate should come out as 100 USD / TO)
    Could anyone please suggest how to calculate the unit in this case?
    Many Thanks!
    Tanu

    Hi,
    Go through the below link it may give some idea
    http://help.sap.com/saphelp_nw04/Helpdata/EN/19/1d7abc80ca4817a72009998cdeebe0/content.htm
    Regards,
    Marasa.

  • How to calculate the quota base quantity in quota arrangement?

    Hi all,
    As we all know, when a new supplier is added in the quota arrangment, we take the help of quota base qunatity so that the new supplier does not get any unfair advantage over the existing suppliers. Would you please help me on how to calculate the quota base quantity or on what basis the quota base quantity is calculated?*
    Regards,
    Ranjan

    Dear,
    Quota arrangement divides the total requirements generated over a period of time among the sources of supplied by assigning a quota.
    Quota u2013 quota is equal to a number and its represents the proportionate of requirements. Total quota of all the vendors is equal to 100% of requirements.
    This quota arrangement is also specific to material and plant level.
    Quota rating = quota allocate quantity + quota base quantity / quota.
    Quota based quantity used only when a new vendor introduced.
    In the as on date situation, the minimum quota ratings will considered as preferred vendor.
    The 2 vendors has 2 same quota rating, the vendor who is having the highest quota will considered first.
    In the running quota, a new source of supply is included. (In situation of short supply) including a new source not means to reduce the quota for existing.
    Regards,
    Syed Hussain.

  • How to calculate the individual sums of multiple columns in a single query

    Hello,
    Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
    Will appreciate any help or suggestion.
    Thanks

    user13667036 wrote:
    Hello,
    Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
    Will appreciate any help or suggestion.
    ThanksLooks like you want a simple group by.
    select
              yr
         ,      mnth
         ,      region
         ,     sum(handled_package)
         ,     sum(expected_missing_package)
         ,     sum(actual_missing_package)
    from test
    group by
         yr, mnth, region
    order by      
         yr, mnth, region;I wouldn't recommend storing your data for year / month in 2 columns like that unless you have a really good reason. I would store it as a date column and add a check constraint to ensure that the date is always the first of the month, then format it out as you wish to the client.
    CREATE TABLE test
         year_month                              date,
        Region                     VARCHAR2(50),
        CITY                       VARCHAR2(50),             
        Handled_Package            NUMBER,       
        Expected_Missing_Package   NUMBER,   
        Actual_Missing_Package     NUMBER
    alter table test add constraint firs_of_month check (year_month = trunc(year_month, 'mm'));
    ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
      2  Values (to_date('2012-nov-12', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
    Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
    ERROR at line 1:
    ORA-02290: check constraint (TUBBY.FIRS_OF_MONTH) violated
    Elapsed: 00:00:00.03
    ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
      2  Values (to_date('2012-nov-01', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
    1 row created.
    Elapsed: 00:00:00.01
    ME_XE?select
      2        to_char(year_month, 'fmYYYY')    as year
      3     ,  to_char(year_month, 'fmMonth')   as month
      4     ,  Region
      5     ,  CITY
      6     ,  Handled_Package
      7     ,  Expected_Missing_Package
      8     ,  Actual_Missing_Package
      9  from test;
    YEAR         MONTH                REGION                         CITY                    HANDLED_PACKAGE EXPECTED_MISSING_PACKAGE ACTUAL_MISSING_PACKAGE
    2012         November             Western                        San Fransisco                       200                       10                      5
    1 row selected.
    Elapsed: 00:00:00.01
    ME_XE?Then you have nice a nice and easy validation that ensures you data integrity.
    Cheers,

  • How to calculate the number of sent/received emails of a certain domain

    Thank you for what you have helped me with!
    How to calculate the number of sent/received emails of a certain domain in a certain period? It is Messaging Server 5.2, Directory Server 4.2. Is there a log option for this?
    Thank you.

    Not sure where you find, "LOG_MESSSAGE_ADD". I don't actually find this option in the documentation.
    The domains that mails are coming from and being sent to are certainly logged in the normal mail.log, so why mess with additional logging options? If you're talking about "LOG_CONNECTION", I actually see no additional data that is useful to you.
    If you decide to change the option.dat, you do indeed need to
    imsimta cnbuild (note, it's not cnrebuild)
    imsimta restart
    If I were facing the same issue, I'd be looking at the log parsing perl script, and simply modifying it to do what I wanted.

  • How to calculate the size of web forms in hyperion planning?

    Hi Experts,
    I am trying to calculate the size of planning forms in Hyperion smart view., but i am unable to find out the way to calculate.
    Can you pls explain how to calculate the size of web form in Smart view?
    --- Srini.

    Hi Srini,
    First, here is what Oracle says:
    Data Form Size Estimation:
    To get a rough estimate of data form size, open the data form and select File > Save As from the browser. The size of the .HTML file is the portion of the data form that changes based on grid size. The .JS files remain the same size and can be cached, depending on browser settings. Information such as data form definitions, pages, and .gif files are not compressed when data forms are opened and sent to the Web browser.
    I have not been able to find out using their method.
    In any case, you can find out the size of grid by using below
    1. Right click on the form grid and click "View source"
    2. Save the source file as "Example.html"
    3. Right click the saved file and click "Properties"
    4. The Form size whould be same as that of file..
    Let me know if it helps.
    Cheers
    RS

  • How to calculate the row size

    Hi,
    I am having a table of 4 column. First column is varchar2(10), Second column is Number(5), Third column is char(10) and Fourth column is Number(12,2).
    Now how to calculate the size of each row. I want to know how much space it will take for each row.
    Thanx & Regards,
    Swarup

    For a complete discussion of storage requirements for different datatypes see the Oracle 8i Concepts manual.
    All Oracle documentation is available on-line via the 'Documentation' link on the OTN home page.
    Your Col2 NUMBER(5) will take 4 bytes if it holds a 5 digit positive or negative number.
    Your Col4 NUMBER(12,2) will take 7 bytes if it holds a number with 12 digits that is positive and will take 8 bytes if it holds a number with 12 digits that is negative.
    The following is from the Concepts manual Chapter 12 (Copyright by Oracle)
    Built-In Datatypes 12-9
    Internal Numeric Format
    Oracle stores numeric data in variable-length format. Each value is stored in
    scientific notation, with one byte used to store the exponent and up to 20 bytes to
    store the mantissa. The resulting value is limited to 38 digits of precision. Oracle
    does not store leading and trailing zeros. For example, the number 412 is stored in a
    format similar to 4.12 x 10 2 , with one byte used to store the exponent (2) and two
    bytes used to store the three significant digits of the mantissa (4, 1, 2). Negative
    numbers include the sign in their length.
    Taking this into account, the column size in bytes for a particular numeric data
    value NUMBER ( p), where p is the precision of a given value, can be calculated
    using the following formula:
    ROUND((length( p)+ s)/2))+1
    where s equals zero if the number is positive and s equals 1 if the number is
    negative.
    Zero and positive and negative infinity (only generated on import from Version 5
    Oracle databases) are stored using unique representations. Zero and negative
    infinity each require one byte; positive infinity requires two bytes.
    null

  • How to get the "CMYK" Color percentages?

    Could you please advise me how to get the "CMYK" Color percentages of every pixel via scripting.

    You have to be patched to the 10.0.2 version of FM and you must use the CMYK option with SaveAsPDF. If thee colour is defined as Spot in the FM file, it should remain as a spot colour in th PDF. However, that being said, the CMYK route is still a bit wonky (even in FM12) and you may get odd results in your PDF.
    Alternatives are to make the fix in Acrobat with the Print Production tools (or even better to use a third-party tool like Enfocus Pro) or to use GrafikHuset's (now freebie) PubliPDF to convert FM's RGB postscript output to CMYK+Spot PDFs. Download at: http://design.grafikhuset.dk/index.php/kontakt/downloads/grafikhuset-publi-pdf and more details available at: http://www.grafikhuset.net/PubliPDF/

  • How to calculate the number of operations in Undo/Redo stack?

    How to calculate the number of operations in Undo/Redo stack?
    I tried to override UndoManager.pushUndo method and increment "operationsCounter" there, but pushUndo is called each time I make a change in text.
    Another idea was to override EditManager.finalizeDo and use "operationsCounter" there, but finalizeDo is private...
    Do you have any idea?

    Hi Richard,
    Thanks for the reply. I suggested that existed the more simple way to implement this

  • Hi frinds ,how to calculate the  totals in smartforms

    1)how to calculate the  totals in smartforms .

    Hi,
        To calculate totals and sub totals in sap scripts you can use subroutines.
    Say if you have to add the unit price (KOMVD-KBERT) then in the main window whereever tat value is picked write this routine
    /: DEFINE &TOT_PRICE&
    /: PERFORM F_GET_PRICE IN PROGRAM /:USING &KOMVD-KBERT& /:CHANGING &TOT_PRICE& /:ENDPERFORM
    Then write the variable where ever you want it to be printed (mostly it will be in footer window)
    Then create subroutine pool program and you have to write the code.
    FORM F_GET_PRICE tables int_cond structure itcsy
    outt_cond structure itcsy. data : value type kbert.
    statics value1 type kbert.
    Read int_cond table index 1.
    value = int_cond-value.
    value1 = value1 + value.
    Read outt_cond table index 1.
    outt_cond-value = value1.
    Modify outt_cond index 1.
    ENDFORM.
    regards..

Maybe you are looking for

  • Dvd from handycam

    I have a dvd that was recorded with a sony dvd handycam .When I insert it in my macBook and see the sign my disk, it shows that this is not a movie and quick time cannot open it.Is there away that I can make it work ?

  • Creating a .gif or .jpg File

    I have written an eBook and am sending it for eBook publication and sale. One of the items required in the process before uploading the eBook is to provide: A. An image of the book cover. That image is now in Pages format and it contains text and a l

  • How do I stop an unwanted pop-up, "Click on Sign to add text and place signature on a PDF File"?

    Whenever I open a PDF using Adobe Reader X, a pop-up appears at the upper right-hand corner of the document display window that says "Click on Sign to add text and place signature on a PDf file". Is there some way that I can stop this pop-up from app

  • White mark instead of Image

    Hi. I try to place an image at a panel. Here is the whole program: public class Frame1 extends JFrame { JPanel contentPane; JPanel jPanel1 = new JPanel(); JLabel jLabel1 = new JLabel(); public Frame1() { contentPane = (JPanel) this.getContentPane();

  • OS X Mavericks Bootable installer

    I am downgrading from OS X Yosemite to Mavericks and need the Mavericks installer. It's not in my recent purchases on the App Store because my Mac shipped with it. Can someone tell me how I can get it (a like would be nice)? Thanks in advance!