在db2forlinux,unix,andwindows中的行压缩的最佳实践
01 Netbackup 10 Server 准备作业环境

Netbackup Server 准备作业环境一. 基本信息说明Netbackup Primary Server(including Media Server)支持Linux、Unix、Windows 平台,本文档使用最佳实践推荐的Redhat 操作系统进行记录。
本台服务器作为Netbackup Primary Server和Netbackup Media Server一体。
重要信息如下:(1).磁盘空间要求Netbackup 软件在Linux平台默认安装路径为/usr/openv,在生产环境一般为该路径单独准备一个至少500GB的卷,NBU db会记录大量备份集信息,根据实际情况准备即可。
本环境为测试环境,只准备了60GB系统盘,和300GB数据磁盘。
(2).内存要求RAM准备8GB以上,本环境准备了8GB,生产环境根据官方文档推荐准备。
(3).网络要求网络单网卡,生产环境可自行设计。
(4).系统用户要求系统用户准备groupadd nbwebgrpuseradd -c 'NetBackup Services account' -d /usr/openv/ nbsvcuseradd -g nbwebgrp -c 'NetBackup Web Services account' -d /usr/openv/wmc nbwebsvcusermod -a -G nbwebgrp nbwebsvcusermod -a -G nbwebgrp nbsvc(5).其他组件(可选)Docker,用于Netbackup for vmware高级功能NFS 用于NBU MSDP 共享SAMBA 用于 NBU MSDP共享NGINX 用于NBU MSDP高级共享▲特别注意,Netbackup 10 web管理界面访问必需使用FQDN,需在DNS服务器加入相应解析或系统hosts文件添加解析。
招商银行Tivoli集中监控平台案例介绍

2、数据库管理:能及时迅速地反映各种类型数据库的可用性和性能情况,
深圳市希格玛计算机技术有限公司
第3页
案例简介--招商银行 Tivoli 集中监控平台
并给出详细预警处理,实时地监控到数据库的状况,并清晰地反映和数据库 相关业务故障的拓扑线路;
5 用户收益.....................................................................................................................................24 6 公司简介.....................................................................................................................................25
深圳市希格玛计算机技术有限公司
第6页
案例简介--招商银行 Tivoli 集中监控平台
4.1 资源监控
4.1.1 服务器监控
利用 ITM 对 Windows、UNIX、LINUX 服务器提供的全面监控管理功能, 实现了对服务器状态、性能和各类事件信息的集中监控。监控的资源主要包 括:
z UNIX 系统信息 包括虚拟空间利用率、页面读写错误情况、物理内存和虚拟内存使用情况、 CPU 利用率、平均负载情况; z 磁盘资源监控 包括前十名的空间利用率、节点(i-node)利用率、磁盘利用率、磁盘读写繁 忙程度等; z UNIX 进程状况 包括前十名最高的 CPU 利用率的进程、耗用内存最大的十个进程、进程利 用情况列表等; z 其它系统资源监控 包括磁盘性能、RPC 调用的性能情况、用户访问情况、服务器网络使用情 况、文件情况等
MSCSimManager新一代企业级仿真的管理平台

MSC SimManager 新一代企业级仿真管理平台虚拟产品开发(VPD)的概念及行业现状VPD(Virtual Product Developing)为虚拟产品开发的英文头三个字母的缩写,是MSC.Software公司针对机械制造行业在产品开发、产品制造、供应链管理、协同开发、市场竞争和用户要求等的综合作用及对制造企业提出的更迫切和苛刻的要求下,所提出的切实可行的解决方案。
虚拟产品开发从阶段上看分为概念设计(总体设计)阶段和详细设计阶段,无论是概念设计(或称为总体、系统级设计阶段)还是详细设计阶段均包括三个方面之内容:1.构型(Form)、2.虚拟装配、干涉检查和结构布局(Fit,又称为数字化虚拟样机,即DMU),和3.功能或性能样机(Function Prototyping)三部分,简称3F。
如图所示。
在上述三个方面的内容中,涉及众多CAX软件的使用。
目前国内外经多年对CAX等技术的广泛应用,取得了显著的效果,对进一步的发展方向亦达成了相对明确和一致的共识。
基本具有如下三个方面:●以PLM(产品生命周期管理)战略管理整个产品生命周期●对应用CAD的设计过程和数据的PDM管理系统已相对成熟●对单点的仿真分析技术的掌握已达到一定深度和成熟度虚拟产品开发仿真管理平台的提出随着物理样机成本的不断攀升、虚拟样机成本的不断下降,虚拟产品开发被制造业大量采用,设计过程对仿真的依赖程度越来越高,仿真分析的复杂程度和数量不断提高,制造业中分析工程师的人数也急剧增加。
以汽车工业为例,在上世纪末20年的时间里,通过采用碰撞仿真技术,汽车平台车型的开发,碰撞试验的次数由240多次下降到了80多次,大大加速了汽车开发的周期。
与此同时从事碰撞仿真的分析工程师人数量却急剧增加,今天,美国三大汽车公司中,每个公司每个工作日都有几十次甚至近百次的碰撞仿真计算,每个公司从事碰撞仿真工作的分析工程师人数达百人。
如此庞大的团队,如此复杂的分析工作,如果没有有效的仿真流程管理,很难保证每个人的分析方法和分析结果的一致性,计算结果也就很难被用来作为设计评价和改进的依据。
数据库技术的最佳实践和性能优化

数据库技术的最佳实践和性能优化随着互联网和大数据时代的到来,数据库已经成为了数据存储和管理的重要组成部分。
数据库技术也在不断的发展和进步,出现了越来越多先进的数据库技术,如NoSQL、分布式数据库等。
数据库的性能优化与最佳实践是数据库管理的重要领域,在本文中,我们将探讨如何实现数据库的最佳实践与性能优化。
1. 数据库的最佳实践数据库最佳实践的目标是将数据存储在数据库中,使其轻松可访问、安全可靠、且能够扩展。
下面是一些实现数据库最佳实践的方法:1.1. 数据库设计和规划在部署数据库之前,首先需要对数据库进行设计和规划。
数据库设计应注重以下方面:- 数据库模型:数据库模型应该与应用程序一起设计。
使用统一的模型,可以简化数据存储和数据访问的过程,提高数据的有效性和一致性。
- 数据库命名规则:采用规范命名规则,可以提高数据的可读性和维护性。
命名规则应体现数据的含义,同时也要简洁明了。
- 数据库索引:根据数据的查询需求,建立合适的数据库索引,可以提高数据的查询效率。
1.2. 数据库安全- 数据库与网络的安全:要确保数据库服务器和网络都是安全的。
数据库服务器应该安装在安全的物理环境中,网络应该采用安全协议来保护数据的传输。
- 数据库访问控制:要对数据库的访问进行控制,设置密码、访问权限等措施,以防止未经授权的数据访问。
1.3. 数据库备份和恢复为了保护数据不丢失,在正式的使用之前,应该定期备份数据库,并尽可能做好恢复准备工作,以防止数据的丢失。
2. 数据库的性能优化数据库性能优化的目标是提高数据库的查询效率和响应速度,以满足业务需求,并提高数据库的可扩展性,以适应业务的发展。
下面是一些实现数据库性能优化的方法:2.1. 优化数据库查询- 在查询中使用索引:索引是提高查询效率的关键。
应该根据业务需求,建立合适的索引,以满足业务的查询需求。
- 避免使用SELECT *语句:SELECT *语句会读取所有字段,造成数据库的性能浪费。
联想网御安全服务介绍精品文档

与客户沟通
人工审计实施
主机系 网络设 应用系 数据库 统审计 备审计 统审计 审计
NO
提交人工审计报告
客户确认
YES
人工审计结束
IDS/IPS威胁分析
IDS/IPS威胁分析是通过使用IDS/IPS收集网络中的数 据,并把收集到的数据进行分类,整理。然后分析这 些数据,从而发现企业面临的安全威胁,网络中存在 的安全事件和攻击行为
日趋增加的外部威胁
每天活跃的僵尸主机
平均每天活跃的僵尸主机数量达到了57,717台
攻击目标的国家分布
中国成为全球网络攻击第二大目标
传统安全服务体系的不足
管理 集成 产品
我国对信息安全的重视
GB/T 17859-1999《计算机信息系统安全保护等级划分准则 》 GB/T 19716-2005《信息技术 信息安全管理实用规则》 GB/T 19715.1-2005《信息技术 IT安全指南 第1部分:IT安全概念和模型》 GB/T 19715.2-2005《信息技术 IT安全指南 第2部分:管理和规划IT安全》 GB/Z 20283-2006《信息安全产品保护轮廓和安全目标产生规则》 ISO 27002-2007《信息技术 信息安全管理实践规则》 ISO/IEC TR 13335.1-5 《IT安全管理指南》 27号文明确提出国家信息安全按照等级化保护的制度推行 GB/T 16264.8-2005《信息技术 开放系统互连 目录 第8部分:公开密钥和属性证书框架》 GB/T 19771-2005《信息技术 安全技术 公钥基础设施 PKI组件最小互操作规范》 GB/T 19713-2005《信息技术 安全技术 公钥基础设施 在线证书状态协议》 GB/T 19714-2005《信息技术 安全技术 公钥基础设施 证书管理协议》 GB/T 20518-2006《信息技术 安全技术 公钥基础设施 数字证书格式》 GB/T 20008-2005《操作系统安全保护等级评估准则》 GB/T 20009-2005《数据库管理系统安全保护等级评估准则》 GB/T 20011-2005《路由器安全保护等级评估准则》 GB/T 20010-2005《包过滤防火墙安全保护等级评估准则》 GB/T 20277-2006《端设备隔离部件安全保护等级评估准则》 GB/T 20275-2006《入侵检测系统安全保护等级评估准则》 GB/T 20280-2006《网络脆弱性扫描产品安全保护等级评估准则》 GB/T 20282-2006《计算机信息系统安全等级保护工程管理要求》 GB/T 20269-2006《计算机信息系统安全等级保护管理要求 》 GB/T 50571-5006《计算机信息系统安全等级保护通用技术要求》 GB/T 50578-5006 《计算机信息系统安全等级保护网络脆弱性扫描产品技术要求》 四部委联合会签并下发了《关于开展全国重要信息系统安全等级保护定级工作的通知》(公信安[2007]861号)
KoolPoint产品介绍

主机 网络
虚拟化 存储
数据库 应用
巡检 告警
1 2
关于华胜天成 KoolPoint是什么 产品亮点 KoolPoint给客户带来的价值 成功案例
3
4 5
KoolPoint带来的价值
支持平台广泛: 产品管理价值: 体现IT部门为企业创 造的效益,形成成本 中心变利润中心的愿 景。
简单易用: 不需要专业人员提供 维护。
中间件
IBM MQ , Tuxedo , CICS ,TongLINK/Q
其它 IBM Directory Server,SUN JES Directory Server ,URL,Ports,Ping,DNS,FTP,NTP
存储架构 - 管理智能化
自动计算存储区域网的架构; 全景的了解存储架构的细微变 化 HP存储系统 IBM存储系统 SUN存储系统 EMC存储系统
上市时间:2004年 注册资金:50711万元 营业额:50亿元(2010年数据)
业务介绍 – 服务网络
中国第一家真正意义上服务网络覆盖整个 大中华和部分东南亚区域的IT服务提供商
服务网络覆盖: 北京、
上海、深圳、四川、 湖北、江苏、广东、 浙江、山东、陕西、
辽宁、福建、黑松江
、新疆、湖南等整个 大中华区,及美国、 东南亚、南亚(巴基斯 坦)等部分区域。
华为赛门铁克Oceanspace 系列
DDN S2A
昆腾磁带库
H3C Neocean 系列
博科存储交换机
NetApp系列
清华同方系列
同有系列
支持SNMP、SMI-S
虚拟化架构 - 虚拟环境的物理化呈现
虚拟化架构的智能化映射,直观 呈现虚拟化环境的状态。
数据恢复RStudio专题文章教程
详解使用R-Studio恢复数据之1:误分区后的恢复本文来源于《数据重现--文件系统原理精解与数据恢复最佳实践》R-Studio就是一款功能比较强大的数据恢复软件,它的特点有如下几点:1)支持FAT系列、NTFS系列、UFS系列、ExtX等文件系统。
2)参数设置非常灵活,使恢复人员可以根据不同的具体情况进行相应的设置,以最大可能地恢复数据。
3)支持远程恢复,可以通过网络恢复远程计算机中的数据。
4)支持分区丢失、格式化、误删除等情况下的数据恢复。
5)不只支持基本磁盘,还支持动态磁盘。
6)支持RAID恢复,可以恢复跨区卷、RAID0、RAID1及RAID5的数据。
R-Studio也可以象Winhex一样不依赖于磁盘主引导扇区的“55AA”有效签名标志对分区表进行识别并列举出各个分区。
前面介绍MHDD时曾经提到,当某个分区的引导扇区恰好处于坏道上,导致系统启动时因无法读取坏道上的信息而启动缓慢甚至无法进入系统时,可以使用MHDD提供的“Switchmbr”命令清除主引导记录扇区的“55AA”标志,使操作系统将磁盘视为未初始化而不再检索其分区表,从而可以顺利地进入操作系统。
然后,就可以利用R-Studio不依赖于“55AA”标志的特性恢复数据。
对于R-Studio的特性我们不再做更多的介绍,有兴趣的读者可以登陆[url][/url]网站查瞧R-Studio帮助文件的译文。
下面我们来使用它进行实际的恢复演示,读者对其有个基本的了解后,可以自行研究其强大的功能。
1.分区恢复R-Studio可以通过对整个磁盘的扫描,利用智能检索技术搜索到的数据来确定现存的与曾经存在过的分区以及它的文件系统格式。
下面,我们以一个20GB容量的磁盘演示分区恢复的过程。
首先在磁盘上建立三个分区,并向其中拷入数据。
运行R-Studio后,程序可以自动识别到硬盘,读取其分区表并列举出现存的分区。
如图10、62所示。
我们用做实验的磁盘型号为IC25N020CSH201D2GACA20,R-Studio可以自动识别这个型号。
ETL工具对比参考文档
E T L工具对比参考文档(总13页)-CAL-FENGHAI.-(YICAI)-Company One1-CAL-本页仅作为文档封面,使用请直接删除参考1:参考2:数据整合部分:PowerCenter,是业界公认领导者数据质量管理:Data Quality,成熟稳定技术,在中国有大规模应用的成功案例。
数据整合部分:Datastage,属于业界一类产品数据质量管理:QualityStage,收购的技术,不是主要其主要产实时数据捕获:PowerExchange,业界领先实时采集技术,支持广泛数据源的CDC和Realtime,与PowerCenter无缝集成。
元数据管理:Metadata Manager,是业界领先的企业级元数据管理平台,可做到字段级的元数据各项分析,有广泛的元数据采集接口,图形化无需编程,并可自动维护变更。
品组成实时数据捕获:MQ和DataMirror 的技术,技术复杂,与DataStage 是不同风格产品,产品的耦合度极差。
元数据管理:MetaStage,几乎免费的产品,应用性极差,并不能管理企业级的元数据。
而新推出的产品与旧有产品线耦合度差,并未经过市场的考验。
Informatica 是全图形化的开发模式,不需要编码,工具易使用,界面友好、直观。
专业的三天培训,可使开发人员快速入门,进行开发设计。
开发人员只要懂得数据库知识,即可。
Informatica 产品是以元数据为核心的,其开发过程中,所有的元数据,包括规则和过程,均是可复用,共享的。
经过简单配置即可支持大数据量的处理。
Informatica是完全基于引擎级别的,所有功能模块化,扩展性强,维护成本低。
虽然也是图形化的界面,但复杂的转换过程,里面嵌入了很多类Basic脚本的成份。
要求开发人员,有编程语言基础。
在处理大数据量,必须使用Datastage企业版。
但如果客户原先使用的Datastage 标准版,其作业的版本移植问题很大。
IBM DB2 for z OS 性能优化说明书
The future runs on System zRoger Miller, IBMFast track to optimal DB2 performanceDB2 for z/OS Selected Performance Topics •System z synergy●System performance tuning: what can beachieved across the subsystem●Database design changes that can makesignificant improvements●Application tuning: SQL, utilities, and otherareas●Sources and resources©2007 IBM Corporation 2©2007 IBM Corporation 3050010001500200025003000350040001997G41998G51999G62000z9002003z9902005z9 EC 2008z10 ECM H z300MHz 420 MHz 550MHz 770 MHz1.2GHz1.7GHz▪G4 -1st full-custom CMOS S/390®▪G5 -IEEE-standard BFP; branch target prediction ▪G6 –Copper Technology (Cu BEOL)▪z900 -Full 64-bit z/Architecture ®▪z990 -Superscalar CISC pipeline ▪z9 EC -System level scaling IBM z10 EC Continues the CMOS Mainframe Heritage4.4GHz▪z10 EC –Architecturalextensions3.5 GHz©2007 IBM Corporation4Portions of DB2 V8 and DB2 9 (blue)workloads may benefit from zIIP*:Data warehousing applications*: Large parallel SQL queriesDB2 9 higher percentage of parallel queries eligible for zIIPDB2 Utilities LOAD, REORG & REBUILD maintaining index structuresSorting for LOAD, REORG (on indexes), REBUILD, & RUNSTATSERP, CRM, Business Intelligence or other enterprise applications▪Via DRDA over a TCP/IP connection▪DB2 9 for z/OS Remote native SQL procedures▪DB2 9 XML parsingDB2 for z/OS & IBM zIIP valueSpecialtyEngine©2007 IBM Corporation5How much CPU gets redirected typically?1020304050607080DRDA LPAR Large parallelXMLDRDA eligible Utilities©2007 IBM Corporation6●Optimization of storage area network (SAN) traffic using zHPF to improveperformance, especially with FICON Express8 and SSD Maximum number of I/Os per second can be increased by up to 100%*For OLTP workloads (DB2, VSAM, PDSE, and zFS ) that transfer small blocks of fixed size data (4K blocks)z10 High Performance FICONfor System z (zHPF)FICON performance on System z –MBps throughput 170350520510740270050100150200250300350400450500550600650700750800850FICON Express 2 Gbps FICON Express22 Gbps FICONExpress44 Gbps I/O driver benchmark MegaBytes per second Full-duplex Large sequential read/write mix FICON Express44 Gbps z H P F z H P F FICON Express88 GbpsFICON Express88 Gbps zSeries z10z9z10z10z9z990z890z10zHPF -40% increase FICON Express8 vs FICON Express4FICON –45% increase FICON Express8 vs FICON Express4FICON performance on System z –start I/Os1200130001400031000200009200520000400080001200016000200002400028000320003600040000440004800052000FICON Express I/Os per second –I/O driver benchmark4k block size, channel 100% utilized FICON Express4and FICON Express2FICON Express4andFICON Express2zH PFFICONExpress8z H PFFICON Express8FICON Express4and FICON Express2z990z890z10z10z10z9z990z890z10zHPF -70% increase FICON Express8 vs FICON Express4FICON –40% increase FICON Express8 vs FICON Express4ESCON FICON Express8 operating at 8 Gbps may be able to:Provide performance improvements for online transaction processing (OLTP) workloads diverse business functions including order entry, inventory tracking, hotel reservations applications such as DB2, VSAM, PDSE, and zFSHelp reduce the duration of backup/copy operationsPerformance improvements with FICON Express8 may provide opportunities for consolidation or growth by reducing the number of I/O slots needed –you may be able to “do more with less”High Performance FICON and Solid State Disk more than doubles the random throughput per channel for the same amount of channel time.Channel consolidation -fewer channels can manage more storage capacity.Actual throughput depends on the percentage of I/Os eligible for zHPF. DB2 prefetch Improves SSD response time and throughput by 20%requires DS8000 Release 4.1, z10 processor and z/OS 1.10 or SPE SSD technology speeds up data access and removes bottlenecks imposed by spinning disks Other important performance features include MIDAW, HyperPAV, AMP, High Performance FICON linksOptimization of storage area network (SAN) traffic using zHPF Maximum number of I/Os per second can be increased by up to 100%*For OLTP workloads (DB2, VSAM, PDSE, and zFS size data (4K blocks) FICON Express4 and FICON Express2Requires Control unit exploitation –IBM DS8000z/OS V1.7 with the IBM Lifecycle Extension for z/OS V1.7 (5637-A01), V1.8, V1.9, or ftp:///common/ssi/sa/wh/n/zsw03059usen/ZSW03059USEN.PDF©2007 IBM Corporation7Solid state disk in storage pyramidDB2 Synch I/O Wait Time(Microseconds)22929073983838608000200040006000800010000zHPF c a c h e h i t C a c h e h i t S S D +z H P F S S DS h o r ts eekLongse ekSystem tuning▪New versions and service▪Parameter changes▪Buffer pools and other storage▪Use of zIIP and zAAP▪Thread reuse▪Enough performance monitoring,not too much©2007 IBM Corporation 8©2007 IBM Corporation9V8 best practice performance plan example scenario-2-11234567V7V8 CM V8 NFM V8 useCPUData sharing Better statistics DB design adjustmentsREBIND Cluster, indexPGFIX(YES) application changeszIIP multirow fetch & insertzparms SQL adjustmentsYour situation will vary. Less CPU is better.DB2 for z/OS V8 Performance Overview●Performance / Scalability EnhancementsImproved partitioning scale and flexibilityMany index improvements●Query / Access Path Performance Enhancements●Multirow fetch and insert●Synergy with new hardware: zIIP, MIDAW,DS8000, …©2007 IBM Corporation 10V8 queries and data warehousesOptimization Improvements❑Materialized Query Tables❑Improved optimization techniques❑Enhanced data for optimizer❑Visual Explain, Optimization Service CenterEnhanced index optionsNew Partitioning optionsQMF improvementsSQL enhancements, multirow fetch & insert©2007 IBM Corporation 11©2007 IBM Corporation12DB2 9 z10, z9, z890 & z990 performance plan example scenario-6-5-4-3-2-1V8V9 CM V9 NFM V9 UseCPUUtilities DB design adjustmentsHistogram statistics Index improvementsREBIND application changesDSNZPARMS native SQL proceduresSQL adjustmentsYour situation will vary. Less CPU is better.z800 and z900 expect +5% to +10% CPUDB2 9 for z/OS Performance Overview●Significant CPU time reduction in most utilities●Synergy with new hardware: zIIP, MIDAW, DS8000, …●Performance / Scalability EnhancementsEspecially Insert, Update & Delete●Query / Access Path Performance Enhancements●Other performance enhancements: LOBs, varchar,native SQL procedure, index compression●Improved virtual storage usage below 2GB DBM1©2007 IBM Corporation 13©2007 IBM Corporation14●Changed online REORG ●Improved RUNSTATS ●Optimization improvements, EDMPOOL VSCR ●More parallel, use of zIIP NFM ●LOB lock avoidance ●Reordered row format ●Index: larger page sizes,compression, index on expressionMost consumable DB2 9 improvements▪CM very little to no action:▪Utility CPU reductions▪Logging improvements▪Improved index page split▪Larger prefetch, write &preformat quantities▪LOB performance▪DDF VSCR▪Optimization ServiceCenter, Opt. Expert, &Data StudioDB2 9 Utilities Performance ImprovementsCPU reductions in LOAD, REORG, and REBUILD●Reductions mostly due to improved index processing (* withexceptions)●10 to 20% in Image Copy* (even with forced CHECKPAGE YES)● 5 to 30% in Load, Reorg, Reorg Partition, Rebuild IndexExcept REORG TABLESPACE SHR CHG PART with NPSIs●20 to 40% in Load●20 to 60% in Check Index●35% in Load Partition●30 to 40% in Runstats Index●40 to 50% in Reorg Index●Up to 70% in Load Replace Partition with dummy inputReduces redirect to zIIP©2007 IBM Corporation 15DB2 9 Query Enhancements●SQL enhancements: INTERSECT, EXCEPT, cultural sort,caseless comparisons, FETCH FIRST in fullselect,OLAP specifications: RANK, ROW_NUMBER, …●pureXML integration and text improvements●Index improvementsIndex on expression Larger index pagesIndex compression Improved page split●Improved optimization statistics: Histogram●Optimization techniques & REOPT(AUTO)Access paths more parallel, increased zIIPCross query block optimizationGeneralize sparse index & in-memory data cache methodDynamic Index ANDing for Star Schema●Analysis: instrumentation & Optimization Service Center©2007 IBM Corporation 16Database design tuning▪Index changes: many new options▪Ability to use index▪Clustering▪Compression▪Index on expression, XML, …▪Universal table space©2007 IBM Corporation 17Index: DB2 for z/OS V8Index Improvements–Variable length index keys–Index-only access for varchar data–Maximum index key 2000 bytes–Predicates indexable for unlike types–Backward Index Scan–Partitioning separate from clustering–Data-partitioned secondary indexes (DPSI)–Create index online during select, insert–Add column to index©2007 IBM Corporation 18©2007 IBM Corporation19Indexing Enhancements ●Larger index pages allow more efficient use of storageFewer page splits for long keys More key values per page●Index compression provides page-level compressionData is compressed to 4K pages on disk32K/16K/8K pages results in up to 8x/4x/2x disksavingsNo compression dictionaries▪Compression on the fly▪No LOAD or REORG required●Rebuild Index SHRLEVEL CHANGE●Index on expression●Define RANDOM index keys to avoid hot spotswith multiple processes inserting sequential keys4K8K16K32K©2007 IBM Corporation20Index CompressionDifference between data and index compression25 to 75% (3)10% to 90%Average Comp Ratio No (2)Yes Comp Dictionary NoYes Comp in Log NoYes Comp in Buffer Pool YesYes Comp on disk Page (1)Row Level IndexDataNOT LOGGED table spaces●Is actually NOT LOGGED tables spaces, tables, indexes, LOB, XML●ALTER / CREATE a TABLESPACE as NOT LOGGEDALTER not allowed if in same UOW with an update to the table space●Indexes, LOB, and XML inherit the logging attribute of the baseThese are considered “Linked”objects●Effects the UNDO / REDO recordsControl information is still logged●LOB continue to log system pages & auxiliary indexes●Unit of Recovery (UR) is still createdLOG YES is a synonym for LOGGEDLOG NO is a synonym for NOT LOGGEDRecommendation: Don’t sacrificerecovery for minor performance gain.©2007 IBM Corporation 21Application tuning▪Query tuning▪Dynamic to static SQL▪Multirow fetch & insert▪Stored procedures▪REORG Statistics REBIND▪Minimize processing needed©2007 IBM Corporation 22Query tuning improved in DB2 9▪Package BIND Stability▪Histogram Statistics▪Page Range Processing▪Global Query Optimization▪Generalized sparse index & in-memory data cache ▪Dynamic Index ANDing▪Indexing Enhancements▪Optim Query Tuner©2007 IBM Corporation 23Dynamic SQL←→Static SQL▪Reduce dynamic bind frequency via•Dynamic statement caching with CACHEDYNAMIC YES•REOPT(ONCE) in V8 REOPT(AUTO) in DB2 9•Improved monitoring in V8 Visual Explain•Next step in Optimization Service Center (DB2 9 and V8)▪Incremental bind in accounting•Static plan/package with VALIDATE(RUN) and bind timefailure•Static SQL with REOPT(ALWAYS), or referencingDeclared Temp Table, or private protocol in requestor©2007 IBM Corporation 24JDBC/SQLJ▪Use CACHEDYN YES for JDBC, or better yet use SQLJ orbest choice is pureQuery▪Select/Update/Insert required columns only•More important in JDBC/SQLJ environment▪Store numeric as smallint or int to minimize conversion and column processing cost•Relative cost: Integer (lowest) -> Float -> Char -> Decimal -> Date/Time -> Timestamp (highest)▪Match Java and DB2 data type•V8 enhancement for non-matching data type©2007 IBM Corporation 25Data Studio pureQuery Runtime for z/OS●In-house testing shows double-digit reduction in CPU costs over dynamic JDBC /story/showArticle.jhtml?articleID=208802229●IRWW –an OLTP workload, Type 2 driver (local call)●Cache hit ratio between 70 and 85%●42% reduction in CPU per transaction over dynamic JDBC©2007 IBM Corporation 26©2007 IBM Corporation2720 column 100000 row Fetch CPU Time %change in V8 acctg class1 cpu time vs V76-6-41-49-51-51-60-50-40-30-20-10010single row 2 rows 10 rows 100rows 1000rows 10000rowsNumber of rows fetched per call%Multi-row Fetch -continued▪FETCH NEXT ROWSET FROM cursor FOR N ROWS INTO hva1, hva2, hva3▪Up to 50% CPU time reduction by avoiding API (Application Programming Interface) overhead for each row fetch (100 rows)ƒ% improvement lower if more columns and/orfewer rows fetched per call–Higher improvement if accounting class 2 on,CICS without OTE, many rows, few columnsƒSee later foils for distributed©2007 IBM Corporation 28Minimize SQL Calls to Reduce API Overhead▪Filter out unnecessary rows by adding predicates rather than by application program checking▪Use DB2 column functions rather than applicationprogram code▪Example: find how many employees make more than$10,000/month1Select, fetching all 100000 employee rows2Select Where Salary>10000, fetching 1000 rows3Select Count Where ..., fetching 1 row100 times CPU time reduction possible from APIeliminationWatch out for VSAM programmers, IO modules (stage 3predicates)©2007 IBM Corporation 29©2007 IBM Corporation 30▪Avoid unnecessary columnsDoubled CPU time possible with 100 additionalcolumns/host variables▪Increasing order of costLocal EBCDIC least -> ASCII or UNICODE or DRDA-> Single byte conversion -> Double byte conversionInteger/char least and date/time/timestamp mostexpensiveMinimize Columns and Host VariablesReferenced in SQL CallsMinimize Predicates Evaluated▪Place most filtering predicates first in AND. (forpredicates of the same type)WHERE HOME_STATE=‘MONTANA'FF= 1% AND HAIR='BROWN'FF=10%AND SEX='MALE'FF=50% Weighted average of 1.01 predicates evaluatedIf sequence of predicates is reversed, then the weightedaverage is 1.55, or 50% more predicate evaluation, whichcan lead to up to 20% CPU increase.▪Conversely, place most filtering predicates last in OR andIN-list without ACCESSTYPE=N.eg STATE IN (‘NEW YORK’,’FLORIDA’,‘MONTANA’)©2007 IBM Corporation 31Minimize SQL Statements in a ProgramWhere PossibleDO ....SELECT or INSERT or DELETE or UPDATEENDinstead ofSELECT, INSERT, DELETE, or UPDATESELECT, INSERT, DELETE, or UPDATESELECT, INSERT, DELETE, or UPDATEReduces EDM pool and thread storageReduces allocate/deallocate cost at SQL execution and commit or deallocationBetter exploitation of sequential detection and index lookaside •Potentially fewer Getpages, Lock requests, and faster I/O•See Redpaper4424©2007 IBM Corporation 32LOB Improvements●Progressive Streaming for LOB Locator ValuesDB2 uses LOB size to determine whether to send LOB data to Java or DB2CLI clients in one go (<32KB), in chunks (<1MB) or as LOB locator (>=1MB)Transparent to application using LOB locators●FETCH CONTINUEAllows applications to retrieve LOB/XML data in pieces without the use oflocators●File reference variablesA file reference variable allows direct transfer of LOB data between DB2 andthe file named in the variable●Utility ChangesLOAD / Cross load LOB column lengths > 32KB supportedLogging for > 1GB LOBsREORG LOB reclaim spaceOnline CHECK LOB and DATA●Elimination of LOB locks for improved availability and performance©2007 IBM Corporation 33©2007 IBM Corporation34Which language should I use?Stored Procedures –relative cost of various languages withand without zIIP and zAAP for specific OLTP workload00.511.522.5COBOL C Remote SQLJ SQLJ JDBC External SQL NativeSQLtotal CPUstd. processorWhich language should I use? …Stored Procedures -Performance of different languages with and without zIIP and zAAP for specific OLTP workloadLanguage Base CPU GP CPU after zIIP and/orzAAP acceleration COBOL stored proc1X (BASE).88xC stored proc.95x.83xRemote SQLJ 1.78x 1.06xSQLJ stored proc 1.21x 1.15x (zIIP+ zAAP)JDBC stored proc 2.11x 1.76x (zIIP+ zAAP)External SQL stored proc 1.62x 1.49xNative SQL stored proc 1.14x.65x©2007 IBM Corporation 35DB2 X preliminary performance plan significant CPU reductions, best with latest processors8 use9 CM9 use X CM X useTransactions DB design adjustmentsBatch Hash accessREBIND application changesSQL adjustmentsYour situation will vary. Less CPU is better.Processors z10, z9, z890, z990 & later z/OS 1.10 & later©2007 IBM Corporation 36©2007 IBM Corporation3764 bit Evolution (Virtual Storage Relief)EDMPOOL DBD Pool Global Stmt Pool 2GB Skeleton Pool Working memory ●DB2 9 helps (10% –15%)●DB2 X expects to move 80% -90%+More concurrent work Reduce need to monitor Able to consolidate LPARs Reduced cost Easier to manage Easier to grow Virtual storage constraint is still an importantissue for many DB2 customers.EDMPOOLDBD PoolGlobal Stmt PoolWorking memory2GB Skeleton PoolEDMPOOLWorking memoryEDMPOOLPerformance Sources andResourcesR T F W©2007 IBM Corporation 38Get updated books late June 2009/infocenter/imzic/✓Performance Guide✓Redbooks✓Administration Guide✓Data Sharing: Planning and Administration✓Utility Guide and Reference✓Installation Guide©2007 IBM Corporation 39DB2 9 in IBM Red books Publications1.DB2 9 Technical Overview SG24-73302.DB2 9 Performance Topics SG24-74733.DB2 9 Stored Procedures SG24-76044.Index Compression with DB2 9 for z/OS redp43455.SQL Reference for Cross-Platform Development6.Enterprise Database Warehouse, SG24-76377.50 TB Data Warehouse on System z, SG24-76748.DB2 9 Optimization Service Center SG24-74219.LOBs with DB2 for z/OS SG24-727010.Deploying SOA Solutions SG24-766311.Enhancing SAP -DB2 9 SG24-723912.SAP Application on Linux z SG24-684713.Best practices SAP BI -DB2 9 SG24-6489-0114.Data Sharing in a Nutshell, SG24-732215.Securing DB2 & MLS z/OS SG24-6480-0116.Data Sharing: Distributed Load Balancing & Fault TolerantConfiguration redp444917.Considerations on Small & Large Packages redp442418.Backup and Recovery Considerations redp445219.Powering SOA with IBM Data Servers SG24-725920.Packages Revisited, SG24-768821.Data Studio V2.1 Web Services redp451022.Ready to Access Solid-State Drives redp453723.Distributed Architecture, SG24-6952©2007 IBM Corporation 40©2007 IBM Corporation41Installable option/support/docview.wss?rs=865&uid=pub1sk5t737700/infocenter/imzic/This is the Information Center, with a wide spectrum ofinformation and access to books for DB2 for z/OS, DB2 tools,QMF, IMS, IMS tools and more. You can get to this page fromthe Library page, by clicking Information Center. TheInformation Center provides information across the books andacross multiple products.If you click “Troubleshooting and Support”, then expand under“Searching knowledge base”and click “Web search:…”, you’llfind a helpful Web search page. From this page, you can©2007 IBM Corporation42Main DB2 for z/OS Web Page/software/db2zos•Library(books)•Events•Education•Services•Support•V8, DB2 9•Developer Domain•DB2Magazine•z9 zIIP•ToolsThis is the main DB2 for z/OS web page. You can get to the otherDB2 for z/OS pages from here, so I often call this my home page.Important DisclaimerTHE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY.WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.IN ADDITION, THIS INFORMATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM WITHOUT NOTICE.IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION.NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF:•CREATING ANY WARRANTY OR REPRESENTATION FROM IBM(OR ITS AFFILIATES OR ITS OR THEIR SUPPLIERS AND/ORLICENSORS); OR•ALTERING THE TERMS AND CONDITIONS OF THE APPLICABLELICENSE AGREEMENT GOVERNING THE USE OF IBMSOFTWARE.©2007 IBM Corporation 43。
dots在线压缩算法
认识压缩算法我们想必都有过压缩和解压缩文件的经历,当文件太大时,我们会使用文件压缩来降低文件的占用空间。
比如微信上传文件的限制是100 MB,我这里有个文件夹无法上传,但是我解压完成后的文件一定会小于100 MB,那么我的文件就可以上传了。
此外,我们把相机拍完的照片保存到计算机上的时候,也会使用压缩算法进行文件压缩,文件压缩的格式一般是JPEG。
那么什么是压缩算法呢?压缩算法又是怎么定义的呢?在认识算法之前我们需要先了解一下文件是如何存储的文件存储文件是将数据存储在磁盘等存储媒介的一种形式。
程序文件中最基本的存储数据单位是字节。
文件的大小不管是xxxKB、xxxMB等来表示,就是因为文件是以字节B = Byte 为单位来存储的。
文件就是字节数据的集合。
用1 字节(8 位)表示的字节数据有256 种,用二进制表示的话就是0000 0000 - 1111 1111 。
如果文件中存储的数据是文字,那么该文件就是文本文件。
如果是图形,那么该文件就是图像文件。
在任何情况下,文件中的字节数都是连续存储的。
压缩算法的定义上面介绍了文件的集合体其实就是一堆字节数据的集合,那么我们就可以来给压缩算法下一个定义。
压缩算法(compaction algorithm)指的就是数据压缩的算法,主要包括压缩和还原(解压缩)的两个步骤。
其实就是在不改变原有文件属性的前提下,降低文件字节空间和占用空间的一种算法。
根据压缩算法的定义,我们可将其分成不同的类型:有损和无损无损压缩:能够无失真地从压缩后的数据重构,准确地还原原始数据。
可用于对数据的准确性要求严格的场合,如可执行文件和普通文件的压缩、磁盘的压缩,也可用于多媒体数据的压缩。
该方法的压缩比较小。
如差分编码、RLE、Huffman编码、LZW编码、算术编码。
有损压缩:有失真,不能完全准确地恢复原始数据,重构的数据只是原始数据的一个近似。
可用于对数据的准确性要求不高的场合,如多媒体数据的压缩。