楼主: biti_rainy

[精华] 32bit oracle 扩展SGA原理

[复制链接]
论坛徽章:
3
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
11#
发表于 2004-9-26 16:45 | 只看该作者

32位的aix, oracle 817如何突破sga 1.7G的限制.

找了好久,找不到这样文章.

使用道具 举报

回复
论坛徽章:
0
12#
发表于 2004-9-28 10:22 | 只看该作者
有深度

使用道具 举报

回复
论坛徽章:
2
行业板块每日发贴之星
日期:2005-03-22 01:02:26授权会员
日期:2005-10-30 17:05:33
13#
发表于 2004-10-22 14:03 | 只看该作者
好文章,谢谢

使用道具 举报

回复
论坛徽章:
1
2009新春纪念徽章
日期:2009-01-04 14:52:28
14#
发表于 2004-10-27 22:27 | 只看该作者
3 ks .

使用道具 举报

回复
招聘 : Java研发
论坛徽章:
71
马上加薪
日期:2014-02-19 11:55:14蜘蛛蛋
日期:2012-12-26 18:16:01茶鸡蛋
日期:2012-11-16 08:12:48ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:07奥运会纪念徽章:网球
日期:2012-08-23 14:58:08奥运会纪念徽章:沙滩排球
日期:2012-07-19 17:28:14版主2段
日期:2012-07-07 02:21:02咸鸭蛋
日期:2012-03-23 18:17:482012新春纪念徽章
日期:2012-02-13 15:13:512012新春纪念徽章
日期:2012-02-13 15:13:51
15#
发表于 2005-6-2 16:53 | 只看该作者
64win2003下32位oracle怎么扩展呢?

使用道具 举报

回复
论坛徽章:
0
16#
发表于 2005-10-28 16:18 | 只看该作者
好文,收藏,慢慢研究

使用道具 举报

回复
招聘 : 系统架构师
论坛徽章:
372
双子座
日期:2015-08-18 12:18:21摩羯座
日期:2015-09-20 17:10:27秀才
日期:2015-09-21 09:46:16秀才
日期:2015-09-21 11:16:42秀才
日期:2015-10-08 17:57:58天枰座
日期:2015-10-28 18:28:29秀才
日期:2015-11-11 09:48:44秀才
日期:2015-11-11 10:07:14秀才
日期:2015-11-11 10:22:49秀才
日期:2015-09-11 10:43:06
17#
发表于 2005-10-31 09:44 | 只看该作者

Come from Yong Huang

[php]How to Create a Large SGA Without Relocating sgabeg on 32-bit Oracle?

One of our production data warehouse servers (Oracle 8.1.7.4 Solaris 2.6 sun4u
12GB memory) had a 256MB shmmax set in /etc/system for years, yet the total SGA
was over 2GB:

Total System Global Area 2367844512 bytes
Fixed Size 73888 bytes
Variable Size 187043840 bytes
Database Buffers 2129920000 bytes
Redo Buffers 50806784 bytes

One day we realized this mistake and changed shmmax to 4GB per Oracle817 Install
Guide A85471_01.pdf. Then we couldn't startup the instance and got the familiar
error:

SVRMGR> startup
ORA-27123: unable to attach to shared memory segment
SVR4 Error: 22: Invalid argument
Additional information: 1
Additional information: 106

How interesting! You could create a greater than 1.75 GB SGA without relocating
sgabeg (procedure outlined in Metalink Note:1028623.6). So I did some test on a
small Ultra2 box running Oracle 9.0.1.3 Solaris 2.6 with only 512MB RAM. What I
find is quite surprising. When shmmax is set to 268435456, 1073741824,
1610612736, 1879048192, 2013265920, 2076386194 or 2111934921, the instance can
startup OK: [note]

Total System Global Area 2131529288 bytes
Fixed Size 282184 bytes
Variable Size 218103808 bytes
Database Buffers 1912602624 bytes
Redo Buffers 540672 bytes

But when it's 2139506468, I get ORA-27123 when I try to startup Oracle. Why is
the jump from 2111934921 to 2139506468 significant? Because SGA is 2131529288,
a number between them! So, here's my conclusion:

********************************************************************************
If shmmax < SGA, you can always startup Oracle even with SGA > 1.75GB; but if
shmmax > SGA, the one segment rule will be enforced and therefore you can't
have an SGA > 1.75GB unless you relocate sgabeg.
********************************************************************************

There's of course an upper limit to which you can increase SGA. 32-bit OS only
allows 2^32 or 4GB virtual address space. The binary oracle, stack and many
shared libraries have to take some space. When you arbitrarily increase SGA,
you're squeezing down heap (used by Oracle PGA) to a smaller value. The above
conclusion basically states that sgabeg loses its meaning when shmmax < SGA and
some segments will be created under "sgabeg", achieving the same effect of
relocating the SGA beginning address to a lower value, only that multiple
segments instead of a single one are created.

Oracle Support's "explanation" why the one-segment rule is not enforced when
shmmax < SGA didn't convince me (see Tars 3018781.999 and 13791543.6 for those
who can view them).

By the way, there're some wrong or misleading notes on Meatalink. Note:221805.1
says 64-bit OS limits virtual address space to 29GB and therefore you can only
create an SGA smaller than 29-14=15GB (14 is sgabeg for 64-bit Oracle). But even
for UltraSPARC-I/II, the OS limit on virtual address space is 2^44 or 16TB
(see groups.google.com/groups?&selm=8i39dp%24j23%241%40new-usenet.uk.sun.com and
groups.google.com/groups?selm=2002510.22527.9963%40cable.prodigy.com). Oracle
Install Guide A96167-01 tells users to set shmmax to 4GB without a caveat that
this advice is only for 32-bit Oracle, except in the HPUX section where shmmax
is advised to set to "Available physical memory", the best advice of all!

[/php]

使用道具 举报

回复
论坛徽章:
0
18#
发表于 2005-11-30 14:47 | 只看该作者

Relocating the SGA ,meet some error,NEED YOUR HELP,THX

Relocating the SGA  (see metalink DocID: 260152.1) got glibc error !!

- Relocating the SGA:
                    % cd $ORACLE_HOME/rdbms/lib
                    % cp ksms.s ksms.s_orig
                    % genksms -s 0x15000000  > ksms.s     
                    % make -f ins_rdbms.mk ksms.o
                    % make -f ins_rdbms.mk ioracle
After Relink SFRAC  for oracle 9i . We try relocating SGA got some error as below ,

oracle@sfrac1 lib$ make -f ins_rdbms.mk ioracle
- Linking Oracle
rm -f /oracle/orahome/rdbms/lib/oracle
gcc  -o /oracle/orahome/rdbms/lib/oracle -L/oracle/orahome/rdbms/lib/ -L/oracle/orahome/lib/ -L/oracle/orahome/lib/stubs/   -Wl,-E `test -f /oracle/orahome/rdbms/lib/skgaioi.o && echo /oracle/orahome/rdbms/lib/skgaioi.o` /oracle/orahome/rdbms/lib/opimai.o /oracle/orahome/rdbms/lib/ssoraed.o /oracle/orahome/rdbms/lib/ttcsoi.o /oracle/orahome/lib/nautab.o /oracle/orahome/lib/naeet.o /oracle/orahome/lib/naect.o /oracle/orahome/lib/naedhs.o /oracle/orahome/rdbms/lib/config.o  -lserver9 -lodm9 -lskgxp9 -lskgxn9 -lclient9  -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 /oracle/orahome/rdbms/lib/defopt.o -lknlopt `if /usr/bin/ar tv /oracle/orahome/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap9" ; fi`  -lslax9 -lpls9  -lplp9 -lserver9 -lclient9  -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lknlopt -lslax9 -lpls9  -lplp9 -ljox9 -lserver9 -locijdbcst9 -lwwg9  `cat /oracle/orahome/lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /oracle/orahome/lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lmm -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /oracle/orahome/lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /oracle/orahome/lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9  -ltrace9 -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `if /usr/bin/ar tv /oracle/orahome/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo9"; fi` -lctxc9 -lctx9 -lzx9 -lgx9 -lctx9 -lzx9 -lgx9 -lordimt9 -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lsnls9 -lunls9 -lxsd9 -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9   `cat /oracle/orahome/lib/sysliblist` -Wl,-rpath,/oracle/orahome/lib:/lib/i686:/lib:/usr/lib  -lm    `cat /oracle/orahome/lib/sysliblist` -ldl -lm   `test -f /oracle/orahome/rdbms/lib/skgaioi.o && echo -laio`
/lib/i686/librt.so.1: undefined reference to `pthread_cond_signal@GLIBC_2.3.2'
/lib/i686/librt.so.1: undefined reference to `pthread_cond_broadcast@GLIBC_2.3.2'
/lib/i686/librt.so.1: undefined reference to `pthread_cond_destroy@GLIBC_2.3.2'
/lib/i686/librt.so.1: undefined reference to `pthread_cond_timedwait@GLIBC_2.3.2'
/lib/i686/librt.so.1: undefined reference to `__librt_enable_asynccancel@GLIBC_PRIVATE'
/lib/i686/librt.so.1: undefined reference to `pthread_cond_wait@GLIBC_2.3.2'
/lib/i686/librt.so.1: undefined reference to `__libc_pwrite@GLIBC_PRIVATE'
/lib/i686/librt.so.1: undefined reference to `__librt_multiple_threads@GLIBC_PRIVATE'
/lib/i686/librt.so.1: undefined reference to `__librt_disable_asynccancel@GLIBC_PRIVATE'
/lib/i686/librt.so.1: undefined reference to `pthread_cond_init@GLIBC_2.3.2'
/lib/i686/librt.so.1: undefined reference to `__register_atfork@GLIBC_2.3.2'
/oracle/orahome/lib//libskgxp9.so: undefined reference to `__ctype_b_loc'
collect2: ld returned 1 exit status
make: *** [/oracle/orahome/rdbms/lib/oracle] Error 1

Now our solution is copy oracle libskgxp9.so back .

[oracle@sfrac1 lib]$ cd $ORACLE_HOME/lib
[oracle@sfrac1 lib]$ cp libskgxp9.so_11_29_05-06_07_33 libskgxp9.so

And re-make oracle binary , It's work !!

[oracle@sfrac1 lib]$ cd $ORACLE_HOME/rdbms/lib
[oracle@sfrac1 lib]$ make -f ins_rdbms.mk ioracle

- Linking Oracle
rm -f /oracle/orahome/rdbms/lib/oracle
gcc  -o /oracle/orahome/rdbms/lib/oracle -L/oracle/orahome/rdbms/lib/ -L/oracle/orahome/lib/ -L/oracle/orahome/lib/stubs/   -Wl,-E `test -f /oracle/orahome/rdbms/lib/skgaioi.o && echo /oracle/orahome/rdbms/lib/skgaioi.o` /oracle/orahome/rdbms/lib/opimai.o /oracle/orahome/rdbms/lib/ssoraed.o /oracle/orahome/rdbms/lib/ttcsoi.o /oracle/orahome/lib/nautab.o /oracle/orahome/lib/naeet.o /oracle/orahome/lib/naect.o /oracle/orahome/lib/naedhs.o /oracle/orahome/rdbms/lib/config.o  -lserver9 -lodm9 -lskgxp9 -lskgxn9 -lclient9  -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 /oracle/orahome/rdbms/lib/defopt.o -lknlopt `if /usr/bin/ar tv /oracle/orahome/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap9" ; fi`  -lslax9 -lpls9  -lplp9 -lserver9 -lclient9  -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lknlopt -lslax9 -lpls9  -lplp9 -ljox9 -lserver9 -locijdbcst9 -lwwg9  `cat /oracle/orahome/lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /oracle/orahome/lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lmm -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /oracle/orahome/lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /oracle/orahome/lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9  -ltrace9 -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `if /usr/bin/ar tv /oracle/orahome/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo9"; fi` -lctxc9 -lctx9 -lzx9 -lgx9 -lctx9 -lzx9 -lgx9 -lordimt9 -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lsnls9 -lunls9 -lxsd9 -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9   `cat /oracle/orahome/lib/sysliblist` -Wl,-rpath,/oracle/orahome/lib:/lib/i686:/lib:/usr/lib  -lm    `cat /oracle/orahome/lib/sysliblist` -ldl -lm   `test -f /oracle/orahome/rdbms/lib/skgaioi.o && echo -laio`
mv -f /oracle/orahome/bin/oracle /oracle/orahome/bin/oracleO
mv /oracle/orahome/rdbms/lib/oracle /oracle/orahome/bin/oracle
chmod 6751 /oracle/orahome/bin/oracle

After make oracle , relink SFRAC for oracle 9i

Is it right procedure ?

使用道具 举报

回复
论坛徽章:
0
19#
发表于 2005-12-1 16:40 | 只看该作者
好文章.绝对支持!!!

使用道具 举报

回复
论坛徽章:
0
20#
发表于 2005-12-28 11:08 | 只看该作者
有谁研究过10G ON SUSE8的测试?

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表