Chinaunix首页 | 论坛 | 博客
  • 博客访问: 846221
  • 博文数量: 146
  • 博客积分: 3444
  • 博客等级: 中校
  • 技术积分: 1602
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-21 15:18
文章分类

全部博文(146)

文章存档

2014年(9)

2013年(3)

2012年(6)

2011年(44)

2010年(38)

2009年(46)

分类:

2011-05-23 17:15:42

错误现象:小机除了能ping通,其它一切服务停止,控制台上看到灰屏,对一个键盘操作无反应
 
处理一:重启小机,操作系统正常。启动DB2,操作系统正常,连接某个数据库,系统内存消耗快速增涨,最后虚拟内存也耗尽,几分钟后同样故障又发生了。
处理二:再次重启,操作系统正常。启动DB2,操作系统正常,db2 get db cfg for eps_wz
显示数据库参数如下:
      
Database Configuration for Database eps_wz
 Database configuration release level                    = 0x0b00
 Database release level                                  = 0x0b00
 Database territory                                      = CN
 Database code page                                      = 1386
 Database code set                                       = GBK
 Database country/region code                            = 86
 Database collating sequence                             = UNIQUE
 Alternate collating sequence              (ALT_COLLATE) =
 Database page size                                      = 4096
 Dynamic SQL Query management           (DYN_QUERY_MGMT) = DISABLE
 Discovery support for this database       (DISCOVER_DB) = ENABLE
 Restrict access                                         = NO
 Default query optimization class         (DFT_QUERYOPT) = 5
 Degree of parallelism                      (DFT_DEGREE) = 1
 Continue upon arithmetic exceptions   (DFT_SQLMATHWARN) = NO
 Default refresh age                   (DFT_REFRESH_AGE) = 0
 Default maintained table types for opt (DFT_MTTB_TYPES) = SYSTEM
 Number of frequent values retained     (NUM_FREQVALUES) = 10
 Number of quantiles retained            (NUM_QUANTILES) = 20
 Backup pending                                          = NO
 Database is consistent                                  = YES
 Rollforward pending                                     = NO
 Restore pending                                         = NO
 Multi-page file allocation enabled                      = YES
 Log retain for recovery status                          = NO
 User exit for logging status                            = NO
 Self tuning memory                    (SELF_TUNING_MEM) = ON
 Size of database shared memory (4KB)  (DATABASE_MEMORY) = AUTOMATIC
 Database memory threshold               (DB_MEM_THRESH) = 10
 Max storage for lock list (4KB)              (LOCKLIST) = AUTOMATIC
 Percent. of lock lists per application       (MAXLOCKS) = AUTOMATIC
 Package cache size (4KB)                   (PCKCACHESZ) = AUTOMATIC
 Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = AUTOMATIC
 Sort list heap (4KB)                         (SORTHEAP) = AUTOMATIC
2011-5-6 14:35:32 山民(75005963)
 Database heap (4KB)                            (DBHEAP) = 4722
 Catalog cache size (4KB)              (CATALOGCACHE_SZ) = 790
 Log buffer size (4KB)                        (LOGBUFSZ) = 100
 Utilities heap size (4KB)                (UTIL_HEAP_SZ) = 310893
 Buffer pool size (pages)                     (BUFFPAGE) = 800000
 Max size of appl. group mem set (4KB) (APPGROUP_MEM_SZ) = 30000
 Percent of mem for appl. group heap   (GROUPHEAP_RATIO) = 70
 Max appl. control heap size (4KB)     (APP_CTL_HEAP_SZ) = 8192
 SQL statement heap (4KB)                     (STMTHEAP) = 4096
 Default application heap (4KB)             (APPLHEAPSZ) = 1024
 Statistics heap size (4KB)               (STAT_HEAP_SZ) = 4384
 Interval for checking deadlock (ms)         (DLCHKTIME) = 10000
 Lock timeout (sec)                        (LOCKTIMEOUT) = -1
 Changed pages threshold                (CHNGPGS_THRESH) = 80
 Number of asynchronous page cleaners   (NUM_IOCLEANERS) = AUTOMATIC
 Number of I/O servers                   (NUM_IOSERVERS) = AUTOMATIC
 Index sort flag                             (INDEXSORT) = YES
 Sequential detect flag                      (SEQDETECT) = YES
 Default prefetch size (pages)         (DFT_PREFETCH_SZ) = AUTOMATIC
 Track modified pages                         (TRACKMOD) = OFF
 Default number of containers                            = 1
 Default tablespace extentsize (pages)   (DFT_EXTENT_SZ) = 32
 Max number of active applications            (MAXAPPLS) = AUTOMATIC
 Average number of active applications       (AVG_APPLS) = AUTOMATIC
 Max DB files open per application            (MAXFILOP) = 64
 Log file size (4KB)                         (LOGFILSIZ) = 1024
 Number of primary log files                (LOGPRIMARY) = 23
 Number of secondary log files               (LOGSECOND) = 6
 Changed path to log files                  (NEWLOGPATH) =
 Path to log files                                       = /wzdb2data/epswzdb2/e
pswzdb2/NODE0000/SQL00001/SQLOGDIR/
 Overflow log path                     (OVERFLOWLOGPATH) =
 Mirror log path                         (MIRRORLOGPATH) =
 First active log file                                   =
 Block log on disk full                (BLK_LOG_DSK_FUL) = NO
 Percent max primary log space by transaction  (MAX_LOG) = 0
 Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0
 Group commit count                          (MINCOMMIT) = 1
 Percent log file reclaimed before soft chckpt (SOFTMAX) = 920
 Log retain for recovery enabled             (LOGRETAIN) = OFF
 User exit for logging enabled                (USEREXIT) = OFF
 HADR database role                                      = STANDARD
 HADR local host name                  (HADR_LOCAL_HOST) =
 HADR local service name                (HADR_LOCAL_SVC) =
 HADR remote host name                (HADR_REMOTE_HOST) =
 HADR remote service name              (HADR_REMOTE_SVC) =
 HADR instance name of remote server  (HADR_REMOTE_INST) =
 HADR timeout value                       (HADR_TIMEOUT) = 120
 HADR log write synchronization mode     (HADR_SYNCMODE) = NEARSYNC
2011-5-6 14:35:45 山民(75005963)
 First log archive method                 (LOGARCHMETH1) = OFF
 Options for logarchmeth1                  (LOGARCHOPT1) =
 Second log archive method                (LOGARCHMETH2) = OFF
 Options for logarchmeth2                  (LOGARCHOPT2) =
 Failover log archive path                (FAILARCHPATH) =
 Number of log archive retries on error   (NUMARCHRETRY) = 5
 Log archive retry Delay (secs)         (ARCHRETRYDELAY) = 20
 Vendor options                              (VENDOROPT) =
 Auto restart enabled                      (AUTORESTART) = ON
 Index re-creation time and redo index build  (INDEXREC) = SYSTEM (RESTART)
 Log pages during index build            (LOGINDEXBUILD) = OFF
 Default number of loadrec sessions    (DFT_LOADREC_SES) = 1
 Number of database backups to retain   (NUM_DB_BACKUPS) = 12
 Recovery history retention (days)     (REC_HIS_RETENTN) = 366
 TSM management class                    (TSM_MGMTCLASS) =
 TSM node name                            (TSM_NODENAME) =
 TSM owner                                   (TSM_OWNER) =
 TSM password                             (TSM_PASSWORD) =
 Automatic maintenance                      (AUTO_MAINT) = ON
   Automatic database backup            (AUTO_DB_BACKUP) = OFF
   Automatic table maintenance          (AUTO_TBL_MAINT) = ON
     Automatic runstats                  (AUTO_RUNSTATS) = ON
     Automatic statistics profiling    (AUTO_STATS_PROF) = OFF
       Automatic profile updates         (AUTO_PROF_UPD) = OFF
     Automatic reorganization               (AUTO_REORG) = ON
 
想连上去修改数据库参数,结果系统又挂了。。。。。
再次重启。。。。。( db2pd -db eps_wz -memsets -bufferpools)抓数据
然后再启动DB2,然后

db2set db2_override_bpf=5000
db2 terminate
db2stop
db2start

$ ulimit -a
time(seconds)        无限制
file(blocks)         无限制
data(kbytes)         无限制
stack(kbytes)        32768
memory(kbytes)       无限制
coredump(blocks)     无限制
nofiles(descriptors) 2000
$
 
db2 connect to eps_wz
总算连上了。。。。。。。。

db2set db2_override_bpf=5000 这条语句是啥意思???
就是限制他使用内存
 
然后修改如下两条配置(都减掉一个0)
 Utilities heap size (4KB)                (UTIL_HEAP_SZ) = 310893
 Buffer pool size (pages)                     (BUFFPAGE) = 800000
 
db2 update db cfg for eps_wz using UTIL_HEAP_SZ 31089
db2 update db cfg for eps_wz using BUFFPAGE 80000
 
db2 update db eps_wz using BUFFPAGE 10240
db2 update db eps_wz using UTIL_HEAP_SZ 8192
 
最后再使用
db2set DB2_OVERRIDE_BPF=
去掉对使用内存的限制,任务完成
 
阅读(926) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~