shared_pool_reserved_size(shared pool 保留池)

https://blog.csdn.net/leshami/article/details/6562894

 

1. What is the retention pool

        Briefly, a portion of the memory space reserved for a rainy day. Typically, a large memory request Oracle will be divided into small memory blocks to meet demand. For large internal

    Save memory space and is a continuous request, if the share is not found in the pool, it will retain the use of the pool shared pool. Of course, in the case of shared pool memory pressure, it is also used to

    Retain some pool. Retention pond partially satisfied a large memory requirements and more efficient. By default, Oracle will retain the configuration smaller pool, which can be used as part of the PL / SQL or trigger

    Compiled using a temporary space or loading JAVA object. These allocations out of memory retention will once released back to the pool.

        Greater than any "_shared_pool_reserved_min_alloc = 4400" bytes of contiguous memory allocation request, if not resolve shared_pool allocated, and the current

    shared_pool no available blocks can be aged out, the pool is reserved to be used.

       

2. The objects in the shared pool is greater space assigned sequentially

    a. From the pool to find a non-shared pool reserved space available

    b. If the shared pool non-reserved free space pool is not required from the reserved pool allocation

    c. If the non-reserved pool and the shared pool reserved pool is not required space, the number of objects required by the LRU principle aged out, then press a, b step to allocate.

 

    Shared pool reserved pool size can not exceed 50% of shared pool shared pool recommendations for 5% to 10% in general.

   

        SQL> select * from v$version;

       

        BANNER

        ----------------------------------------------------------------

        Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

        PL/SQL Release 10.2.0.4.0 - Production

        CORE    10.2.0.4.0      Production

        TNS for Solaris: Version 10.2.0.4.0 - Production

        NLSRTL Version 10.2.0.4.0 - Production

           

        SQL> show parameter reserved

       

        NAME                                 TYPE                             VALUE

        ------------------------------------ -------------------------------- ------------------------------

        _shared_pool_reserved_pct            integer                          10

        shared_pool_reserved_size big integer 512M - modify the parameters to set reserved pool size

 

 

3. Leave the pool view

    v$shared_pool_reserved

    SELECT * from v$shared_pool_reserved;

 

    SQL> desc v$shared_pool_reserved;

     Name                                      Null?    Type

     ------------------------------ -------- ----------------------------

     - The following fields are only valid when parameter set SHARED_POOL_RESERVED_SIZE

     The number of free space> reserved area - FREE_SPACE NUMBER

     AVG_FREE_SIZE NUMBER - free space> reserved area average

     The number of free memory blocks> reserved area - FREE_COUNT NUMBER

     MAX_FREE_SIZE NUMBER -> maximum number of free space reserved area

     USED_SPACE NUMBER -> reserved area using several space

     AVG_USED_SIZE NUMBER -> reserved area average use of space.

     USED_COUNT NUMBER -> reserved memory area using the number of blocks

     MAX_USED_SIZE NUMBER -> maximum number using the space reserved area

     REQUESTS NUMBER -> number of requests to find free memory block in a reserved area of

     Number> reserved area can not meet the lookup request free memory block, the object need cleared from the LRU list - REQUEST_MISSES NUMBER

     LAST_MISS_SIZE NUMBER -> requested memory size, the request is a need to clear the last object from the LRU list to satisfy the request

     MAX_MISS_SIZE NUMBER -> maximum size of all the memory request requires cleared to meet the object from the LRU list in

    

     - The following parameters SHARED_POOL_RESERVED_SIZE field regardless of whether a valid

     REQUEST_FAILURES NUMBER -> no memory to meet the number of requests (request results in 4031)

     LAST_FAILURE_SIZE NUMBER -> is no memory required memory size to meet the request (a request results in 4031)

     ABORTED_REQUEST_THRESHOLD NUMBER -> clear that the object of the case, resulting in a minimum request size 4031

     ABORTED_REQUESTS NUMBER -> clear that the object of the case, resulting in the number of incorrect request 4031

     LAST_ABORTED_SIZE NUMBER -> object out of the case is unclear, resulting in 4031's last request size

     - we can decide how to set the size of the reserved area to avoid the occurrence of errors based on 4031 behind four field values

   

        SQL> select requests,request_misses,request_failures,last_failure_size,aborted_request_threshold ab_re_th,

          2  aborted_requests,last_aborted_size lst_ab_sz

          3  from v$shared_pool_reserved;

       

          REQUESTS REQUEST_MISSES REQUEST_FAILURES LAST_FAILURE_SIZE   AB_RE_TH ABORTED_REQUESTS  LST_AB_SZ

        ---------- -------------- ---------------- ----------------- ---------- ---------------- ----------

                 1              0              542              4112 2147483647                0          0

    

4. Leave the pool adjustment strategy

    a. According to the view v $ shared_pool_reserved enough to see whether the reservation pool

        SQL> select free_space,free_count,used_space,avg_used_size from v$shared_pool_reserved;

   

        FREE_SPACE FREE_COUNT USED_SPACE AVG_USED_SIZE

        ---------- ---------- ---------- -------------

         505926544        347   14618016    5826.23196

        

    b. Using the procedure package dbms_shared_pool adjusted threshold aborted_request_threshold

    c. Modify parameters shared_pool_reserved_size

   

        alter system set shared_pool_reserved_size=integer [K | M | G]

 

            If the parameter value is set too small shared_pool_reserved_size, the view v $ shared_pool_reserved in request_failures value will be greater than zero and

        It will continue to increase, resulting in the number of requests that is memory failure will increase, the solution is to increase the size of the retention pond, and the corresponding increase in the size of the shared pool.

 

            When shared pool shared_pool_size too small, the view v $ shared_pool_reserved also may indicate too small shared_pool_size parameter value set. which is

        View v $ shared_pool_reserved in request_failures zero or greater than the number continues to increase.

       

            If you set a retention pond, in the case shared_pool_size can not be increased, it is possible to reduce the size of shared_pool_reserved_size.

            If not set to retain the pool, and the number is greater than zero or request_failures continues to increase, increasing the size of the shared pool.

 

    d. reserved pool is too large

        The following two conditions exist, it may be too large retention pond

            request_misses column is always zero, and no sustained increase

            free_memory column value greater than or equal to 50% retention pool

 

    e. below Table for determining how to adjust the space reserved pool

 

    IF Request_failures    Conjuction  Condition                                      Action

    -------------------    ----------  ----------------                               --------------

     >0 and increasing        AND      Request_misses>0                               Increase shared_pool_reserved_size

     >0 and increasing        AND      Free_memory>=50% of shared_pool_reserved_size  Increase shared_pool_size

     =0                       OR       Free_memory>=50% of shared_pool_reserved_size  Decrease shared_pool_reserved_size

 

 

The impact of several important parameters retention pond

    col ksppinm format a54

    col ksppstvl format a54

    SELECT KSPPINM, KSPPSTVL

    FROM X$KSPPI PI, X$KSPPCV CV

    WHERE CV.INDX = PI.INDX

    AND PI.KSPPINM LIKE '/_%' ESCAPE '/'                                              -- '--

    AND PI.KSPPINM LIKE '%&Para%';                            

   

   

    KSPPINM KSPPSTVL

    ------------------------------------------------------ ------------------------------------------------------

    _shared_pool_reserved_pct                              10

    _shared_pool_reserved_min_alloc                        4400

   

    SQL> show parameter reserved

   

    NAME                                 TYPE                             VALUE

    ------------------------------------ -------------------------------- ------------------------------

    _shared_pool_reserved_pct            integer                          10

    shared_pool_reserved_size            big integer                      512M       

   
----------------
Disclaimer: This article is the original article CSDN bloggers "Leshami", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement. .
Original link: https: //blog.csdn.net/leshami/article/details/6562894

Guess you like

Origin www.cnblogs.com/nathon-wang/p/12058188.html