Sei sulla pagina 1di 37

This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings

Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Cognos 8
Architecture and Tuning
Pascal Mouchakkaa
Cognos NA Services Domain Manager
Darek Danielewski
BrightStar Partners
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Copyright (C) 2006 Cognos Incorporated
While every attempt has been made to ensure that the information in this document
is accurate and complete, some typographical errors or technical inaccuracies
may exist. Cognos does not accept responsibility for any kind of loss resulting
from the use of information contained in this document.
This document shows the publication date. The information contained in this
document is subject to change without notice. Any improvements or changes to
either the product or the document will be documented in subsequent editions.
U.S. Government Restricted Rights. The software and accompanying materials are
provided with Restricted Rights. Use, duplication, or disclosure by the
Government is subject to the restrictions in subparagraph (C)(1)(ii) of the Rights
in Technical Data and Computer Software clause at DFARS 252.227-7013, or
subparagraphs (C) (1) and (2) of the Commercial Computer Software - Restricted
Rights at 48CFR52.227-19, as applicable. The Contractor is Cognos Corporation,
67 South Bedford Street, Burlington, MA 01803-5164.
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
This software/documentation contains proprietary information of Cognos
Incorporated. All rights are reserved. Reverse engineering of this
software is prohibited. No part of this software/documentation may be
copied, photocopied, reproduced, stored in a retrieval system,
transmitted in any form or by any means, or translated into another
language without the prior written consent of Cognos Incorporated.
Cognos, the Cognos logo, Cognos 8, Cognos ReportNet, Axiant,
COGNOSuite, Cognos Upfront, Cognos DecisionStream, Impromptu,
NoticeCast, PowerCube, PowerHouse, PowerPlay, Scenario, and
4Thought are trademarks or registered trademarks of Cognos
Incorporated in the United States and/or other countries. All other
names are trademarks or registered trademarks of their respective
companies.
Information about Cognos Products and Accessibility can be found at
www.cognos.com
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Agenda
Architecture Overview
C8 Components Architecture
Tier Architecture
Request Flow
Logging and 3
rd
Party Monitoring Solutions
Proven Practices for Tuning
Server
JVM Heap and Garbage Collection
Thread and Queue
System/Server
Web Server
Data Base
Report/Model
Local Processing
Metadata Caching and Callbacks
Minimized SQL
Parameter Maps
Prompting
Q&A
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Cognos 8 System Architecture
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Web Tier Components
Gateway shuttles requests for Cognos 8 services to and
from dispatcher and relays results to Browser
CGI, ISAPI, Apache Mod, Servlets for iPlanet/Sun One
Avoid CGI unless only supported gateway for Web server
Supports standard TCP/IP sockets or SSL
Single sign-on and SSL
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Application Tier Components
Multi-threaded, distributable components
Multi-platform
Multi Application server
Responsible for dynamically loading services and handlers
Routes requests to Content Manager, Reporting Service,
Audit and Presentation/Notification Service
Registers itself in Content Manager at startup, identifies
services it provides
Load balance and fail over
No single point of failure, no single master node
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Content Manager (Application Tier)
Centralizes report and configuration information
Content Store
All definitions, output, content folders, metadata
Results stored in compressed form
Standby capability
Leverages existing RDBMS investment
Oracle and Oracle RAC, DB2, Microsoft SQL Server Windows and SQL
authentication, and Sybase
RDBMS responsible for backup/recovery and tolerance
Connects to RDBMS using JDBC thin client
Responds to requests from Dispatcher services
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
C8 Request Flow in Distributed Environment
How do I know where my
request will end up?
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Log View Tool
Built in tool to assist in Log analysis.
Can filter out Cognos 8 errors or focus on component
messaging.
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
3
rd
Party Solutions for Monitoring Production
Environment Performance
Teleran Technologies
i-Guard is a solution to prevent problematic queries, i.e. in ad-hoc
environment
i-Sight is a solution to analyze queries and data access
BI Application Extensions allow collecting Cognos-specific metrics,
SQL and performance information
AppFluent Technology
Query Performance is a solution to analyze queries and data access
Query Testing is a solution to identify broken queries
Compliance Audit is a solution to log users accessing specific data
Both solutions only support relational data sources
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Agenda
Architecture Overview
C8 Components Architecture
Tier Architecture
Request Flow
Logging and 3
rd
Party Monitoring Solutions
Proven Practices for Tuning
Server
JVM Heap and Garbage Collection
Thread and Queue
System/Server
Web Server
Data Base
Report/Model
Local Processing
Metadata Caching and Callbacks
Minimized SQL
Parameter Maps
Prompting
Q&A
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
JVM and Garbage Collection
Java Heap will allocate memory required to run and clear
Container
The larger the heap the longer it takes to clear memory
(Garbage Collection)
JRE and version determines method of collection at runtime
Recommended Proven Practices are to set heap no larger
than 1024MB
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
JVM Multiple Instance
Due to OS Stack memory constraints of 2048MB per running
process.
With systems that have large physical memory cache.
Requires multiple installation of components or clustering
capability.
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Thread and Queue Tomcat
Limits all Thread execution within JVM Container.
Tomcat predefined is set to 500 in server.xml.
Accept Queue limits amount of threads to queue
Tomcat predefined is set to 500 in server.xml.
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
System Tuning
Report Service (interactive usage)
Maximum processes: 2 per processor
High affinity connections: 1 per process
Low affinity connections: 4 per process
No more than 5 per process
Batch Report Service (non-interactive usage)
Same guidelines as above
Remember to set Peak Periods
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Thread and Queue Web Sphere
Thread allocation
Change Max size to 2.5 threads * # of concurrent users
Check Is Growable
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Server Tuning
Unix: HP, AIX, Solaris, and Linux
Cognos 8 patch set following Cognos recommended CONFORMANCE
Permissions
Disk Space
Kernel Parameters and Environment variables
Windows: Registry entries for OS heap size and high load capacity
under HKEY_LOCAL_MACHINE
SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TCPTimedWaitDelay
=30s (default 240s)
SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\MaxUserPort=10000
or higher (default = 5000)
SYSTEM\CurrentControlSet\Control\SessionManager\SubSystem\Windows
shared section set to 1024 to 3072 in KB (default = 512)
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Web Server
IIS 5/6 compression.
Use Performance Monitor Tools. If % of Processor Time is greater
than 80% consistently, Dont compress, upgrade Server
HTTP Compression can reduce Web Server file size traffic 30-50%.
Increase download time.
HTTP Compression requires additional Hard Drive Space and CPU
Cycles
Apache tuning is subject to OS and compile method.
Windows default is worker threads
Unix default is prefork
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Data Base
Changes to the CogdmXX.ini must be tested on reasonable volumes of
data and the execution plan examined before and after any changes to
ensure that the changes will improve performance rather than harm it.
Oracle Changes for example:
Oracle Case vs. Decode. Using DECODE may improve performance.
Change case_to_decode in Cogdmor.ini to T
Removing an Oracle sub query to a nested inner-join may improve
performance. Change the NESTED_INNER to T in the Cogdmor.ini and
modify the processing location to Database only.
Use Oracle optimization techniques for join strategies. Oracle Optimizer will
still join one at a time. List joins in proper order. Smallest table first.
Calculate and validate statistics on data changes.
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Agenda
Architecture Overview
C8 Components Architecture
Tier Architecture
Request Flow
Logging and 3
rd
Party Monitoring Solutions
Proven Practices for Tuning
Server
JVM Heap and Garbage Collection
Thread and Queue
System/Server
Web Server
Data Base
Report/Model
Local Processing
Metadata Caching and Callbacks
Minimized SQL
Parameter Maps
Prompting
Q&A
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Identify Local Processing
Is local processing required?
Set processing to Database Only and test query
What is being processed locally and what is processed on
the database?
Compare Cognos SQL to Native SQL in Report Studio or FM
How much data is brought to process in the app tier?
Monitor the C8 temp directory when running reports
Watch for files with uda prefix these are temp. files
Everything above 8Mb (UDA temp memory buffer) is written to a
temp file
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Example UDA Temp Files
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Heterogeneous Query
Two or more data sources (not just catalogs) joined in FM model
Introduces local processing compare Cognos SQL to Native
Cognos
select SALES_BRANCH.ADDRESS1 as Address, SALES_BRANCH.CITY as City,
SALES_BRANCH.REGION as Region, COUNTRY.COUNTRY_EN as
Country_Name from gosales.GOSL_C8.dbo.SALES_BRANCH SALES_BRANCH
join goretailers.gort.dbo.COUNTRY COUNTRY on (COUNTRY.COUNTRY_CODE =
SALES_BRANCH.COUNTRY_CODE)
Native
select "SALES_BRANCH"."ADDRESS1", "SALES_BRANCH"."CITY",
"SALES_BRANCH"."REGION", "SALES_BRANCH"."COUNTRY_CODE" from
"GOSL_C8"."dbo"."SALES_BRANCH" "SALES_BRANCH" order by 4 asc select
"COUNTRY"."COUNTRY_EN", "COUNTRY"."COUNTRY_CODE" from
"gort"."dbo"."COUNTRY" "COUNTRY" order by 2 asc
Full data sets retrieved on both sides, then joined locally
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Avoiding Heterogeneous Query
Same database but different catalogs - reuse the same CM
connection name to avoid local processing
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Avoiding Heterogeneous Query Contd.
Cognos SQL
select SALES_BRANCH.ADDRESS1 as Address, SALES_BRANCH.CITY as
City, SALES_BRANCH.REGION as Region, COUNTRY.COUNTRY_EN as
Country_Name from gosales.GOSL_C8.dbo.SALES_BRANCH
SALES_BRANCH join gosales.GORT_C8.dbo.COUNTRY COUNTRY on
(COUNTRY.COUNTRY_CODE = SALES_BRANCH.COUNTRY_CODE)
Native SQL
select "SALES_BRANCH"."ADDRESS1" AS "Address",
"SALES_BRANCH"."CITY" AS "City", "SALES_BRANCH"."REGION" AS
"Region", "COUNTRY"."COUNTRY_EN" AS "Country_Name" from
"GOSL_C8"."dbo"."SALES_BRANCH" "SALES_BRANCH" INNER JOIN
"GORT_C8"."dbo"."COUNTRY" "COUNTRY" on
"COUNTRY"."COUNTRY_CODE" = "SALES_BRANCH"."COUNTRY_CODE
Native SQL now contains only one Select statement
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Metadata Caching
Stores information on data items and query subjects in the
model.
In most cases information captured by metadata import,
cached with FM model and reused at run-time
Eliminates the need to lookup information from the
database
Allows for faster preparation and validation of query SQL
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Metadata Callbacks When Running Reports
Report Studio Validate with Options / FM Query Information
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
RS Validation Output
Shared Dimensions listed for a multi-fact queries
QE-DEF-0469 QE Message RQP-DEF-0433 Shared Dimensions:
[Product dimension].[Product line]
[Product dimension].[Product type]
[Product dimension].[Product dimension]
Metadata Queries listed for specific tables
QE-DEF-0469 QE Message RQP-DEF-0543
Metadata will be retrieved from the database, because a
simple DB query subject definition with matching
metadata does not exist. database='go_data_warehouse'
catalog='GOSLDW' schema='dbo' table='PRODUCT_LINE
Cognos and Native SQL included
Review Output File (validation messages.xml)
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Metadata Callbacks
When does C8 have to retrieve metadata at run-time?
Changes to imported data source query subjects:
More than one table in the query
More than one select statement
Embedded filters
Embedded calculations
Prompts and parameter maps
Hand-written SQL
Enhanced Model Portability option forces metadata callbacks
What can you do to reduce metadata callbacks?
Create a new namespace and import all tables as is
In FM, evaluate and update query subjects in question
Disable the enhanced portability governor
Reference model objects in model query subjects
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Minimized SQL
C8 will attempt to minimize SQL it sends to RDBMS
Makes it easier to leverage aggregated views (i.e. MV)
Example 1:
SELECT ColumnA, SUM(ColumnB)
FROM TableA
GROUP BY ColumnA
Example 2:
SELECT ColumnA, MIN(ColumnC), SUM(ColumnB)
FROM TableA
GROUP BY ColumnA, ColumnC
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Minimized SQL Database Optimizers
Original Statement
SELECT T1.ColumnA, T1.ColumnB
FROM (
SELECT ColumnA ColumnA,
MIN(ColumnC) ColumnC,
SUM(ColumnB) ColumnB
FROM TableA
GROUP BY ColumnA) T1
Functionally Equivalent
SELECT ColumnA, SUM(ColumnB)
FROM TableA
GROUP BY ColumnA
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
When C8 Minimizes SQL?
Minimized by definition
Data source query subject are the lowest level SQL building blocks
Eligible for Minimization
Model query subjects with no relationships or determinants
Model regular and measure dimensions
Not Eligible for Minimization
Model query subjects with relationships and/or determinants
Hand-written SQL will not be minimized
Embedded prompts are evaluated at run-time and not minimized
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Parameter Maps
Allow incorporating session information, user locale and
prompt selections logic to augment model behavior
When using parameter maps be aware that:
Parameter map entries are strings rather then object references
Cannot validate all parameter map entries with a single test
Very large, nested parameter maps need to be parsed at runtime and
increase SQL prepare cost
Using parameter maps prevents SQL minimization and metadata
caching
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Parameter Maps Proven Practices
Leave data source query subjects unmodified whenever
possible
Build model calculations and filters on data source query
subjects (not embedded)
Embed model calculations and filters in model query
subjects and/or dimensions
Avoid large, nested parameter maps whenever possible
Evaluate whether a prompt or parameter map is appropriate
in the model rather than in a report design technique
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Prompt Performance General Considerations
Look at the overall report spec, not just the prompt
Report spec needs to be parsed, SQL generated in order to determine what
prompts to present to the user
Do you have too many queries on a prompt page?
Split prompts across multiple pages
How much data do your prompt queries return?
Cost of sending thousands of rows to the browser and rendering is often
overlooked
Can a user skip optional prompts?
Position optional prompts towards the end of the wizard, so users have an
option to hit Finish and go directly to the report
Do you have too many prompts?
Case I came across included drill-through report designed to handle any
possible context in a cube
This presentation was given at the September 2006 Chicago and Milwaukee Cognos User Group meetings
Copyright (C) 2006 Cognos, Inc Copyright (C) 2006 BrightStar Partners, Inc
Questions?
Thank you for your
attention!

Potrebbero piacerti anche