- 最后登录
- 2013-11-14
- 在线时间
- 104 小时
- 威望
- 999
- 金钱
- 271
- 注册时间
- 2013-1-9
- 阅读权限
- 70
- 帖子
- 63
- 精华
- 0
- 积分
- 999
- UID
- 855
|
4#
发表于 2013-3-5 21:10:43
本帖最后由 Stone 于 2013-3-5 21:17 编辑
简单补充一下这个参数的设置:
http://blog.oracle48.nl/oracle-11g-amm-memory_target-memory_max_target-and-dev_shm/
这篇文章有比较好的描述,我摘录一下,顺便说说一些看法。
Increase /dev/shm
If you increase the MEMORY_MAX_TARGET above the available /dev/shm space (df -h), you will receive:
ORA-00845: MEMORY_TARGET not supported on this system
If you have enough memory on your Linux machine, but /dev/shm is mounted to small by default, one can increase this amount of memory by changing /etc/fstab for permanent changes. The default is half of your physical RAM without swap.
For temporary changes to at least start the database, execute the following (change the 1500m to your environment):
> umount tmpfs
> mount -t tmpfs shmfs -o size=1500m /dev/shm - [oracle@stonedb ~]$ oerr ora 845
- 00845, 00000, "MEMORY_TARGET not supported on this system"
- // *Cause: The MEMORY_TARGET parameter was not supported on this operating system or /dev/shm was not sized correctly on Linux.
- // *Action: Refer to documentation for a list of supported operating systems. Or, size /dev/shm to be at least the SGA_MAX_SIZE on each Oracle instance running on the system.
复制代码 Oracle的意思是/dev/shm大小至少应该和SGA_MAX_SIZE一样, 当然可以更大。所以SGA_MAX_SIZE/MEMORY_MAX_TARGET的大小是不能超过/dev/shm的。
另外/dev/shm的空间占用问题,应该是不用手工清除的。可以参考下面的说明:
What is /dev/shm?
It is an in-memory mounted file system (tmpfs) and is very fast, but non-persistent when Linux is rebooted.
In Oracle 11g, it is used to hold SGA memory by storing the SGA structures in files with the same granule size. This granule size comes in 4M and 16M flavours, depending the MEMORY_MAX_TARGET smaller or larger than 1G.
When these MEMORY_TARGET and MEMORY_MAX_TARGET parameters are set, oracle will create as much as =(MEMORY_MAX_TARGET / granule size) files. For instance, when MEMORY_MAX_TARGET set to 512M, it will create 512/4 = 128 files (actually 129, the sneaky…).
我的测试系统默认设置如下,你可以检查下自己系统这两个参数的设置,看看有莫有关系。:- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- SQL> show parameter sga_
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- sga_max_size big integer 352M
- SQL> show parameter memory_
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- memory_max_target big integer 352M
- memory_target big integer 352M
复制代码 感觉下面里面的内容是不用清除的,具体可以参考最上面的blog文章,当然不是我的啦 ;)- [oracle@stonedb ~]$ ls -lrth /dev/shm/
- total 224M
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_458756_0
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_524294_0
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_458756_1
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_53
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_54
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_55
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_56
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_57
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_58
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_59
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_60
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_61
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_62
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_63
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_64
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_65
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_66
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_67
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_68
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_69
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_70
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_71
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_72
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_73
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_74
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_75
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_76
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_77
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_78
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_79
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_80
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_81
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_82
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_83
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_84
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_85
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_52
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_51
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_50
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_32
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_33
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_34
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_35
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_36
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_37
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_38
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_39
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_40
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_41
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_42
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_43
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_44
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_45
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_46
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_47
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_48
- -rw-rw---- 1 oracle oinstall 4.0M Dec 1 12:32 ora_STONE11G_491525_49
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_9
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_8
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_7
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_6
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_5
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_4
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_3
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_29
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_28
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_27
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_26
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_25
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_24
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_23
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_22
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_21
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_20
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_2
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_19
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_18
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_17
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_16
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_15
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_14
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_13
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_12
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_11
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_10
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_1
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:32 ora_STONE11G_491525_0
- -rw-rw---- 1 oracle oinstall 0 Dec 1 12:35 ora_STONE11G_491525_30
- -rw-rw---- 1 oracle oinstall 0 Dec 1 13:09 ora_STONE11G_491525_31
- [oracle@stonedb ~]$
复制代码 另外关于谨慎使用,多多了解一些使用的注意事项还是比较好的,希望有所帮助 :)
可以参考下面的文章
http://www.dba-oracle.com/t_ora_00845_memory_target_not_supported_linux_hugepages.htm
|
-
总评分: 威望 + 15
查看全部评分
|