惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - Sanle

jquery技巧总结 在不同版本的 SQL Server 之间传输登录和密码的完整解决方案 安装iis 成大事必备的9种心态 人际关系的十大要领 IIS6.0应用程序池回收和工作进程 五种提高 SQL 性能的方法 必须掌握的八个【cmd 命令行】[ 防止项目延迟的18条军规 一个自动产生编号的存储过程,数据库sql2000或2005 设计模式与武功秘籍的异曲同工 存储过程是多用还是少用 SQL有用代码 做项目就是学习 SQL大全 SOA实施的成功主要有以下8种 SOA,现在进行时 4u4gsybase配置 sybase优化处理
带你轻松接触Sybase ASE15.0.2性能优化
Sanle · 2008-09-03 · via 博客园 - Sanle

带你轻松接触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”