Chinaunix首页 | 论坛 | 博客
  • 博客访问: 22022
  • 博文数量: 4
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 56
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-08 09:10
文章分类

全部博文(4)

文章存档

2014年(4)

我的朋友

分类: Sybase

2014-01-11 02:04:26

  一 环境描述

操作系统:

主机机型:

业务类型:

双机方式:

二 数据库参数配置信息

Name                      Num_free    Num_active  Pct_act Max_Used    Reuse_cnt   Instance_Name                 

----                      ----------- ----------- ------- ----------- ----------- -------------                 

additional network memory     2865964    14188272  83.20     14190192           0 NULL                          

audit queue size                  100           0   0.00            0           0 NULL                          

disk i/o structures              4096           0   0.00          239           0 NULL                          

heap memory per user             6144           0   0.00            0           0 NULL                          

max cis remote connection         200           0   0.00            0           0 NULL                          

max memory                          0     7852000 100.00      7852000           0 NULL                          

max number network listen           4           1  20.00            1           0 NULL                          

max online engines                  0           3 100.00            3           0 NULL                           

memory per worker process        1706         342  16.70          342           0 NULL                          

number of alarm

s                   28          12  30.00           12           0 NULL                          

number of aux scan descri       10240           0   0.00            0           0 NULL                          

number of devices                  35          85  70.83           85           0 NULL                          

number of dtx participant         500           0   0.00            0           0 NULL                          

number of java sockets           1004          13   1.28           13           0 NULL                          

number of large i/o buffe           6           0   0.00            2           0 NULL                          

number of locks                798573        1427   0.18         3306           0 NULL                          

number of mailboxes                25           5  16.67            5           0 NULL                           

number of messages                 64           0   0.00            0           0 NULL                          

number of open databases           15           9  37.50            9           0 NULL                          

number of open indexes          99957          43   0.04         7461           0 NULL                          

number of open objects          99945          55   0.06         6863           0 NULL                          

number of open partitions        9936          64   0.64         7988           0 NULL                          

number of remote connecti          20           0   0.00            1           0 NULL                          

number of remote logins            20           0   0.00            1           0 NULL                          

number of remote sites             10           0   0.00            1           0 NULL                          

number of sort buffers            500           0   0.00           48           0 NULL                           

number of user connection         988          12   1.20           12           0 NULL                          

number of worker processe           5           0   0.00            0           0 NULL                          

partition groups                 1024           0   0.00            0           0 NULL                          

permission cache entries           15           0   0.00            0           0 NULL                          

procedure cache size          1044756        3820   0.36         4346           0 NULL                          

size of global fixed heap         299           1   0.33            1           0 NULL                          

size of process object he        8192           0   0.00            0           0 NULL                          

size of shared class heap        3072           0   0.00            0           0 NULL                          

size of unilib cache           314654       95728  23.33        95728           0 NULL                          

txn to pss ratio                16000           0   0.00            0           0 NULL

 

三 建议调优方案

(注意,可以直接修改SERVERNAME.cfg文件或isql连接输入命令,以下是以isql连接为例)

CPU

原CPU设置:

max online engines                  0           3 100.00            3           0 NULL

建议设置:现有2颗物理CPU,每颗为6核,建议配置其物理内存颗数

修改命令:

1>   Sp_configure “max online engines”,4

2>   go

1>   Sp_configure “number of engines at startup”,4

2>   go

1>   Sp_configure “number of engines at startup”,4

2>   go

1>   use master

2>   go

3>   shutdown with now

4>   go

内存

调整系统共享内存:

/sbin/sysctl -w kernel.shmmax=3416386150 (根据系统实际物理内存调整,比如系统的内存是128G,则为128*1024*1024*1024)

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

原max memory :

max memory = 7852000

建议设置:实际物理内存为128G,Sybase以M为单位换算,建议为配置为物理内存的80%。

1>   sp_configure “max memory”,7600M

2>   go

1>     sp_configure “allocate max shared mem”,1

2>     go                                                    //* (启动的时候自动分配max memory指定的最大内存)

3>     sp_cacheconfig “default data cache”,”1300m”

4>     go                                                   //* (设置数据缓存为max memory的一半)

1>   sp_cacheconfig “default data cache”,”cache_partition=2″ 

2>go                                                   //*(在SMP的环境中还有一个问题就是螺旋锁的竞争,观察到资源         缓存螺旋锁争夺超过10%时就需要分区。)

1>   sp_sysmon                                              

2>   go                                            

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

2>   go 

1>   sp_configure “procedure cache size”,102400

2>   go                                                  //* (过程高速缓存,通常是Max mem20%,这里是200M)

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

2>go

1>   sp_bindcache ‘tempdb_cache’,tempdb                    //*(将tempdb_cache绑定到tempdb)

2>   go

 连接数

    原设置

连接对象: number of open objects = 100000

建议设置: 按现有业务量及系统搭建作用为灾备,此连接够用。

最大用户连接数:number of user connections = 1000

建议设置:

1>   sp_configure “number of user connections = 5000

2>   go

4、锁

1>sp_configure “number of locks”,100000

2>go

  索引对像

数据库空闲状态下运行: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”

特别说明:

1、在做上述调优时,请将SERVER_NAME.cfg做备份后再进行修改,如有问题,可逐步对照修改的参数,还原为备份的设置。

2、建议更改每项参数后,重启数据库,不建议一次性全部修改完成后做数据库重启。这样可以讯速判定参数修改是否生效及正确。

阅读(2163) | 评论(0) | 转发(0) |
0

上一篇:杂记

下一篇:杂记

给主人留下些什么吧!~~