Understanding ASM's Extent

 

Category: Oracle

2017-04-14 10:19:44

 
The unit of space allocation in ASM is AU, and Extent contains one or more AUs.

Before 11g, 1 Extent corresponds to 1 AU. Since 11.1.0, Oracle has introduced Variable Sized Extents. ASM will automatically determine the size of the Extent according to the size of the file. The specific algorithm is as follows:
1. If the AU is less than 4MB:
  • The first 20000 extents (0-19999, 20GB), extent size=1*AU
  • After 20000 extents (20000-39999, 20GB-40GB), extent size=4*AU
  • Further Extent (40000+, more than 40GB), Extent size=16*AU
2. If the AU is greater than or equal to 4MB, and the RDBMS compatible is 11.2.0.4 and above, ASM will calculate the size of the Extent according to the Application Block Size.
By introducing Variable Sized Extents, the memory of the SGA can be reduced and the performance can be improved.

Let's take a look at the Extent distribution in the real environment:
1. Small data files
FILE_NAME                                                                     SIZE(MB)
--------------------------------------------------------------------------- ----------
+DATA01/HERA/DATAFILE/system.258.940635333                                         790

The data file is only 790MB. According to the above allocation rules, the Extent=1*AU of the data file
09:31:28 nolog> select distinct size_kffxp from x$kffxp where number_kffxp = 258;


SIZE_KFFXP
----------
         1

The above information shows that there is indeed only one case of 1AU.

2. Larger data files
FILE_NAME                                                                     SIZE(MB)
--------------------------------------------------------------------------- ----------
+DATA01/HERA/DATAFILE/test.363.941274405                                         24576

The data file is 24G. According to the above allocation rules, the Extent of the data file has two situations: 1AU and 4AU
09:03:51 nolog> select distinct size_kffxp from x$kffxp where number_kffxp = 363;


SIZE_KFFXP
----------
         1
         4

The above information shows that the actual distribution is in line with the distribution rules.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325336552&siteId=291194637