1:查看剩余内存
[grid@www.solgle.com bin]$ free -m
total used free shared buffers cached
Mem: 2293 1810 482 0 33 695
-/+ buffers/cache: 1081 1212
Swap: 2303 612 1691
2:查看内存使用情况
[grid@www.solgle.com bin]$ top
top - 14:45:16 up 9 days, 5:28, 1 user, load average: 0.81, 0.87, 0.81
Tasks: 211 total, 1 running, 210 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.3%us, 7.2%sy, 0.0%ni, 84.1%id, 3.4%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2348768k total, 2071768k used, 277000k free, 68360k buffers
Swap: 2359292k total, 613768k used, 1745524k free, 872976k cached
Unknown command - try 'h' for help
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3375 root RT 0 628m 87m 56m S 3.3 3.8 239:23.50 osysmond.bin
3447 root RT -5 693m 153m 62m S 2.7 6.7 311:24.61 ologgerd
29149 oracle 20 0 1248m 33m 29m S 2.7 1.5 0:00.08 oracle
59749 oracle -2 0 1243m 16m 14m S 1.0 0.7 2:57.16 oracle
59769 oracle -2 0 1258m 169m 155m S 1.0 7.4 1:15.97 oracle
3120 root 20 0 700m 24m 14m S 0.7 1.1 68:20.42 ohasd.bin
3360 root 20 0 671m 22m 13m S 0.7 1.0 75:37.06 orarootagent.bi
3424 grid RT 0 642m 113m 54m S 0.7 5.0 63:04.11 ocssd.bin
3586 grid -2 0 1306m 4412 4280 S 0.7 0.2 113:45.49 oracle
3676 root 20 0 733m 38m 20m S 0.7 1.7 97:32.74 crsd.bin
3797 root 20 0 712m 16m 11m S 0.7 0.7 62:16.84 orarootagent.bi
29151 oracle 20 0 1243m 16m 14m S 0.7 0.7 0:00.02 oracle
10 root 20 0 0 0 0 S 0.3 0.0 29:21.49 rcu_sched
1710 root 20 0 969m 102m 8012 S 0.3 4.5 23:11.09 java
3358 grid 20 0 623m 19m 12m S 0.3 0.8 61:25.01 gipcd.bin
3499 root 20 0 626m 15m 10m S 0.3 0.7 34:28.79 octssd.bin
3562 grid 20 0 646m 14m 13m S 0.3 0.6 31:48.36 evmd.bin
3596 grid 20 0 1314m 16m 10m S 0.3 0.7 22:41.24 oracle
3598 grid 20 0 1315m 8516 7756 S 0.3 0.4 27:55.01 oracle
3600 grid 20 0 1322m 13m 6876 S 0.3 0.6 20:46.43 oracle
3602 grid -2 0 1321m 8908 7056 S 0.3 0.4 41:12.47 oracle
3620 grid 20 0 1330m 11m 10m S 0.3 0.5 3:33.74 oracle
3786 grid 20 0 670m 22m 14m S 0.3 1.0 25:26.55 oraagent.bin
26796 root 20 0 0 0 0 S 0.3 0.0 0:01.48 kworker/u:2
28823 root 20 0 0 0 0 S 0.3 0.0 0:00.02 kworker/0:0
58480 grid 20 0 98.0m 1736 780 S 0.3 0.1 0:27.19 sshd
59670 oracle 20 0 663m 32m 16m S 0.3 1.4 1:15.37 oraagent.bin
[grid@www.solgle.com bin]$
3:设置内存分页
--查看物理内存
[grid@www.solgle.com ~]$ cat /proc/meminfo | grep MemTotal
MemTotal: 2348768 kB
--查看内存分页大小
[grid@www.solgle.com ~]$ cat /proc/meminfo | grep HugePage
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
--开始设置
[grid@www.solgle.com ~]$ su - root
Password:
[root@www.solgle.com ~]# vi /etc/sysctl.conf
vm.nr_hugepages = 502 ##添加
--刷新参数
[root@www.solgle.com ~]# sysctl -p
... ...
[root@www.solgle.com ~]# exit
logout
[grid@www.solgle.com ~]$ cat /proc/meminfo | grep HugePage
HugePages_Total: 3
HugePages_Free: 3
HugePages_Rsvd: 0
HugePages_Surp: 0
--估值计算
vm.nr_hugepages=oracle使用的内存总量/2mb
SQL> show parameter memory_max_target
NAME
------------------------------------
TYPE VALUE
---------------------------------------------------------------- -----------
---------------
memory_max_target
big integer 1004M
SQL> select 1004/2 from dual;
1004/2
----------
502