cognoschina
作者cognoschina·2009-06-26 18:11
网站运营经理·北京传诚科技有限公司

Cognos8.3 + oracle9i数据集市 建cube性能调整

字数 6025阅读 2651评论 1赞 0
本次要给客户作一个演示,所以环境都是临时搭建的。
具体环境如下:
DB:    Oracle9i, 内存:512M,xpsp2
cognos:cognos8.3,内存:2G,xpsp2,硬盘:WD3200AAJS-08L7A0

数据:
   主表28w,明细:200w(3个月),字典表4个,分别为 700,122,131,4
   日期粒度到天
第一步:
现象:在transformer中执行建cube后就没有反应了,DB Server CPU等都没有什么反应。
实验了很多,把抽取数据的SQL那出来,单独在SQLPLUS中执行也如此。
哪怕是只去前100行数据,也是没有反应。实验了很多,也没有反应。

原因:查看数据表,发现索引不全,字典表是临时建的,没有索引。

给所有表加索引,给所有外键关联的键值加索引。

在次执行前100行数据,2,3秒内就能出来。

结论:索引是必要的。忘记了,你就等吧
第二步:
现象:在transformer中执行建cube后就没有反应了,DB Server CPU等都没有什么反应。和第一步中没有多大区别

原因:打开OEM,查看session,发现session长时间操作,很慢,读取block一个个读取,剩余时间居然是n天
查看内存参数配置,oracle默认的配置很低。经过多次尝试,参数调整结果如下图:
db Buffer:200
sort_area_size:10M , 默认居然是512K
pga:512M,默认大概48M
一开始调整后连入的session的uga都不大,后来在网上查到一位大侠测试结果,说一个uga大约相当于pga的 6% ,所以吧pga调整到512M
这样,session的uga大约能达到40M左右
share pool size:256M

临时表空间一定要有足够的地方,这个例子发现临时表空间大约用到了3G的样子

调整是逐步的,每次调整后,都发现28w的表的扫描能快上不少,最后调整的结果是执行这个结果大约在5分钟可以完成。

结论:olap的参数和trans的参数还是要有一定区别的,尤其是在建cube的时候,是少并发,大数据量读取,所以各种参数一定要跟上。

第三步:
现象: transformer 读取数据后,报错如下:
RQP-DEF-0177 An error occurred while performing operation 'sqlOpenResult' status='-28'.
UDA-SQL-0114 The cursor supplied to the operation "sqlOpenResult" is inactive.
UDA-SOR-0005 Unable to write the file.
google&baidu后,在ibm的网上说是cognos安装目录下的磁盘空间不够。查看硬盘,还有70G啊。然后就监控 cgnos_homecognos8temp目录,实验几次后,发现每当临时文件增长到大约4G就报错,然后文件就没了。几次三番后想是不是xp的 问题,查看分区后,居然发现分区格式是FAT32的,晕死!!这么大的硬盘居然是FAT32,然后就是转分区格式,幸好XP提供了 convert这个命令,执行后要求重新启动,再次transformer后,临时文件直达10g左右后才完成

CONVERT volume /FS:NTFS [/CvtArea:filename]

原因:FAT32最大支持4G的文件,其实可能都不足4G,而且性能低下,不管是什么用途的机器,赶紧转换吧

结论:XP下绝对要用NTFS分区,
第四步:
现象:transformer从db中读取数据后,依然很慢,3个小时后才弄了两三千行行数据。

又是google&baidu 一通乱搜,后来发现其实TCognos 8 Transformer User Guide 中就有说明,

原因:cognos默认排序为5,000,000,最大65,000,000
在tranformer中,File->preferences->File (Tab) 中



结论:我修改到60,000,000 效果是能看到cube记录在增长,监控硬盘读写,读写速度均在15M左右浮动,读写比率在80%之上,查看该款硬盘的性能评测,单纯读或写,在近100M。应该也已经是接近饱和吧

通过以上4步,例子应该可以完成了,目前已经32w了,还不知道最终什么时候能完成。



transformer的参数调整在手册的Reducing Build Times for Large PowerCubes  这一节,简摘如下:
unix可以设置的参数多写,windows相对少些

Recommendation - Optimize the Operating Environment You can adjust various settings,

whether operating in UNIX/Linux or Windows environments, to shorten your cube build times.

We recommend that you optimize your system by changing various default settings, as follows:

WriteCacheSize (仅unix可调)

OnUNIX or Linux servers, the default value for this setting is 32768 (32MB). Doubling the value to 65536 (64 MB) or tripling it to 98304 (96MB) is recommended to optimize larger UNIX or Linux systems.

Tomodify the WriteCacheSize setting, open the ppds_cfg.xml.sample filelocated in the installation_location/configuration directory. After youchange the WriteCacheSize setting, save the file in the same directoryas ppds_cfg.xml.


Sort buffer size (windows可调)

The sort buffer size used for local processing is specified as a preference setting on Windows and UNIX/Linux:

On Windows, set the Work file sort buffer size on the File tab of the Preferences dialog box.

On UNIX/Linux, set the sort buffer size using the WorkFileSortSize command.

Thedefault setting is 8000000; however, you can raise the amount ofphysical memory available for sorting data during the consolidation andauto-partitioning process.


TEMPFILEDIRS (Windows only)

Youcan change the location of the temporary files that are createdwhenever sorting is done. We recommend that you specify multipledirectories, separating each with a semicolon.


MaxTransactionNum (Windows only)

Thissetting limits the number of records that can be processed in temporaryfiles before a checkpoint is inserted and records are committed to thePowerCube. To reduce cube build time, try raising the setting from itsdefault (500000) to 800000. Or, if you get error message TR0112 duringa cube build, lower the setting so records are committed morefrequently, thereby freeing up space.

You change this setting on the General tab of the Preferences property sheet.


Ulimit (UNIX/Linux only)

Typically,you specify a value for this setting, such as 67 MB for a 2 GB-capacityserver, so that system resources get shared effectively among competingprocesses. However, when operating Transformer on HP-UX, we recommendthat you set this environment variable to unlimited, to provide thecube build process with as much physical memory as possible. (For otherUNIX platforms or Linux, consult your operating system documentation tolearn how you can best tune your kernel settings to allocate sufficientmemory for Transformer.)

Tip: Type the command ulimit -a todetermine the currently assigned values for Transformer. The time,file, and memory settings should show a value of unlimited.

----------------------------------------------------------------------
Recommendation - Optimize Gateway Settings for Series 7 IQDs 数据库连接优化
To further shorten the data read phase for Series 7 IQDs, you canchange the database-specific settings found in the gateway .ini filesincluded in the Transformer installation directory.

Search for afile name such as cogdm*.ini, where the asterisk represents a specificdatabase version. The entries in each gateway .ini file are different,depending on the database type.

Note: For Cognos 8 data sources, see the Cognos 8 Architecture and Deployment Guide.

Example - Change Oracle Database Settings
Oracleuses the cogdmor.ini gateway file for database-specific settings. Werecommend you consider adjusting the following settings:

Fetch Number of Rows
Increasingthe number of rows to fetch in each fetch operation can improveperformance on some systems. Although the current limit for this numberis 32767, numbers larger than the default (100) may degrade performanceon some systems.

Fetch Buffer Size
Increasing the size ofbuffer used during fetch operations from the default (2048 bytes) canimprove performance on some systems.

Where both entries have

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论1 条评论


2011-08-19 17:36
学习学习,好好学习,感谢感谢,好好感谢,呵呵
Ctrl+Enter 发表

作者其他文章

  • 和CognosChina一起成长
    评论 21 · 赞 1
  • Cognos报表工具
    评论 3 · 赞 1
  • Cognos V8.0的安装与配置
    评论 1 · 赞 0
  • Cognos 8.3 + DB2
    评论 0 · 赞 0
  • Cube性能优化、参数配置和更新
    评论 1 · 赞 1
  • 相关文章

    相关问题

    相关资料

    X社区推广