This document discusses strategies for monitoring and improving the performance of SQL Server Analysis Services (SSAS) cubes. It recommends monitoring performance counters, dynamic management views, execution logs, and profiler traces to identify bottlenecks. Some quick solutions include warming the cache by running top queries, while more complex issues may require tuning aggregations, partitions, or MDX queries. The document provides demos of monitoring tools and techniques for analyzing processing logs to further optimize cube performance.
3. Take Aways There are many white papers about the subject, tools and reports. 20-80 law. In this session I’ll focus on the easy-to-implement solutions. Solving 80% of your problems in 20% of the time. In my blog you can find links to all the relevant info.
4. Performance Enhancement - Methodology Monitor the server Performance Counters Dynamic Management Views Profiler Trace Files Execution Log Analyze Bottlenecks Formula Engine vs. Storage Engine CPU IO Memory Improve Queries Response Time Minimize Processing Time Frame
6. Formula Engine vs. Storage Engine Storage Engine Formula Engine Do I need more memory, better storage or more CPU?
7. Performance Counters Quick Performance Overview Use SCOM, SQL Server Data Collectors, free built in PerfMon or 3rd party tools Full list of recommended counters can be found in my blog
8. Dynamic Management Views More detailed analysis Schema related views and current status related views Use SSIS package to save DMV results to tables for further analysis
13. Demo – OLAPQueryLog Configuring OlapQueryLog Analyze the data in the table using reports
14. Profiler Used for deep and thorough performance analysis Use carefully, the trace might affect performance More information at the White Paper: Analyzing MDX Performance Bottlenecks
19. Cache Warmer Another simple no-brainer solution Monitor the top queries using Profiler Run the top queries using SSIS Or, use CREATE CACHE command
20. How Analysis Services answers queries MDX Query In Cellset Out Formula Engine works out what data is needed for each query, and requests it from the Storage Engine Cache Query Subcube Requests Storage Engine handles retrieval of raw data from disk, and any aggregation required Cache Disk
21. Warming the SE cache Considerations for warming the SE cache: We want to avoid cache fragmentation, for example having one unfiltered subcube cached rather than multiple filtered subcubes It is possible to overfill the cache – the SE will stop looking in the cache after it has searched 1000 subcubes We want to cache lower rather than higher granularities, since the latter can be aggregated from the former in memory We need a way of working out which granularities are useful
22. Warming the SE cache We can warm the SE cache by using either: WITH CACHE, to warm the cache for a single query – not very useful The CREATE CACHE command Remember that building aggregations is often a better alternative to warming the SE cache But in some cases you can’t build aggregations – for example when there are many-to-many relationships
23. CREATE CACHE Example CREATE CACHE statement:CREATE CACHE FOR [Adventure Works] AS'({[Measures].[Internet Sales Amount]},{[Date].[Date].[Date].MEMBERS},{[Product].[Category].[Category].MEMBERS})'
24. Which subcubes should I cache? The Query Subcube and Query Subcube Verbose events in Profiler show the subcubes requested from the SE by the FE This is also the information stored in the SSAS query log, stored in SQL Server
25. Warming the FE cache First, tune your calculations! The only way to warm the FE cache is to run MDX queries containing calculations Remember, these queries must not: Include a WITH clause Subselects Also, no point trying to cache calculations whose values cannot be cached And think about how security can impact cache usage
28. Common Cube Design Mistakes The number of cubes and dimensions Dimensions with few attributes and no hierarchies Wide cubes (“gray” Dimension Usage) Attribute Relationships Should be aligned with the hierarchies
29. Common Cube Design Mistakes Poor aggregation design Aggregation Usage Wizard Bad partition design White paper: Distinct Count Optimization Partition size between 2M and 20M records
31. Demo – Cube Design AMO Warnings Attribute Relationships About Aggregations Usage Based Wizard
32. Common Cube Design Mistakes Poor aggregation design Aggregation Usage Wizard Sub optimal MDX Bad partition design White paper: Distinct Count Optimization Partition size between 2M and 20M records
36. Processing Methods Analysis Services Processing Best Practices Measures Groups and Partitions vs. Dimensions Large dimensions can not be partitioned Dimension: Full Process Update Process Add Flexible vs. Rigid Aggs.
38. Processing Log Analysis How much time does it take to: Process each dimension Process each partition Process the aggregation of each partition Use SSIS to process the cube. Use SQL Log provider to save the Process Log. Sample Reports in my blog
41. Call For Action Read the performance guides and white papers Monitor the SSAS server Implement the quick no-brainer solutions Call an expert to solve the big problems
42. Monitor the SSAS Server to identify performance Bottlenecks Partitioning is the key to fast processing Improving the queries is more complicated.
Editor's Notes
This Section : 00:02; From Start 00:02
00:03; From Start 00:05
DMV – Inserting DMV to Tables
Demo – Execution Log Reports; ProfilerMDX Studio
Demo – Execution Log Reports; ProfilerMDX Studio
Create Cache
Attribute Relationships
Attribute RelationshipsAggregation Design
Attribute RelationshipsAggregation Design
Query Execution PlanProcessing LogThe Impact of Aggregations.