Hugepages你用了吗?----原理概念篇
Hugepages你用了吗?----测试案例篇
书接上回,关于Hugepages的设置方法和相关概念已经在“原理概念篇”介绍完成,下面我会针对几种情况进行测试,并分析测试结果
------------------------------------
测试目的及意外发现
1. 如何配置Hugepages?
2. Hugepages size是需要大于sga_max_size才生效,还是大于sga_target 就满足条件呢?
3. AMM在使用的情况下,Hugepages生效吗?
4. 通过测试,意外发现,在使用Hugepags前后,SGA的共享内存在OS系统上是以不同的形态存在的。 根据测试和网络搜索,发现/dev/shm是否使用是与AMM相关的,后续再单独测试并更新一篇博客
------------------------------------
一、 如何配置Hugepages
1. 查看文件系统,可以看到共享文件系统/dev/shm
- [root@OEL ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/VolGroup00-LogVol00
- 6.8G 2.7G 3.8G 41% /
- /dev/sda1 99M 24M 71M 25% /boot
- tmpfs 1.5G 0 1.5G 0% /dev/shm <<<<<<共享内存文件系统
- /dev/sdo1 9.9G 7.3G 2.1G 78% /u01
- /dev/sr0 2.4G 2.4G 0 100% /media/20120514_120722
2. 查看当前共享内存使用(oracle数据库启动前)
- [root@OEL ~]# ipcs -m
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
- 0x00000000 3538944 root 644 80 2
- 0x00000000 3571713 root 644 16384 2
- 0x00000000 3604482 root 644 280 2
- 0x00000000 3670019 root 600 393216 2 dest
- 0x00000000 3702788 root 600 393216 2 dest
- 0x00000000 3735557 root 600 393216 2 dest
- 0x00000000 3768326 root 600 393216 2 dest
- 0x00000000 3801095 root 600 393216 2 dest
- 0x00000000 3833864 root 600 393216 2 dest
- 0x00000000 3866633 root 600 393216 2 dest
- 0x00000000 3899402 root 600 393216 2 dest
- 0x00000000 3932171 root 600 393216 2 dest
- 0x00000000 3964940 root 600 393216 2 dest
3. 查看当前共享内存使用(oracle数据库启动后)
- [root@OEL ~]# ipcs -a
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
- 0x00000000 3538944 root 644 80 2
- 0x00000000 3571713 root 644 16384 2
- 0x00000000 3604482 root 644 280 2
- 0x00000000 3670019 root 600 393216 2 dest
- 0x00000000 3702788 root 600 393216 2 dest
- 0x00000000 3735557 root 600 393216 2 dest
- 0x00000000 3768326 root 600 393216 2 dest
- 0x00000000 3801095 root 600 393216 2 dest
- 0x00000000 3833864 root 600 393216 2 dest
- 0x00000000 3866633 root 600 393216 2 dest
- 0x00000000 3899402 root 600 393216 2 dest
- 0x00000000 3932171 root 600 393216 2 dest
- 0x00000000 3964940 root 600 393216 2 dest
- 0xa3c20e68 4030477 oracle 660 4096 0
- 0x6010c970 4096014 oracle 660 4096 0
- ------ Semaphore Arrays --------
- key semid owner perms nsems
- 0x000000a7 0 root 600 1
- 0x253c0f5c 131073 oracle 660 104
- 0xf8987fd4 262146 oracle 660 154
- [root@OEL ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/VolGroup00-LogVol00
- 6.8G 2.7G 3.8G 41% /
- /dev/sda1 99M 24M 71M 25% /boot
- tmpfs 1.5G 635M 840M 44% /dev/shm <<<<<已经有共享内存被使用
- /dev/sdo1 9.9G 7.3G 2.1G 78% /u01
- /dev/sr0 2.4G 2.4G 0 100% /media/20120514_120722
4. 查看Hugepages,还没有被使用
- [root@OEL ~]# more /proc/meminfo |grep Hug
- HugePages_Total: 0
- HugePages_Free: 0
- HugePages_Rsvd: 0
- HugePages_Surp: 0
- Hugepagesize: 2048 kB
5. 下面开始进行Hugepages的设置和使用
- [root@OEL ~]# su - oracle
- [oracle@OEL ~]$ sqlplus / as sysdba
- SQL> show parameter sga
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- lock_sga boolean FALSE
- pre_page_sga boolean FALSE
- sga_max_size big integer 800M
- sga_target big integer 0
- SQL> show parameter shared_pool
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- shared_pool_reserved_size big integer 7969177
- shared_pool_size big integer 0
6. 查看当前的pmon进程号
- [oracle@OEL ~]$ ps -ef|grep pmon
- oracle 7267 1 0 10:01 ? 00:00:00 asm_pmon_+ASM
- oracle 7426 1 0 10:02 ? 00:00:00 ora_pmon_db
- oracle 8703 8593 0 10:25 pts/2 00:00:00 grep pmon
注:pmap命令用于检查进程,显示进程空间中的所有映射。每个映射都包括了常驻内存空间,是有内存空间和共享内存空间的数量。这有助于我们估计共享内存空间和是有内存空间的使用量。
7. 查看DB使用的内存
- [oracle@OEL ~]$ pmap 7426
- 7426: ora_pmon_db
- 0000000000400000 155140K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
- 0000000009d81000 12404K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
- 000000000a99e000 280K rwx-- [ anon ]
- 000000000bfb0000 672K rwx-- [ anon ]
- 0000000060000000 4K r-xs- /dev/shm/ora_db_4096014_0
- 0000000060001000 4092K rwxs- /dev/shm/ora_db_4096014_0
- 0000000060400000 4096K rwxs- /dev/shm/ora_db_4096014_1
- ......
- 00007fceb4bf0000 228K rwx-- /dev/zero
- 00007fceb4c29000 1700K rwx-- [ anon ]
- 00007fceb4dd2000 40K r-x-- /lib64/libnss_files-2.5.so
- 00007fceb4ddc000 2044K ----- /lib64/libnss_files-2.5.so
- 00007fceb4fdb000 4K r-x-- /lib64/libnss_files-2.5.so
- 00007fceb4fdc000 4K rwx-- /lib64/libnss_files-2.5.so
- 00007fceb4fed000 416K rwx-- [ anon ]
- 00007fceb5055000 4K r-x-- /usr/lib64/libaio.so.1.0.1
- 00007fceb5056000 2044K ----- /usr/lib64/libaio.so.1.0.1
- 00007fceb5255000 4K rwx-- /usr/lib64/libaio.so.1.0.1
- 00007fceb5256000 4K rwx-- [ anon ]
- 00007fceb5257000 444K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libasmclnt11.so
- ......
- 00007fceb687f000 4K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libodmd11.so
- 00007fceb6880000 8K rwx-- [ anon ]
- 00007fff1e203000 84K rwx-- [ stack ]
- 00007fff1e31e000 4K r-x-- [ anon ]
- ffffffffff600000 4K r-x-- [ anon ]
- total 1037992K
8. 查看ASM使用的内存
- [oracle@OEL shm]$ pmap -x 9421
- 9421: ora_pmon_db
- Address Kbytes RSS Dirty Mode Mapping
- 0000000000400000 155140 11652 0 r-x-- oracle
- 0000000009d81000 12404 284 80 rwx-- oracle
- 000000000a99e000 280 184 176 rwx-- [ anon ] <<<<私有进程
- 000000000aedd000 724 544 544 rwx-- [ anon ]
- 0000000060000000 718848 0 0 rwxs- SYSV6010c970 (deleted)
- 00000032f7e00000 112 100 0 r-x-- ld-2.5.so
- ......
- 00007fffc1d58000 84 40 40 rwx-- [ stack ]
- 00007fffc1d97000 4 4 0 r-x-- [ anon ]
- ffffffffff600000 4 0 0 r-x-- [ anon ]
- ---------------- ------ ------ ------
- total kB 933320 15716 2056
注:共享内存,该数值合计等于database SGA_MAX,同时可以发现分配的共享地址空间是连续的(000000008f800000 ~ 000000008fc00000 )每个大小是4096K, 这里引出一个问题,为什么普通的page是4K,这里显示的确实4096K?这是由于,oracle database的内存最小分配单位是granule,这里是granule size。
9. 查询DB实例的共享内存
- [oracle@OEL ~]$ pmap 7426|grep sh
- 0000000060000000 4K r-xs- /dev/shm/ora_db_4096014_0
- 0000000060001000 4092K rwxs- /dev/shm/ora_db_4096014_0
- 0000000060400000 4096K rwxs- /dev/shm/ora_db_4096014_1
- 0000000060800000 4096K rwxs- /dev/shm/ora_db_4096014_2
- 0000000060c00000 4096K rwxs- /dev/shm/ora_db_4096014_3
- 0000000061000000 4096K rwxs- /dev/shm/ora_db_4096014_4
- ......
- 000000008f800000 4096K rwxs- /dev/shm/ora_db_4096014_190
- 000000008fc00000 4096K rwxs- /dev/shm/ora_db_4096014_191
- 0000000090000000 4096K rwxs- /dev/shm/ora_db_4096014_192
- 0000000090400000 4096K rwxs- /dev/shm/ora_db_4096014_193
- 0000000090800000 4096K rwxs- /dev/shm/ora_db_4096014_194
- 0000000090c00000 4096K rwxs- /dev/shm/ora_db_4096014_195
- 0000000091000000 4096K rwxs- /dev/shm/ora_db_4096014_196
- 0000000091400000 4096K rwxs- /dev/shm/ora_db_4096014_197
- 0000000091800000 4096K rwxs- /dev/shm/ora_db_4096014_198
- 0000000091c00000 4096K rwxs- /dev/shm/ora_db_4096014_199
- 0000000092000000 4096K rwxs- /dev/shm/ora_db_4096014_200
- [oracle@OEL ~]$ pmap 7426|grep sh|wc -l
- 202
- 202x4096K=830M正好是SGA的大小
10. 查看共享内存,发现oracle用户下已经有两个共享区域了。
- [oracle@OEL ~]$ ipcs -m
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
- 0x00000000 3538944 root 644 80 2
- 0x00000000 3571713 root 644 16384 2
- 0x00000000 3604482 root 644 280 2
- 0xa3c20e68 4030477 oracle 660 4096 0
- 0x6010c970 4096014 oracle 660 4096 0
二、AMM在使用的情况下,Hugepages生效吗?
1. 备份spfile,后续需要更改spfile参数,防止更改出错后恢复
- [oracle@OEL ~]$ sqlplus / as sysdba
- SQL> create pfile='/tmp/liangxx' from spfile;
- File created.
- SQL> show parameter memory
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- memory_max_target big integer 800M
- memory_target big integer 800M
2. AMM启用时,hugepages没有生效
- [oracle@OEL ~]$ more /proc/meminfo |grep Hug
- HugePages_Total: 700
- HugePages_Free: 700
- HugePages_Rsvd: 0
- HugePages_Surp: 0
- Hugepagesize: 2048 kB
3. 查看共享内存
- [oracle@OEL ~]$ ps -ef|grep pmon
- oracle 6438 1 0 16:48 ? 00:00:00 asm_pmon_+ASM
- oracle 11376 1 0 18:30 ? 00:00:00 ora_pmon_db
- oracle 11908 10931 0 18:42 pts/1 00:00:00 grep pmon
- [oracle@OEL ~]$ pmap 11376 |grep sh
- 0000000060000000 4K r-xs- /dev/shm/ora_db_3833861_0
- 0000000060001000 4092K rwxs- /dev/shm/ora_db_3833861_0
- 0000000060400000 4096K rwxs- /dev/shm/ora_db_3833861_1
- 0000000060800000 4096K rwxs- /dev/shm/ora_db_3833861_2
- 0000000060c00000 4096K rwxs- /dev/shm/ora_db_3833861_3
- 0000000061000000 4096K rwxs- /dev/shm/ora_db_3833861_4
- 0000000061400000 4096K rwxs- /dev/shm/ora_db_3833861_5
- 0000000061800000 4096K rwxs- /dev/shm/ora_db_3833861_6
- 0000000061c00000 4096K rwxs- /dev/shm/ora_db_3833861_7
- 0000000062000000 4096K rwxs- /dev/shm/ora_db_3833861_8
- 0000000062400000 4096K rwxs- /dev/shm/ora_db_3833861_9
- 0000000062800000 4096K rwxs- /dev/shm/ora_db_3833861_10
- ......
- 000000006d000000 4096K rwxs- /dev/shm/ora_db_3833861_52
- [oracle@OEL ~]$ pmap 11376 |grep sh|wc -l
- 54
4. 在禁用AMM之后,还需要设置max locked memory值,该值代表系统最大的可分配的共享内存。
- [oracle@OEL ~]$ ulimit -a
- core file size (blocks, -c) 0
- data seg size (kbytes, -d) unlimited
- scheduling priority (-e) 0
- file size (blocks, -f) unlimited
- pending signals (-i) 23543
- max locked memory (kbytes, -l) 64 <<<<<这里的值设置太小,所以hugepages没有生效
- max memory size (kbytes, -m) unlimited
- open files (-n) 1024
- pipe size (512 bytes, -p) 8
- POSIX message queues (bytes, -q) 819200
- real-time priority (-r) 0
- stack size (kbytes, -s) 8192
- cpu time (seconds, -t) unlimited
- max user processes (-u) 2047
- virtual memory (kbytes, -v) unlimited
- file locks (-x) unlimited
5. 在/etc/security/limits.conf中设置以下参数,就是设置max locked memory
- [root@OEL ~]# vi /etc/security/limits.conf
- * soft memlock 60397977
- * hard memlock 60397977
重启系统 或者 sysctl -p使设置生效
检查设置结果
- [oracle@OEL ~]$ ulimit -a
- 60397977
6. 查询到Hugepage已经被使用到
- [oracle@OEL tmp]$ more /proc/meminfo|grep Hug
- HugePages_Total: 700
- HugePages_Free: 548
- HugePages_Rsvd: 99
- HugePages_Surp: 0
- Hugepagesize: 2048 kB
7. 查看ASM实例的SGA是否使用到Hugepage,首先确认是否有设置memory_max_size
- [oracle@OEL tmp]$ sqlplus / as sysdba
- SQL> show parameter memory
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- memory_max_target big integer 272M
- memory_target big integer 272M
- SQL> create pfile='/tmp/asmxx' from spfile;
- File created.
- SQL> alter system set memory_max_target=0 scope=spfile;
- System altered.
- SQL> alter system set memory_target=0 scope=spfile;
- System altered.
- SQL> show parameter sga
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- lock_sga boolean FALSE
- sga_max_size big integer 272M
- sga_target big integer 0
- SQL> alter system set sga_max_size=500M scope=spfile;
- System altered.
8. SGA设置不正确的值,报错,通过之前备份的pfile启动
- [oracle@OEL tmp]$ sqlplus / as sysdba
- SQL> startup nomount
- ORA-00843: Parameter not taking MEMORY_MAX_TARGET into account
- ORA-00849: SGA_TARGET 524288000 cannot be set to more than MEMORY_MAX_TARGET 0.
- SQL> exit
- Disconnected
注:这里引出之前介绍的问题,直接alter system set memory_target=0 scope=spfile;是更改不成功的。直接设置为‘0’,以上错误。通过创建pfile.ora文件,然后在文件里删除两个参数"MEMORY_TARGET/MEMORY_MAX_TARGET"。然后再创建spfile就可以了。
9. 查询memory_max_target,发现没有设置成功
- [oracle@OEL tmp]$ sqlplus / as sysasm
- SQL> startup mount pfile='/tmp/asmxx';
- SQL> show parameter memory
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- memory_max_target big integer 388M
- memory_target big integer 0
10. 再次查询Hugepages确认,只要AMM使用,Hugepage设置就不会生效
- [oracle@OEL tmp]$ more /proc/meminfo|grep Hug
- HugePages_Total: 700
- HugePages_Free: 700
- HugePages_Rsvd: 0
- HugePages_Surp: 0
- Hugepagesize: 2048 kB
11. 启动DB实例后,由于memory_max_target已经禁用,可以看到Hugepage设置已经生效,
- [oracle@OEL tmp]$ more /proc/meminfo|grep Hug
- HugePages_Total: 700
- HugePages_Free: 630
- HugePages_Rsvd: 181
- HugePages_Surp: 0
- Hugepagesize: 2048 kB
测试结论,如果使用Hugepages,就必须禁用memory_max_target和memory_target参数。
三、Hugepages size是需要大于sga_max_size才生效,还是大于sga_target 就满足条件呢?
下面测试,前面有提到hugepages size要大于全部SGA size,但是这里有个疑问,SGA size是根据sga_max_size还是sga_target呢?下面的测试就会得出结论
1. 设置 sga_max_size =1104M,sga_target=512M
- [oracle@OEL ~]$ sqlplus / as sysdba
- SQL> show parameter sga
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- lock_sga boolean FALSE
- pre_page_sga boolean FALSE
- sga_max_size big integer 1104M
- sga_target big integer 512M
2. 查询确认Hugepages已经被使用
- [oracle@OEL tmp]$ more /proc/meminfo|grep Hug
- HugePages_Total: 700
- HugePages_Free: 616
- HugePages_Rsvd: 469
- HugePages_Surp: 0
- Hugepagesize: 2048 kB
3. 设置 sga_max_size =1600M,sga_target=512M
- SQL> startup nomount pfile='/tmp/liangxx';
- [oracle@OEL ~]$ sqlplus / as sysdba
- SQL> show parameter sga
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- lock_sga boolean FALSE
- pre_page_sga boolean FALSE
- sga_max_size big integer 1600M <<<<<<<是否使用Hugepage取决于sga_max_size,而不是sga_target
- sga_target big integer 512M
4. 查询,hugepages没有生效,
- [oracle@OEL ~]$ more /proc/meminfo|grep Hug
- HugePages_Total: 700
- HugePages_Free: 700
- HugePages_Rsvd: 0
- HugePages_Surp: 0
- Hugepagesize: 2048 kB
5. 设置sga_max_size=700M
- SQL> startup nomount pfile='/tmp/liangxx';
- SQL> show parameter sga
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- lock_sga boolean FALSE
- pre_page_sga boolean FALSE
- sga_max_size big integer 700M
- sga_target big integer 500M
6. 发现HugePages又使用上了
- [oracle@OEL ~]$ more /proc/meminfo|grep Hug
- HugePages_Total: 700
- HugePages_Free: 548
- HugePages_Rsvd: 199
- HugePages_Surp: 0
- Hugepagesize: 2048 kB
这里说明,是否使用hugepages取决于sga_max_size的尺寸,而不是sga_target。
四、问题延伸
1. 通过查询共享内存,引出一个新问题,DB使用了Hugepage后,通过 pmap 8863|grep sh 就不能列出sh的共享值了,而是以/SYSV6010c970 (deleted) 的形式出现。
- [oracle@OEL tmp]$ ps -ef|grep pmon
- oracle 8464 1 0 19:34 ? 00:00:00 asm_pmon_+ASM
- oracle 8863 1 0 19:42 ? 00:00:00 ora_pmon_db
- oracle 8957 6753 0 19:43 pts/1 00:00:00 grep pmon
- [oracle@OEL tmp]$ pmap 8863|grep sh <<<<<<<在DB使用了Hugepage后,通过ps就不能列出sh的共享值了
- [oracle@OEL tmp]$ pmap 8863 <<<<<<<直接列出全部
- 8863: ora_pmon_db
- 0000000000400000 155140K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
- 0000000009d81000 12404K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
- 000000000a99e000 280K rwx-- [ anon ]
- 000000000b148000 724K rwx-- [ anon ]
- 0000000060000000 514048K rwxs- /SYSV6010c970 (deleted) <<<<<<<这里很可疑,因为DB SGA_TARGET就是500M
- 00000032f7e00000 112K r-x-- /lib64/ld-2.5.so
- 00000032f801c000 4K r-x-- /lib64/ld-2.5.so
- 00000032f801d000 4K rwx-- /lib64/ld-2.5.so
- 00000032f8200000 1340K r-x-- /lib64/libc-2.5.so
- 00000032f834f000 2044K ----- /lib64/libc-2.5.so
- 00000032f854e000 16K r-x-- /lib64/libc-2.5.so
- 00000032f8552000 4K rwx-- /lib64/libc-2.5.so
- 00000032f8553000 20K rwx-- [ anon ]
- 00000032f8600000 520K r-x-- /lib64/libm-2.5.so
- 00000032f8682000 2044K ----- /lib64/libm-2.5.so
- 00000032f8881000 4K r-x-- /lib64/libm-2.5.so
- 00000032f8882000 4K rwx-- /lib64/libm-2.5.so
- 00000032f8e00000 8K r-x-- /lib64/libdl-2.5.so
- 00000032f8e02000 2048K ----- /lib64/libdl-2.5.so
- 00000032f9002000 4K r-x-- /lib64/libdl-2.5.so
- 00000032f9003000 4K rwx-- /lib64/libdl-2.5.so
- 00000032f9200000 88K r-x-- /lib64/libpthread-2.5.so
- 00000032f9216000 2044K ----- /lib64/libpthread-2.5.so
- 00000032f9415000 4K r-x-- /lib64/libpthread-2.5.so
- 00000032f9416000 4K rwx-- /lib64/libpthread-2.5.so
- 00000032f9417000 16K rwx-- [ anon ]
- 00000032f9600000 28K r-x-- /lib64/librt-2.5.so
- 00000032f9607000 2048K ----- /lib64/librt-2.5.so
- 00000032f9807000 4K r-x-- /lib64/librt-2.5.so
- 00000032f9808000 4K rwx-- /lib64/librt-2.5.so
- 00000032fbe00000 84K r-x-- /lib64/libnsl-2.5.so
- 00000032fbe15000 2044K ----- /lib64/libnsl-2.5.so
- 00000032fc014000 4K r-x-- /lib64/libnsl-2.5.so
- 00000032fc015000 4K rwx-- /lib64/libnsl-2.5.so
- 00000032fc016000 8K rwx-- [ anon ]
- 00007faf908ab000 912K rwx-- [ anon ]
- 00007faf9098f000 40K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnque11.so
- 00007faf90999000 1020K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnque11.so
- 00007faf90a98000 4K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnque11.so
- 00007faf90a99000 4K rwx-- [ anon ]
- 00007faf90a9a000 88K rwx-- /dev/zero
- 00007faf90ab0000 64K rwx-- /dev/zero
- 00007faf90ac0000 64K rwx-- /dev/zero
- 00007faf90ad0000 64K rwx-- /dev/zero
- 00007faf90ae0000 64K rwx-- /dev/zero
- 00007faf90af0000 168K rwx-- /dev/zero
- 00007faf90b1a000 1700K rwx-- [ anon ]
- 00007faf90cc3000 40K r-x-- /lib64/libnss_files-2.5.so
- 00007faf90ccd000 2044K ----- /lib64/libnss_files-2.5.so
- 00007faf90ecc000 4K r-x-- /lib64/libnss_files-2.5.so
- 00007faf90ecd000 4K rwx-- /lib64/libnss_files-2.5.so
- 00007faf90ece000 272K rwx-- [ anon ]
- 00007faf90f12000 4K r-x-- /usr/lib64/libaio.so.1.0.1
- 00007faf90f13000 2044K ----- /usr/lib64/libaio.so.1.0.1
- 00007faf91112000 4K rwx-- /usr/lib64/libaio.so.1.0.1
- 00007faf91113000 4K rwx-- [ anon ]
- 00007faf91114000 444K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libasmclnt11.so
- 00007faf91183000 1024K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libasmclnt11.so
- 00007faf91283000 72K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libasmclnt11.so
- 00007faf91295000 4K rwx-- [ anon ]
- 00007faf91296000 44K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libocrutl11.so
- 00007faf912a1000 1020K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libocrutl11.so
- 00007faf913a0000 4K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libocrutl11.so
- 00007faf913a1000 608K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libocrb11.so
- 00007faf91439000 1024K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libocrb11.so
- 00007faf91539000 8K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libocrb11.so
- 00007faf9153b000 4K rwx-- [ anon ]
- 00007faf9153c000 612K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libocr11.so
- 00007faf915d5000 1020K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libocr11.so
- 00007faf916d4000 8K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libocr11.so
- 00007faf916d6000 8K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libskgxn2.so
- 00007faf916d8000 1020K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libskgxn2.so
- 00007faf917d7000 4K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libskgxn2.so
- 00007faf917d8000 4256K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libhasgen11.so
- 00007faf91c00000 1024K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libhasgen11.so
- 00007faf91d00000 72K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libhasgen11.so
- 00007faf91d12000 20K rwx-- [ anon ]
- 00007faf91d17000 136K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libdbcfg11.so
- 00007faf91d39000 1020K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libdbcfg11.so
- 00007faf91e38000 8K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libdbcfg11.so
- 00007faf91e3a000 92K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclsra11.so
- 00007faf91e51000 1024K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclsra11.so
- 00007faf91f51000 4K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclsra11.so
- 00007faf91f52000 2580K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so
- 00007faf921d7000 1020K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so
- 00007faf922d6000 268K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so
- 00007faf92319000 8K rwx-- [ anon ]
- 00007faf92326000 4K rwxs- /u01/app/oracle/product/11.2.0/dbhome_1/dbs/hc_db.dat
- 00007faf92327000 16K rwx-- [ anon ]
- 00007faf9232b000 732K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libskgxp11.so
- 00007faf923e2000 1024K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libskgxp11.so
- 00007faf924e2000 8K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libskgxp11.so
- 00007faf924e4000 316K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libcell11.so
- 00007faf92533000 1020K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libcell11.so
- 00007faf92632000 32K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libcell11.so
- 00007faf9263a000 4K rwx-- [ anon ]
- 00007faf9263b000 4K r-x-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libodmd11.so
- 00007faf9263c000 1024K ----- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libodmd11.so
- 00007faf9273c000 4K rwx-- /u01/app/oracle/product/11.2.0/dbhome_1/lib/libodmd11.so
- 00007faf9273d000 8K rwx-- [ anon ]
- 00007fff37756000 84K rwx-- [ stack ]
- 00007fff377ff000 4K r-x-- [ anon ]
- ffffffffff600000 4K r-x-- [ anon ]
- total 728520K
2. 查看文件系统,/dev/shm有被使用
- [oracle@OEL ~]$ df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/VolGroup00-LogVol00
- 6.8G 2.7G 3.8G 41% /
- /dev/sda1 99M 24M 71M 25% /boot
- tmpfs 1.5G 75M 1.4G 6% /dev/shm
- /dev/sdo1 9.9G 7.3G 2.1G 79% /u01
3. 这里发现另外一个不同的地方,就是oracle用户的bytes值
- [oracle@OEL shm]$ ipcs -m
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
- 0x00000000 3538944 root 644 80 2
- 0x00000000 3571713 root 644 16384 2
- 0x00000000 3604482 root 644 280 2
- 0xa3c20e68 4030468 oracle 660 4096 0 <<<<<<<<<<<ASM实例没有使用Hugepage,还是4096,同时也 能通过pmap查询到
- 0x6010c970 4390917 oracle 660 736100352 20 <<<<<<<<<<<在不是用Hugepage的时候,这里是4096,但是现在 显示的实际的值
通过测试,意外发现,在使用Hugepags前后,SGA的共享内存在OS系统上是以不同的形态存在的。经过网络搜索,发现/dev/shm是否使用是与AMM相关的,后续再单独测试并更新一篇博客