网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库 > Sybase教程
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Sybase教程,Access教程,DB2教程,数据库安全,数据库文摘
本月文章推荐
.带你轻松接触Sybase ASE15.0.2性.
.高性能数据仓库引擎Sybase IQ的S.
.Sybase数据库备份脚本需要Sybase.
.利用HP磁带库轻松保护Sybase数据.
.Sybase与菲奈特联手推出移动BI解.
.Sybase ASE for Linux安装过程及.
.启动数据库管理工具Sybase Centr.
.Sybase按照一定顺序导出bcp out表.
.将Sybase数据库的sa密码重置为空.
.Sybase和Oracle安装过程中常遇到.
.安装Sybase后新建server时遇到的.
.通过sp_sysmon对Sybase进行性能诊.
.Sybase再创IBM Power 550交易处理.
.Sybase与英国大东电报公司正式签.
.SYBASE到ORACLE连接服务器的实现.
.实例讲解Sybase远程磁带备份的具.
.2008年第一季度Sybase业绩增长势.
.Sybase及SQL Anywhere SQL语句小.
.从各个方面产品对比SYBASE & ORA.
.有关Sybase12.5重置"sa"口令的个.

带你轻松接触Sybase ASE15.0.2性能优化

发表日期:2008-4-24


Sybase ASE15.0.2性能优化:

调整共享内存:

/sbin/sysctl -w kernel.shmmax=3416386150

shmmax是最大共享内存段,假如服务器上没有别的应用并且使用raw device可以将此参数调整到物理内存的90%,如果使用file system device 的话相应调小,因为file system buffer需要开销内存!修改后重新启动系统。

数据库的创建:

tempdb数据和日志分离:

USE master

Go

DISK INIT name = 'tempdbdev01', physname = '/opt/sybase/data/tempdbdev01.dat' , size = '1G',dsync = 'false'

Go

DISK INIT name = 'tempdblogdev01', physname = '/opt/sybase/data/tempdblogdev01.dat', size = '1G',dsync = 'false'

Go

ALTER DATABASE tempdb ON tempdbdev01 = '1G' LOG ON tempdblogdev01 = '1G'

Go

USE tempdb

Go

删除tempdb上使用的master段:

EXEC sp_dropsegment 'logsegment', 'tempdb', 'master'

go

EXEC sp_dropsegment 'system', 'tempdb', 'master'

go

EXEC sp_dropsegment 'default', 'tempdb', 'master'

Go

如果已针对 tempdb 建立了设备,则只需禁用 dsyncio,但需要重新启动 Adaptive Server:

EXEC sp_deviceattr 'tempdbdev01', 'dsync', 'false'

Go

EXEC sp_deviceattr 'tempdblogdev01', 'dsync','false'

Go

数据库设备最好设置Direct IO,获得的性能相信会让你满意。

Sybase ASE 15.0.2运行中的配置参数及调优

1、内存

sp_configure “max memory”,0,”2600M” (设置为共享内存的75%,重启生效)

sp_configure “allocate max shared mem”,1 (启动的时候自动分配max memory指定的最大内存)

sp_cacheconfig “default data cache”,”1300m”(设置数据缓存为max memory的一半)

sp_cacheconfig “default data cache”,”cache_partition=2″ (在SMP的环境中还有一个问题就是螺旋锁的竞争,当用sp_sysmon观察到资源缓存螺旋锁争夺超过10%时就需要分区。)

sp_poolconfig “default data cache”,”128m”,”16k” (增加一个16K I/O缓存池,解决排序等大IO操作,需要在长期观察后才能使用性能最佳化.)

sp_configure “procedure cache size”,102400 (过程高速缓存,通常是Max mem20%,这里是200M)

sp_cacheconfig ‘tempdb_cache’,'200m’,'mixed’ (创建一个200M命名高速缓存tempdb_cache给temdpb使用)

sp_bindcache ‘tempdb_cache’,tempdb (将tempdb_cache绑定到tempdb)

2、CPU(默认值为1)

当服务器的CPU个数多于一个时,可以考虑多CPU进行并行处理。(并行查询、并行dbcc、并行建立索引、并行bcp)

可根据实际CPU数来修改,若CPU>1时,一般设置为N-1。实际上OS会自动调度。

sp_configure “max online engines”,8

sp_configure “number of engines at startup”,8

sp_configure “number of worker processes”,8 (并行度*并发连接数*1.5倍)

sp_configure “max parallel degree”,1 (允许CPU并行)

3、连接数(默认数为25,可根据应用需要来修改

sp_configure “number of user connections”,600

4、锁

sp_configure “number of locks”,100000

5、索引对像

数据库空闲状态下运行:sp_countmetadata “open indexes”

正常运行时运行:sp_monitorconfig “open indexes”

来确定一个最佳值,增加10%左右。

sp_configure “number of open indexes”,2000

sp_configure “number of open objects”,2000

sp_configure “number of open partitions”,1500

此外,还有一个关于OLTP的配置,大家有兴趣的可以试一试:

sp_configure “optimization goal”,”allow_oltp”

上一篇:利用HP磁带库轻松保护Sybase数据库安全 人气:1143
下一篇:讲解Sybase数据库截断和清空日志的方法 人气:1339
浏览全部Sybase ASE15.0.2的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐