SYBASE_系统参数调整.docVIP

  • 5
  • 0
  • 约6.56万字
  • 约 17页
  • 2016-10-22 发布于河南
  • 举报
SYBASE_系统参数调整

SYBASE_系统参数调整 sybase性能优化个人随记 sybase 优化总结 =========================================================== 一. SYBASE 系统参数调整 1.内存 LINUX操作系统内存调整: /sbin/sysctl -w kernel.shmmax=3416386150 shmmax是最大共享内存段,假如服务器上没有别的应用并且使用raw device可以将此参数调整到物理内存的90%,如果使用file system device 的话相应调小,因为file system buffer需要开销内存!修改后重新启动系统。 sp_configure max memory,1500000 重启生效(设置为共享内存的75%) sp_configure allocate max shared mem,1 启动的时候自动分配max memory指定的最大内存。(如果sybase是安装在windows上,在windows任务管理器里可以看到占用内存确实为3G) sp_cacheconfig default data cache,1500m 设置数据缓存(设置为max memory的一半) sp_cacheconfig default data cache,cache_partition=2 是CPU数量的倍数,对数据缓冲区分区 sp_poolconfig default data cache,64m,16k 设置16K 数据缓存 sp_poolconfig default data cache,128m,8k 设置8K 数据缓存 sp_configure procedure cache size,90000 存储过程数据缓存 sp_cacheconfig tempdb_cache,200m,mixed 创建命名高速缓存 sp_poolconfig tempdb_cache,50M,16K 可选:若有大的I/O,配置内存池 sp_bindcache tempdb_cache,tempdb 重启生效。捆绑临时数据库到tempdb_cache高速缓存 2.cpu sp_configure max online engines,2 设置使用的CPU数量 sp_configure number of engines at startup,2 启动时使用CPU数量 3. 网络 sp_configure default network packet size,2048 设置网络传送包的大小(重启动生效) sp_configure max network packet size,2048 4. 其他资源使用 sp_configure number of locks,100000 锁使用数量 sp_configure number of open indexes,5000 打开索引 sp_configure number of open objects,5000 打开对象 sp_configure number of user connections,1000 用户连接数 sp_configure number of device,100 新建设备最大数量 二. sybase 设备调整 数据设备与日志设备必须分开,添加临时数据库设备 1. 数据设备 sp_deviceattr devname,dsync,true 2. 日志设备 sp_deviceattr devname,dsync,false 3. 临时数据库设备 sp_deviceattr devname,dsync,false tempdb数据和日志分离: USE master DISK INIT name = tempdbdev01, physname = /opt/sybase/data/tempdbdev01.dat, size = 1G,dsync = false DISK INIT name = tempdblogdev01, physname = /opt/sybase/data/tempdblogdev01.dat, size = 1G,dsync = false ALTER DATABASE tempdb ON tempdbdev01 = 1G LOG ON tempdblogdev01 = 1G 从tempdb的段标记上去除master设备: EXEC sp_dropsegment logsegment, tempdb, master go EXEC sp_dropsegment system, tempdb, master go use tempdb sp_he

文档评论(0)

1亿VIP精品文档

相关文档