Transparent HugePages notes for DBAs

Intro

The Linux 2.6.37 showed us a new feature called Transparent Hugepage Support, that works by reducing the number of TLB (Translation Lookaside Buffer) that is basically a cache for Virtual addressing translation. The main ideia beyond the implementation of transparent hugepages is to handle large pages just like normal pages and not just like another parallel memory management subsystem, that means if a large page is available for application, the system will provide it, otherwise the standard 4k page will be used.
This will “connect” the large pages and normal pages memory subsystems making possible large pages swappable as example. This of course sounds even better, if you think on the problems of having only small pages or only large pages. Small page size causes a large management overhead (17GB SGA + 1000 connections = 4.4 million pages and page table size of 16GB) and large pages size (example: 2MB or 4MB) causes fragmentation, as allocating huge pages becomes more difficult as memory is fragmented and the presence of contiguous memory is not available. THP tries to improve and address theses issues regularly scanning the areas marked as huge page candidates and replace a bunch of small pages with huge pages as well as directly allocate huge pages if possible.

Oracle SGA and THP

The current Transparent HugePages (or THP) only maps anonymous memory regions and therefore only affects heap and your SGA (the larger part of your memory allocation, probably) will need access to shared memory, so anonymous memory regions are useless until THP supports a shared memory implementation. THP only supports anonymous memory regions and Huge Pages only work with shared memory. Apart from THP only works with anonymous pages it only handles one huge page size (2MB), so it is not suitable for use and you need to preallocate it and Oracle must map them explicitly. Once they are pinned pages are not swappable. That is the main problem with HugePages, it requires a lot of effort from a System Administrator / DBA point of view and application must support these method, that why Huge Pages is used mainly in large RDBMS systems.

Oracle PGA and THP

As you know, PGA is heap and you can’t use the traditional huge pages, so you don’t consider it for calculations, but you may benefit from THP.  The number of THP used by the system is available using this command:

[oracle@obox ~]$ grep -i AnonHugePages /proc/meminfo
AnonHugePages: 253952 kB

Apart from this, we can check if any Oracle process is using THP. Just read /proc/PID/smaps and count the number of AnonHugePages for each mapping. Replace PID for whatever your dedicated process that handles the connection to database. I have found no AnonHugePages use, meaning that my PGA is probably not using it.

[oracle@obox ~]$ cat /proc/25894/smaps | grep AnonHugePages
AnonHugePages: 0 kB
AnonHugePages: 0 kB
AnonHugePages: 0 kB
AnonHugePages: 0 kB
AnonHugePages: 0 kB
AnonHugePages: 0 kB
...

Since THP is enabled, /proc/vmstat has some counters to monitor how sucessfully system is providing huge pages for use:

[oracle@obox ~]$ cat /proc/vmstat | grep thp_
thp_fault_alloc 368
thp_fault_fallback 264
thp_collapse_alloc 301
thp_collapse_alloc_failed 2642
thp_split 222

thp_fault_alloc is incremented every time a huge page is allocated to handle a page fault, since we have a 386 times allocated a huge page means that we are actually are using THP. thp_fault_fallback indicates that kernel fails to allocated huge page and fallback to normal page size. Since vmstat is reporting THP use and this is just a machine that runs only an Oracle database, Oracle must be using THP somewhere.
This made me think and drill down every Oracle process and search for any use of THP. For that i’ve made a shell script that searchs all the PIDs from Oracle processes:

#!/bin/bash
for i in $(pgrep -f ora_)
do
   echo "PID:"$i
   cat /proc/$i/smaps | grep AnonHugePages | sort | uniq
done

#all dedicated servers processes

for i in $(pgrep -f oracleTN*)
do
   echo "PID:"$i
   cat /proc/$i/smaps | grep AnonHugePages | sort | uniq
done

The result is a little surprise for me. Let’s analyse:

PID:58223
AnonHugePages:         0 kB
AnonHugePages:      4096 kB
PID:58363
AnonHugePages:         0 kB
AnonHugePages:      2048 kB
PID:58365
AnonHugePages:         0 kB
AnonHugePages:      2048 kB

[oracle@obox ~]$ ps -ef | grep 58223
oracle   36939 18818  0 16:30 pts/0    00:00:00 grep 58223
oracle   58223     1  0 May06 ?        00:35:34 ora_dbw0_TNMSAM
[oracle@obox ~]$ ps -ef | grep 58363
oracle   36943 18818  0 16:31 pts/0    00:00:00 grep 58363
oracle   58363     1  0 May06 ?        00:05:08 ora_arc0_TNMSAM
[oracle@obox ~]$ ps -ef | grep 58365
oracle   36946 18818  0 16:31 pts/0    00:00:00 grep 58365
oracle   58365     1  0 May06 ?        00:05:05 ora_arc1_TNMSAM

According the results, DBWR and ARCH Oracle processes are using THP.

Update: I did an improvement in the script (Bash Script) to detect THP usage by Oracle processes. Output and script bellow:

#!/bin/bash

for i in $(ps -eo pid,cmd | grep ora_ | grep -v grep | awk '{split($0,a," "); print a[1]"|"a[2]}')
do
   PID=$(echo $i | awk '{split($0,a,"|"); print a[1]}')
   PNAME=$(echo $i | awk '{split($0,a,"|"); print a[2]}') 
   THP=$(cat /proc/$PID/smaps | grep AnonHugePages | awk '{sum+=$2} END  {print sum}') 
  
   echo "PID "$PID "(" $PNAME ") is using " $THP "Kb of THP"

done

Output:
Usage of THP for Linux

ASM datafiles size…in bubbles

I’ve started a few days ago learning R and i’ve done some cool things on it (not that cool, really), mainly generating various type of charts with random data collected from Streams performance and my preferred is Bubble Chart.

To exemplify i’ve created a simple R script to generated bubbles from my ASM datafile size. My twitter friend Bertrand Drouvot R scripts helped me to create the JDBC connection.


cat ("Building the thin jdbc connection string....\n")
cat ("\n")

# which host ?

cat("host ?: ")
srv_host_name<-readLines(con="stdin", 1)

# which port ?

cat("port ?: ")
srv_port<-readLines(con="stdin", 1)

# which service_name ?

cat("service_name ?: ")
srv_name<-readLines(con="stdin", 1)

# system password ?

cat("system password ?: ")
system_pwd<-readLines(con="stdin", 1)

library(RJDBC)
#
# set up a JDBC connection
# configure "drv" for your env

drv <-JDBC("oracle.jdbc.driver.OracleDriver","/Volumes/DATA/oracle_client/ojdbc6.jar")

conn_string<-"jdbc:oracle:thin:@//"
conn_string<-paste(conn_string,srv_host_name,sep="")
conn_string<-paste(conn_string,":",sep="")
conn_string<-paste(conn_string,srv_port,sep="")
conn_string<-paste(conn_string,"/",sep="")
conn_string<-paste(conn_string,srv_name,sep="")

conn<-dbConnect(drv,conn_string,"system",system_pwd)

myquery<-"SELECT a.name ANAME, round(f.bytes/1024/1024, 2) FSIZE FROM v$asm_file f, v$asm_alias a WHERE f.group_number=a.group_number and f.file_number=a.file_number and f.type='DATAFILE' ORDER BY 1, 2"

data<-dbGetQuery(conn,myquery)
#

radius <- sqrt(data$FSIZE/ pi)
radius
symbols(data$FSIZE, data$FSIZE, circles=radius, inches=0.35,
        main = "ASM file size bubbles",
        fg="white", bg="red", xlab="Size", ylab="Size")
text(x=data$FSIZE, y=data$FSIZE, labels=data$ANAME, cex=0.5)

The result from this very simple example is:

ASM datafile size bubble chart

 

Hope it can be useful for you too.

How to trace asmcmd cp command

Hi everyone,

As part of my research to understand all the small details of +ASM, i’ve decided to understand asmcmd cp command implementation. This particular command allows you to copy files from a diskgroup to the operating system, to copy files between diskgroups or just copy files from your operating system to a particular diskgroup.

The first clue here is when you try an invalid operation with the cp command;i will try to copy a control file from my operating system to my +DATA diskgroup using a file number and incarnation notation. +ASM will not allow this operation and returns an error:

[oracle@phoenix ~]$ asmcmd cp /home/oracle/Current.267.796669051 +DATA/FENIX/CONTROLFILE/Current.267.796669052
copying /home/oracle/Current.267.796669051 -&gt; +DATA/FENIX/CONTROLFILE/Current.267.796669052
ASMCMD-8016: copy source'/home/oracle/Current.267.796669051' and target'+DATA/FENIX/CONTROLFILE/Current.267.796669052' failed
ORA-15056: additional error message
ORA-15046: ASM file name '+DATA/FENIX/CONTROLFILE/Current.267.796669052' is not in single-file creation form
ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 413
ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute)

This will allow us to see one important thing here, the package SYS.X$DBMS_DISKGROUP. Since +ASM instance have no dictionary we can’t find it as “object” and we can’t see the contents of the package directly using dictionary tables. No luck here for much debug.

On a successful cp command, strace will only give a bunch of syscalls and shows the communication between +ASM instance and the operating system. This is not a good way (and simple) to understand how cp is implemented.


write(7, "\25\6\3\5 \1[\3", 21) = 21
read(8, "\345\6\6\1\"\226\1[\3"..., 8208) = 229
stat("/home/oracle", {st_mode=S_IFDIR|0770, st_size=4096, ...}) = 0
write(7, "\2z\6\21x!\376\377\377\377\377\377\377\377\1\1"..., 634) = 634
read(8, "\1\4\6\v\1\5s\4\1@H}\233"..., 8208) = 260
write(1, "copying +DATA/FENIX/CONTROLFILE/"..., 92) = 92
write(7, "\2\363\6\21i$\376\377\377\377\377\377\377\377\1\1"..., 755) = 755
read(8, "\354\6\v\1\5R\5\1@H}\233"..., 8208) = 236

Tracing an +ASM instance is not that easy, we will need to translate that bunch of syscalls into something more readable (and i'm not Tanel Poder :-) ) and that we can relate to X$DBMS_DISKGROUP package. Since +ASM uses SQL*Net to establish the communication tracing SQL*Net will reveal interesting things. For enable SQL*Net tracing just add the following lines to sqlnet.ora:

# ADR_BASE = /u01/app/oracle
TRACE_LEVEL_CLIENT=16
TRACE_DIRECTORY_CLIENT=/home/oracle/sql_trace
TRACE_FILE_CLIENT=client
TRACE_UNIQUE_CLIENT=ON
DIAG_ADR_ENABLED=off
TRACE_TIMESTAMP_CLIENT=ON

After enabling the trace, we just need to copy one file from a diskgroup to operating system:

[oracle@phoenix ~]$ asmcmd cp +DATA/FENIX/CONTROLFILE/Current.267.796669051 /home/oracle
copying +DATA/FENIX/CONTROLFILE/Current.267.796669051 -&gt; /home/oracle/Current.267.796669051

The trace file shows up with something interesting:

(1466255104) nsbasic_bsd: 20 20 20 20 20 62 65 67  |.....beg|
(1466255104) nsbasic_bsd: 69 6E 0A 20 20 20 20 20  |in......|
(1466255104) nsbasic_bsd: 20 20 20 20 20 64 62 6D  |.....dbm|
(1466255104) nsbasic_bsd: 73 5F 64 69 73 6B 67 72  |s_diskgr|
(1466255104) nsbasic_bsd: 6F 75 70 2E 67 65 74 66  |oup.getf|
(1466255104) nsbasic_bsd: 69 6C 65 61 74 74 72 28  |ileattr(|
(1466255104) nsbasic_bsd: 3A 66 69 6C 65 6E 61 6D  |:filenam|
(1466255104) nsbasic_bsd: 65 2C 20 3A 66 69 6C 65  |e,.:file|
(1466255104) nsbasic_bsd: 74 79 70 65 2C 20 3A 66  |type,.:f|
(1466255104) nsbasic_bsd: 69 6C 65 73 7A 2C 20 3A  |ilesz,.:|
(1466255104) nsbasic_bsd: 62 6C 6B 73 7A 29 3B 0A  |blksz);.|
(1466255104) nsbasic_bsd: 20 20 20 20 20 20 20 20  |........|
(1466255104) nsbasic_bsd: 65 6E 64 3B 0A 20 20 20  |end;....|
...
(1466255104) nsbasic_bsd: 44 41 54 41 2F 46 45 4E  |DATA/FEN|
(1466255104) nsbasic_bsd: 49 58 2F 43 4F 4E 54 52  |IX/CONTR|
(1466255104) nsbasic_bsd: 4F 4C 46 49 4C 45 2F 43  |OLFILE/C|
(1466255104) nsbasic_bsd: 75 72 72 65 6E 74 2E 32  |urrent.2|
(1466255104) nsbasic_bsd: 36 37 2E 37 39 36 36 36  |67.79666|
(1466255104) nsbasic_bsd: 39 30 35 31 01 31 05 31  |9051.1.1|
(1466255104) nsbasic_bsd: 36 33 38 34 03 36 30 34  |6384.604|
(1466255104) nsbasic_bsd: 22 2F 68 6F 6D 65 2F 6F  |"/home/o|
(1466255104) nsbasic_bsd: 72 61 63 6C 65 2F 43 75  |racle/Cu|
(1466255104) nsbasic_bsd: 72 72 65 6E 74 2E 32 36  |rrent.26|
(1466255104) nsbasic_bsd: 37 2E 37 39 36 36 36 39  |7.796669|
(1466255104) nsbasic_bsd: 30 35 31                 |051     |

On a more readable way we have:

BEGIN
 dbms_diskgroup.getfileattr( :filename, :filetype, :filesz, :blksz);
END;

BEGIN
 dbms_diskgroup.copy('', '', '', :src_path, :src_ftyp, :src_blksz, :src_fsize, '', '', '', :dst_path, 1);
END; 

The first procedure will check the file attributes to be copied (filename, size, etc) and on this version of ASM, the package dbms_diskgroup have a procedure to directly copy from the diskgroup to the OS.

Please note that this post is not an exhaustive and boring post to debug and all the aspects of asmcmd cp command, but to provide the Oracle community a way to understand it.

Recover ASM pfile reading DiskGroup metadata

DBAs have a lot of know ways to read ASM pfile. The most common way is to recreate the pfile from your spfile as you do in a normal database instance:

SQL> create pfile='/home/oracle/init+ASM.ora' from spfile;

But this one is a little different. Diskgroup metadata actually contains a copy of your ASM pfile, so it might be helpful as last resort since you can use dd to read it. File #253 contains the ASM pfile and you can get a copy of it, if you can read ASM internal tables, or in the “fashion way” using my amap utility.
Let me give you an example. Look at “METADATA DESC” column and you will see ASM SPFILE row. Just pick the RELATIVE AU POSITION of it as well as disk number.

SQL> @amap metadata DATA
DISKNUMBER FILENUMBER FILE EXTENT NUMBER	  METADATA DESC 	EXTENT MIRRORING RELATIVE AU POSITION
---------- ---------- ------------------ ------------------------------ ---------------- --------------------
	 0 1	      0 		 FILE DIRECTORY 		PRIMARY EXT	 2
	 1 1	      1 		 FILE DIRECTORY 		PRIMARY EXT	 31
	 1 2	      0 		 DISK DIRECTORY 		PRIMARY EXT	 2
	 0 3	      0 		 ACTIVE CHG DIRECTORY (ACD)	PRIMARY EXT	 3
	 1 9	      0 		 ATTRIBUTE DIRECTORY		PRIMARY EXT	 25
	 1 253	      0 		 ASM SPFILE 			PRIMARY EXT	 30

File #253 is on position 30 on disk 1 inside DiskGroup DATA. To read it use dd:

[oracle@phoenix code]$ dd if=/dev/oracleasm/disks/DATA2 bs=1024k count=1 skip=30|strings|more
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0544034 s, 19.3 MB/s
*.asm_diskstring='/dev/oracleasm/disks'
*.asm_power_limit=1
*.diagnostic_dest='/u01/app/oracle'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'

Now if you _ever_ need this, just copy-paste the contents from dd and create a pfile that you can use to start your +ASM instance.

Note: I’ve update amap to version 0.3.1 to include some bug fixes and some more diskgroup metadata description.

Have a nice weekend :)

Read ASM DiskGroup metadata with AMAP v0.3

I’ve done a nice (i think it is) improvement over version 0.2 of my AMAP utility. This new improvement will allow you to see where diskgroup metadata (not disk itself) is located on your real disks. As soon as you can locate this metadata you can read it using dd, for example.

The diskgroup metadata that AMAP can actually locate is the following:

  • File Directory (files and extent)
  •  Disk Directory
  • Active Change Directory (ACD) The ACD is analogous to a redo log, where changes to the metadata are logged.
  • Continuing Operation Directory (COD).  It maintains the state of active ASM operations such as disk or datafile drop/add or even an rebalance operation. This log is committed or rolled back based on operation success.
  • Template directory
  •  Alias directory
  •  Attribute Directory (Only present in 11g)
  •  Staleness registry. It is created when a disk goes offline and ASM needs to maintained the tracking blocks in your offlined disks.  (Only present in 11g)
  • Unknow. Some metadata can be found but the content of it is unknow (at least for me).

This new feature usage is very simple, as the only thing you need to pass is your DiskGroup name.

1) @amap metadata <diskgroup>

DISKNUMBER FILENUMBER FILE EXTENT NUMBER	  METADATA DESC 	EXTENT MIRRORING RELATIVE AU POSITION
---------- ---------- ------------------ ------------------------------ ---------------- --------------------
	 0 1	      0 		 FILE DIRECTORY 		PRIMARY EXT	 2
	 1 1	      1 		 FILE DIRECTORY 		PRIMARY EXT	 31
	 1 2	      0 		 DISK DIRECTORY 		PRIMARY EXT	 2
	 0 3	      0 		 ACTIVE CHG DIRECTORY (ACD)	PRIMARY EXT	 3
	 0 3	      2 		 ACTIVE CHG DIRECTORY (ACD)	PRIMARY EXT	 4
	 0 3	      4 		 ACTIVE CHG DIRECTORY (ACD)	PRIMARY EXT	 5
...
	 1 4	      5 		 CONT OPERATION DIR (COD)	PRIMARY EXT	 28
	 1 4	      7 		 CONT OPERATION DIR (COD)	PRIMARY EXT	 29
	 1 5	      0 		 TEMPLATE DIRECTORY		PRIMARY EXT	 26
	 0 6	      0 		 ALIAS DIRECTORY		PRIMARY EXT	 25
	 0 8	      0 		 UNKNOW 			PRIMARY EXT	 26
	 1 9	      0 		 ATTRIBUTE DIRECTORY		PRIMARY EXT	 25
	 1 253	      0 		 UNKNOW 			PRIMARY EXT	 30

Or in picture mode:

amap_metadata

Examples:

As you can easily see “RELATIVE AU POSITION” will give you the exact location of the specified metadata on your disk and you can use dd to check it. The first dump will be “DISK DIRECTORY” that is on position 2 of disk 1. Please remember that AU size is 1MB (bs=1024k) and you only need to read 1 AU for this particular example.

[oracle@phoenix ~]$ dd if=/dev/oracleasm/disks/DATA2 bs=1024k count=1 skip=2|strings|more
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copiedDATA_0000
DATA_0000
DATA_0001
DATA_0001
, 0.263319 s, 4.0 MB/s

It shows you some DATA_0000 and DATA_0001 that are the disks in this system.

This time i will dump ATTRIBUTE DIRECTORY of DiskGroup +DATA that is on position 25 of Disk 1. This will list all the attributes present in your DiskGroup.

[oracle@phoenix ~]$ dd if=/dev/oracleasm/disks/DATA2 bs=1024k count=1 skip=25|strings|more
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0508502 s, 20.6 MB/s
disk_repair_time
3.6h
_rebalance_compact
TRUE
_extent_sizes
1 4 16
_extent_counts
20000 20000 214748367
au_size

sector_size

compatible

cell
FALSE
access_control

You can dump whatever you want knowing the exact location of the file. AMAP v0.3 is available on the same location as usual: https://raw.github.com/lcmarques/amap/master/amap.sql

Enjoy :-)

AMAP – ASM Mapping Utility v0.2

Hi everyone,

I’ve made some improvements on my amap utility. Changelog is the following:

- New output formatting (table-like)
- New options for list option (all diskgroups or a specified diskgroup)
- New feature: Check free and used allocation units for a particular diskgroup or all diskgroups.
- Bug fixes
- New logo :-)  and credits for Luca Canali ASM internals work.

Usage:

First, you need to set your ORACLE_SID to +ASM (or +ASMx on RAC) and login with sqlplus as SYSDBA/SYSASM

1) @amap list <diskgroup> returns all asm files (not directories) available for mapping extents and allocation units in +ASM. Now it is possible to specify only a diskgroup name or use “*” for all diskgroups. Example:

SQL> @amap list DATA
     ASM FILE NAME		     DISKGROUP	    FILENUMBER GROUPNUMBER
------------------------------ -------------------- ---------- ------------
	REGISTRY.253.783250057 DATA		    253        1
  thread_1_seq_1.257.802604171 DATA		    257        1
 thread_1_seq_53.300.794778461 DATA		    300        1
	    TEMP.263.796669055 DATA		    263        1
	 group_6.259.802551909 DATA		    259        1
	 group_3.264.796669055 DATA		    264        1
	 group_4.271.802551871 DATA		    271        1
	       stby_redo01.log DATA		    271        1
	 group_5.269.802551901 DATA		    269        1
	 group_1.266.796669053 DATA		    266        1
	       stby_redo04.log DATA		    258        1
	       stby_redo03.log DATA		    259        1
	 group_7.258.802551925 DATA		    258        1
	 group_2.265.796669053 DATA		    265        1
	       stby_redo02.log DATA		    269        1
	 Current.267.796669051 DATA		    267        1
	 EXAMPLE.262.796669057 DATA		    262        1
	  SYSAUX.261.796668997 DATA		    261        1
	  SYSTEM.260.796668997 DATA		    260        1
	   USERS.268.796668997 DATA		    268        1
	UNDOTBS1.270.796668997 DATA		    270        1
	  spfile.318.796669181 DATA		    318        1
	       spfilefenix.ora DATA		    318        1
 thread_1_seq_54.299.794780277 DATA		    299        1

2) @amap list *  list all asm filenames for all diskgroups. Same output as the last example.

3) @amap free DATA will give you the number of free and used allocation units present on a particular diskgroup. You can actually (if you know your AU size) get your free and used space on a particular diskgroup or disk.

SQL> @amap free DATA
     DISKGROUP	     DISKNUMBER AU STATUS   AU COUNT
-------------------- ---------- --------- ------------
		DATA 0		FREE AU   3249
		DATA 0		USED AU   2127
		DATA 1		FREE AU   3243
		DATA 1		USED AU   2133

4) @amap free * will list the free and used allocation units for all diskgroups.

5) @amap will now display in table format for easy reading.

SQL> @amap stby_redo01.log
GROUPNUMBER DISKNUMBER FILENUMBER FILE EXTENT NUMBER EXTENT MIRRORING RELATIVE AU POSITION
----------- ---------- ---------- ------------------ ---------------- --------------------
	  1 0	       271	  23		    PRIMARY EXT      1344
	  1 1	       271	  46		    PRIMARY EXT      1344
	  1 0	       271	  25		    PRIMARY EXT      1345
	  1 1	       271	  48		    PRIMARY EXT      1345
	  1 0	       271	  27		    PRIMARY EXT      1346
	  1 1	       271	  50		    PRIMARY EXT      1346
	  1 0	       271	  29		    PRIMARY EXT      1347
	  1 0	       271	  31		    PRIMARY EXT      1348
	  1 0	       271	  33		    PRIMARY EXT      1349

That is all folks. The download location is the same (github) and i will continue to improve this little tool: https://raw.github.com/lcmarques/amap/master/amap.sql

AMAP – ASM Mapping Utility

I’ve done a small improvement over my asm_info.sql script. Now it’s called amap. The ideia behind this script is helping DBAs to easily maps files, extents and allocation units. You can track the extents of a specified file.

Usage is simple:

1) @amap list returns all asm files (not directories) available for mapping extents and allocation units in +ASM. It also contains the DG (also GroupNumber), FileNumber after the filename alias.

SQL> @amap list
== ASM FILE ALIAS LIST ==
NAME: REGISTRY.253.783250057 [DG=+DATA;FN=253;GN=1]
NAME: thread_1_seq_1.257.802604171 [DG=+DATA;FN=257;GN=1]
NAME: thread_1_seq_53.300.794778461 [DG=+DATA;FN=300;GN=1]
NAME: thread_1_seq_49.286.789019619 [DG=+DATA;FN=286;GN=1]
NAME: thread_1_seq_52.301.789088533 [DG=+DATA;FN=301;GN=1]
... NAME: EXAMPLE.262.796669057 [DG=+DATA;FN=262;GN=1]
NAME: SYSAUX.261.796668997 [DG=+DATA;FN=261;GN=1]
NAME: SYSTEM.260.796668997 [DG=+DATA;FN=260;GN=1]
NAME: USERS.268.796668997 [DG=+DATA;FN=268;GN=1]
NAME: UNDOTBS1.270.796668997 [DG=+DATA;FN=270;GN=1]
NAME: spfile.318.796669181 [DG=+DATA;FN=318;GN=1]
NAME: spfilefenix.ora [DG=+DATA;FN=318;GN=1]

2) @amap <asm file name> provides the actual mapping between the the files, the file extents and the relative position of the allocation unit from the beggining of the disk.

SQL> @amap USERS.268.796668997
[GROUP_NUMBER ; DISKNUMBER ; FILENUMBER ; FILE_EXTENT_NUMBER ; RELATIVE_AU_POS]
[1 ; 1 ; 268 ; 0 ; PRIMARY EXTENT ; 641]
[1 ; 0 ; 268 ; 1 ; PRIMARY EXTENT ; 641]
[1 ; 1 ; 268 ; 2 ; PRIMARY EXTENT ; 642]
[1 ; 0 ; 268 ; 3 ; PRIMARY EXTENT ; 642]
[1 ; 1 ; 268 ; 4 ; PRIMARY EXTENT ; 643]
...
[1 ; 0 ; 268 ; 145 ; PRIMARY EXTENT ; 1051]
[1 ; 0 ; 268 ; 147 ; PRIMARY EXTENT ; 1052]
[1 ; 0 ; 268 ; 149 ; PRIMARY EXTENT ; 1053]
[1 ; 0 ; 268 ; 151 ; PRIMARY EXTENT ; 1054]
[1 ; 0 ; 268 ; 153 ; PRIMARY EXTENT ; 1055]
[1 ; 0 ; 268 ; 155 ; PRIMARY EXTENT ; 1056]

Script is here: https://raw.github.com/lcmarques/amap/master/amap.sql

Update:
You have to run it inside your +ASM instance.