This discussion is archived
7 Replies Latest reply: Apr 17, 2013 2:25 PM by sulimo RSS

AU size criteria with Oracle 11gR2

Neo-b Newbie
Currently Being Moderated
Hello All,

I am using Oracle 11.2.0.3.

I have a question concerning the AU size, what is the criteria that should I follow to decide the AU size of my disk groups?
Is there any recommendation for specific Disk groups like the disk group that store OCR and Voting disks ? DATA disk group or FRA diskgroup ??

Regards,
  • 1. Re: AU size criteria with Oracle 11gR2
    Levi-Pereira Guru
    Currently Being Moderated
    Hi,

    Documentation:

    Allocation Units

    Every Oracle ASM disk is divided into allocation units (AU). An allocation unit is the fundamental unit of allocation within a disk group. A file extent consists of one or more allocation units. An Oracle ASM file consists of one or more file extents.

    When you create a disk group, you can set the Oracle ASM allocation unit size with the AU_SIZE disk group attribute. The values can be 1, 2, 4, 8, 16, 32, or 64 MB, depending on the specific disk group compatibility level. Larger AU sizes typically provide performance advantages for data warehouse applications that use large sequential reads.


    Specifying the Allocation Unit Size

    Oracle recommends that the allocation unit (AU) size for a disk group be set to 4 megabytes (MB). In addition to this AU size recommendation, the operating system (OS) I/O size should be set to the largest possible size.

    Some benefits of a 4 MB allocation unit are:

    <li> Increased I/O through the I/O subsystem if the I/O size is increased to the AU size.

    <li> Reduced SGA size to manage the extent maps in the database instance.

    <li> Faster datafile initialization if the I/O size is increased to the AU size.

    <li> Increased file size limits.

    <li> Reduced database open time.

    The allocation unit size is specified with the disk group attribute AU_SIZE. The AU size cannot be altered after a disk group is created. Example 4-1 shows how the AU_SIZE is specified with the CREATE DISKGROUP SQL statement.

    Question: What's the best AU_SIZE to my Diskgroup?

    Try find out the awnser here :
    {message:id=10336806}

    Any question just ask.

    Regards,
    Levi Pereira
  • 2. Re: AU size criteria with Oracle 11gR2
    Neo-b Newbie
    Currently Being Moderated
    Hi Levi,

    Thanks for your continuous support on this forum.

    Your reply was very helpful.

    I already created my Disk Groups as below:

    +DATA: 1.25 TB consists of 8 disks; external redundancy.
    +FRA: 1.25 TB consists of 8 disks; external redundancy.
    +OCR: 3 GB consists of 3 disks; normal redundancy: this disk group stores the voting disks and the OCR

    for all the above disk groups the AU size is 1 MB; this was the default when I created my disk groups from asmca.

    This was my test environment and I am going to implement my production environment, so do you think it is better to go with AU size of 4MB?? knowing that it is not a data warehouse database.
    AU size recommendation is common for all disks groups ? in another way is there any recommendation for the OCR Au size and other recommendations for DATA and +FRA?
    Is there any disadvantage for the 1MB AU size?


    Regards,
  • 3. Re: AU size criteria with Oracle 11gR2
    Levi-Pereira Guru
    Currently Being Moderated
    Hi NB,
    This was my test environment and I am going to implement my production environment, so do you think it is better to go with AU size of 4MB?? knowing that it is not a data warehouse database.
    For Diskgroup DATA and FRA, Oracle Recommend AU_SIZE of 4M for best praticies.
    I recommend for Diskgroup:
    +DATA AU_SIZE 4M
    It will reduced SGA size to manage the extent maps in the database instance.
    It will increased I/O through the I/O subsystem if the I/O size is increased to the AU size. (Especially during FTS or during use of the parameter "DB_FILE_MULTIBLOCK_READ_COUNT" is one of the parameters you can use to minimize I/O during table scans. It specifies the maximum number of blocks read in one I/O operation during a sequential scan. The total number of I/Os needed to perform a full table scan depends on such factors as the size of the table, the multiblock read count, and whether parallel execution is being utilized for the operation. )

    If you are using FRA to store BACKUP I recommed you set +FRA to au_size = 8M, because there is a lot big files.
    If you are not using FRA to store Backup I recommend you set +FRA to au_size =4M.
    AU size recommendation is common for all disks groups ? in another way is there any recommendation for the OCR Au size and other recommendations for DATA and +FRA?
    Is there any disadvantage for the 1MB AU size?
    To store OCR the recomendation is set +OCR  au_size 1M because there is low I/O and small files on that diskgroup.

    I'll try explain some concepts:


    The contents of Oracle ASM files are stored in a disk group as a set, or collection, of extents that are stored on individual disks within disk groups.
    Each extent resides on an individual disk. Extents consist of one or more allocation units (AU).


    Allocation Units
    Every Oracle ASM disk is divided into allocation units (AU). An allocation unit is the fundamental unit of allocation within a disk group. A file extent consists of one or more allocation units. An Oracle ASM file consists of one or more file extents.

    When you create a disk group, you can set the Oracle ASM allocation unit size with the AU_SIZE disk group attribute. The values can be 1, 2, 4, 8, 16, 32, or 64 MB, depending on the specific disk group compatibility level. Larger AU sizes typically provide performance advantages for data warehouse applications that use large sequential reads.


    To accommodate increasingly larger files, Oracle ASM uses variable size extents.

    Variable Size Extents
    Variable size extents enable support for larger Oracle ASM data files, reduce SGA memory requirements for very large databases, and improve performance for file create and open operations. The initial extent size equals the disk group allocation unit size and it increases by a factor of 4 or 16 at predefined thresholds. This feature is automatic for newly created and resized data files when specific disk group compatibility attributes are set to 11.1 or higher.


    The extent size of a file varies as follows:

    <li> Extent size always equals the disk group AU size for the first 20000 extent sets (0 - 19999).

    <li> Extent size equals 4*AU size for the next 20000 extent sets (20000 - 39999).

    <li> Extent size equals 16*AU size for the next 20000 and higher extent sets (40000+).


    http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmcon.htm#BABCGDBF


    How its works:

    A database file created within an ASM diskgroup will have its file extents (not to be confused with its database extents) distributed equally across all online disks in the diskgroup, which provides an even IO load.

    An active database instance which uses ASM storage, can then operate just like a typical database instance; i.e., all file access is directly performed without extensive ASM intervention. Database instances interact with the ASM instance when files are created, deleted or opened. At this time the file layout is read from the ASM instance and all subsequent I/O’s are done using the extent map stored in the database instance.
    ASM and DB instances also interact if the storage configuration changes; e.g., when disks are added,dropped, or fail.

    The SGA parameters for database instance needs slight modification to support ASM extent maps and other ASM information. Note if the Automatic Memory Management feature is being used on the database instance, then the shared_pool and large_pool sizing data can be treated as informational only or as supplemental data in gauging appropriate values for the SGA.

    An important parameter of DATABASE INSTANCE and ASM Instance is Large_pool, because both are affected by qtd extents of open files (ASM)
    Large_pool – Additional memory is required to store extent maps.


    Challenge:

    *1- Quantity Extents to manage*


    If we have a Diskgroup with 1TBytes with 10 Disks of 100Gbytes and we are using AU_SIZE 1M and Extent size equals AU_SIZE.
    So, we will have:

    Per Disk (100Gbytes) / 1024 = 102400 Mbytes/ 1M (au_size/extent_size)= 102400 Extent size/au_size.

    Per Diskgroup (1024 Gbytes) / 1024 = 1024000 Mbytes/ 1M (au_size/extent_size)= 1024000 Extent size/au_size.

    Oracle will have a lot extent size to manage on SGA (large_pool/shared_pool), this can cause bad perfomance and large amount of memory to accomodate all these metadata of theses extent.

    For this reason Oracle created Variable Size Extents to decrease quantity of extents, to increase perfomance and mangement of layout of ASM Files (i.e info about extents)

    So, using same example above: the Diskgroup of 1TB will be configured as follow:


    Default AU_SIZE 1M.
    
    The First 20000 (0-19999) extents will be create with 1Mbytes, because Extent Size = AU_SIZE   ( i.e 20000 * 1M = 20000 Mbytes )
    
    The next 20000 (20000-39999) extents will be create with 4Mbytes, because Extent Size = 4 * AU_SIZE ( i.e 20000 * 4M =  80000 Mbytes)
     
    The next 20000 and higher (40000+) will be created with 16Mbytes, because Extent Size = 16 * AU_SIZE 
    ( i.e  1TB=1048576 Mbytes - (20000 + 80000) = 948576 Mbytes / 16M  =  59286 Extents)
    So, On that diskgroup of 1TBytes we will have a total of (59286 + 20000 + 20000) = 99286 extents.

    If my database size is 1TB most of these extents will be loaded on my SGA.


    Now Oracle also allow change the AU_SIZE.

    What's the gain?

    Using same example above:

    Just multiply the size of AU_SIZE by 4M instead 1M. Automatically you see that you have a lower number of Extents on that Diskgroup.
     
    AU_SIZE 4M.
    
    The First 20000 (0-19999) extents will be create with 4Mbytes, because Extent Size = AU_SIZE   ( i.e 20000 * 4M = 80000 Mbytes )
    
    The next 20000 (20000-39999) extents will be create with 16Mbytes, because Extent Size = 4 * AU_SIZE ( i.e 20000 * 16M =  320000 Mbytes)
     
    The next 20000 and higher (40000+) will be created with  64 Mbytes, because Extent Size = 16 * AU_SIZE 
    ( i.e  1TB= 1048576 Mbytes - (80000 + 320000) = 648576 Mbytes / 16M  =  10134 Extents )
    So, On that diskgroup of 1TBytes we will have a total of (10134 + 20000 + 20000) = 50134 extents.

    Using AU_SIZE of 4M we have a total of 85% less of Extent compared with AU_SIZE 1M

    Less extent to manage, less cpu utilization, less memory consumption, more performance

    About Increase the  I/O troughput.

    During high sequential read or write is much better we have large block (au_size) to accommodate the data. This is Disk becomes less busy (less i/o operation) and increase size (MBytes) of write or read.

    If I set my AU_SIZE to 1M, and my I/O per transaction is 4M, The Oracle will need read four AU (probably in different extents) that implies in four I/O operation.

    If I set my AU_SIZE to 4M, and my I/O per transaction is 4M, The Oracle will need read one AU in one Extent that implies in one I/O operation. High throughput and low latency.

    Note: We need a balancing and be careful in setting this up, because if I need 1M for I/O operation, but on each reading I'm obliged to read 2Mbytes, this is a serious problem, because this will make my system very slow. I'm reading much more than I really need.

    Keep mind the formula to choose best number of AU_SIZE does not exist "yet", we must be judicious and follow the best practices of Oracle.

    Hope this clarifies
    Regards,
    Levi Pereira
  • 4. Re: AU size criteria with Oracle 11gR2
    Neo-b Newbie
    Currently Being Moderated
    Hi Levi,

    As usual your explanation are more then expected and more then enough.

    Your information are amazing. Thank you very much !

    Regards,
  • 5. Re: AU size criteria with Oracle 11gR2
    KuljeetPalSingh Guru
    Currently Being Moderated
    Thanks Levi for sharing such excellent information.
  • 6. Re: AU size criteria with Oracle 11gR2
    409759 Newbie
    Currently Being Moderated
    Thanks for all Levi. Very good article.
    David.
  • 7. Re: AU size criteria with Oracle 11gR2
    sulimo Explorer
    Currently Being Moderated
    Nice post, have some further questions if you please.

    What about allocation errors as described in

    http://www.oaktable.net/content/asm-au-size-and-lmt-autoallocate

    And regarding I/O beneffits you mention:
    Documentation reads:
    Oracle recommends that the allocation unit (AU) size for a disk group be set to 4 megabytes (MB)...
    When, where???... Else, why is default still 1Mb?

    It also reads:
    "Increased I/O through the I/O subsystem if the I/O size is increased to the AU size."
    What does "if the I/O size is increased to the AU size" imply?

    When you say:
    "because if I need 1M for I/O operation, but on each reading I'm obliged to read 2Mbytes" 
    what does that mean?

    Mean, I still find it difficult to understand oracle docs in which they take a generic approach towards a "recommend" setting,
    which is a deviation from their own standard... It may be great for exadata, as per the capabilities of underlying disks... but what If one has a Linux with Symetrix...
    or netapp..., or AIX...

    The "Oracle recommends" clashing with "Oracle's Default" is somehow misleading...

    Take my advice, even though I am acting contrary to it... =/

    Could someone advise?