Chinaunix首页 | 论坛 | 博客
  • 博客访问: 283507
  • 博文数量: 81
  • 博客积分: 2098
  • 博客等级: 大尉
  • 技术积分: 955
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-24 14:29
文章分类

全部博文(81)

文章存档

2012年(2)

2011年(1)

2010年(20)

2009年(20)

2008年(38)

我的朋友

分类: Sybase

2010-03-04 13:59:04

-bash-3.00$ ./startserver -f RUN_sgh
-bash-3.00$ 00:00000:00000:2010/03/04 09:49:26.43 kernel  SySAM: Using licenses from: /opt/sybase/SYSAM-2_0/licenses
00:00000:00000:2010/03/04 09:49:26.49 kernel  SySAM: Checked out license for 1 ASE_CORE (2008.06200/permanent/1A12 9D41 FA65 7CD2).
00:00000:00000:2010/03/04 09:49:26.49 kernel  This product is licensed to: MINISTRY OF PUBLIC NETWORK SUPERVSI
00:00000:00000:2010/03/04 09:49:26.49 kernel  Checked out license ASE_CORE
00:00000:00000:2010/03/04 09:49:26.51 kernel  Adaptive Server Enterprise (Enterprise Edition)
00:00000:00000:2010/03/04 09:49:26.51
kernel  Using config area from primary master device.
00:00000:00000:2010/03/04 09:49:26.52 kernel  os_create_region: can't allocate 1048576000 bytes
00:00000:00000:2010/03/04 09:49:26.52 kernel  kbcreate: couldn't create kernel region.
00:00000:00000:2010/03/04 09:49:26.52 kernel  kistartup: could not create shared memory

 


-bash-3.00$ ./startserver -f RUN_sgh
-bash-3.00$ 00:00000:00000:2010/03/04 12:57:42.87 kernel  SySAM: Using licenses from: /opt/sybase/SYSAM-2_0/licenses
00:00000:00000:2010/03/04 12:57:42.91 kernel  SySAM: Checked out license for 1 ASE_CORE (2008.06200/permanent/1A12 9D41 FA65 7CD2).
00:00000:00000:2010/03/04 12:57:42.91 kernel  This product is licensed to: MINISTRY OF PUBLIC NETWORK SUPERVSI
00:00000:00000:2010/03/04 12:57:42.91 kernel  Checked out license ASE_CORE
00:00000:00000:2010/03/04 12:57:42.91 kernel  Adaptive Server Enterprise (Enterprise Edition)
00:00000:00000:2010/03/04 12:57:42.92 kernel  Using config area from primary master device.
00:00000:00000:2010/03/04 12:57:42.93 server
  The value of the 'max memory' parameter (262144) defined in the configuration file is not high enough to set the other parameter values specified in the configuration file. 'max memory' should be greater than the 'total logical memory' '26457

 

 

出现上述提示,都是由于下述三个数据库参数没有优化配置好.

在/opt/sybase/ASE-15_0/xx.cfg配置文件中,对下述参数进行优化.

(另如果数据库已经打开了,可以进入isql,则在islq>下输入下述语句就可以进行优化了.)

 

针对2g内存(redflag中为free -m  or top),多次测试后,最终参数为(数据库可以起来,不报错)
    max memory                  procedure cache size                        default data cache    
 262144     0.5g                            50m                                                    300m

 

--设置数据库能够使用的最大内存数,单位为2K,下面配置为2G1024*1024

sp_configure 'max memory',1048576

 

 --设置过程缓存,单位为2K,下面配置为200M100*1024

sp_configure 'procedure cache size',102400

 

 --设置数据库默认的数据缓存,一般为最大内存值的60%,针对2G内存,一般配置为1.2G

sp_cacheconfig 'default data cache','1200M'

 

 --设置数据库允许的最大用户连接数,下面配置为100

sp_configure 'number of user connections',100

 

 --设置数据库最大的锁数量,下面配置为50000

sp_configure 'number of locks',50000

 

 --设置数据库允许的最大设备数量,下面配置为100

sp_configure 'number of devices',100

 

 --让数据库在启动的时候一次性收集完所有内存

sp_configure 'allocate max shared memory','1'

 

 --设置数据库最大可使用的CPU数,下面配置为3

sp_configure 'max online engines',3

 

--设置在数据库启动时加载的CPU数,下面配置为3

sp_configure 'number of engines at startup',3

 

 -- sybaseCPU配置注意事项:

-- 如果发现配置多个CPU后只能加载一个,请在启动sybase前执行命令"ulimit -s unlimited",可以将该命令加入到".bash_profiles"文件中,以免每次都执行

 

 -- sybase大内存配置注意事项:

-- 针对64sybase配置大内存,如果在配置了大内存后数据库无法启动,请按如下方法修改linux环境参数,再启动sybase

-- 1.使用命令"vi /etc/sysctl.conf" 修改属性"kernel.shmmax"的值为"内存值(单位G)*1024*1024*1024"

-- 2.修改完成后使用命令"sysctl -p"使更改生效

阅读(2949) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~