Extreme SSAS - Part II


Published on

Part two out of three

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • 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.
  • Extreme SSAS - Part II

    1. 1. Extreme SSAS – Part II<br />Itay Braun | CTO | Twingo<br />
    2. 2. Methodology<br />Monitoring<br />Enhancing Queries Performance<br />Enhancing Processing <br />Performance<br />
    3. 3. Take Aways<br />There are many white papers about the subject, tools and reports.<br />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.<br />In my blog you can find links to all the relevant info.<br />
    4. 4. Performance Enhancement - Methodology<br />Monitor the server<br />Performance Counters<br />Dynamic Management Views<br />Profiler Trace Files<br />Execution Log<br />Analyze Bottlenecks<br />Formula Engine vs. Storage Engine<br />CPU<br />IO<br />Memory<br />Improve Queries Response Time<br />Minimize Processing Time Frame<br />
    5. 5. Methodology<br />Monitoring<br />Enhancing Queries Performance<br />Enhancing Processing <br />Performance<br />
    6. 6. Formula Engine vs. Storage Engine<br />Storage Engine<br />Formula Engine<br />Do I need more memory, better storage or more CPU?<br />
    7. 7. Performance Counters<br />Quick Performance Overview<br />Use SCOM, SQL Server Data Collectors, free built in PerfMon or 3rd party tools<br />Full list of recommended counters can be found in my blog<br />
    8. 8. Dynamic Management Views<br />More detailed analysis<br />Schema related views and current status related views<br />Use SSIS package to save DMV results to tables for further analysis<br />
    9. 9. Demo <br />
    10. 10. Demo - DMV<br />Using Dynamic Management Views<br />
    11. 11. Execution Log<br />Built-in table used for<br />General Statistics<br />Usage Based Aggregation Design <br />Sample reports can be found in my blog<br />
    12. 12. Demo<br />
    13. 13. Demo – OLAPQueryLog<br />Configuring OlapQueryLog<br />Analyze the data in the table using reports<br />
    14. 14. Profiler<br />Used for deep and thorough performance analysis<br />Use carefully, the trace might affect performance<br />More information at the White Paper: Analyzing MDX Performance Bottlenecks<br />
    15. 15. Demo<br />
    16. 16. Demo - Profiler<br />Monitoring Queries on cold vs. warm cache.<br />
    17. 17. MDX Studio<br />Used to deeply analyze MDX Queries.<br />Compares behavior on cold vs. warm cache.<br />Shows used partitions<br />
    18. 18. Methodology<br />Monitoring<br />Enhancing Queries Performance<br />Enhancing Processing <br />Performance<br />
    19. 19. Cache Warmer<br />Another simple no-brainer solution<br />Monitor the top queries using Profiler<br />Run the top queries using SSIS<br />Or, use CREATE CACHE command<br />
    20. 20. How Analysis Services answers queries<br />MDX Query In<br />Cellset Out<br />Formula Engine<br />works out what data is<br />needed for each query,<br />and requests it from the<br />Storage Engine<br />Cache<br />Query Subcube Requests<br />Storage Engine<br />handles retrieval of raw data from disk, and any aggregation required<br />Cache<br />Disk<br />
    21. 21. Warming the SE cache<br />Considerations for warming the SE cache:<br />We want to avoid cache fragmentation, for example having one unfiltered subcube cached rather than multiple filtered subcubes<br />It is possible to overfill the cache – the SE will stop looking in the cache after it has searched 1000 subcubes<br />We want to cache lower rather than higher granularities, since the latter can be aggregated from the former in memory<br />We need a way of working out which granularities are useful<br />
    22. 22. Warming the SE cache<br />We can warm the SE cache by using either:<br />WITH CACHE, to warm the cache for a single query – not very useful<br />The CREATE CACHE command<br />Remember that building aggregations is often a better alternative to warming the SE cache<br />But in some cases you can’t build aggregations – for example when there are many-to-many relationships<br />
    23. 23. CREATE CACHE<br />Example CREATE CACHE statement:CREATE CACHE FOR [Adventure Works] AS'({[Measures].[Internet Sales Amount]},{[Date].[Date].[Date].MEMBERS},{[Product].[Category].[Category].MEMBERS})'<br />
    24. 24. Which subcubes should I cache?<br />The Query Subcube and Query Subcube Verbose events in Profiler show the subcubes requested from the SE by the FE<br />This is also the information stored in the SSAS query log, stored in SQL Server<br />
    25. 25. Warming the FE cache <br />First, tune your calculations! <br />The only way to warm the FE cache is to run MDX queries containing calculations<br />Remember, these queries must not:<br />Include a WITH clause<br />Subselects<br />Also, no point trying to cache calculations whose values cannot be cached<br />And think about how security can impact cache usage<br />
    26. 26. Demo<br />
    27. 27. Demo - Cache Warmer<br />Using Create Cache Command<br />
    28. 28. Common Cube Design Mistakes<br />The number of cubes and dimensions<br />Dimensions with few attributes and no hierarchies<br />Wide cubes (“gray” Dimension Usage)<br />Attribute Relationships<br />Should be aligned with the hierarchies<br />
    29. 29. Common Cube Design Mistakes<br />Poor aggregation design <br />Aggregation Usage Wizard<br />Bad partition design <br />White paper: Distinct Count Optimization<br />Partition size between 2M and 20M records<br />
    30. 30. Demo<br />
    31. 31. Demo – Cube Design<br />AMO Warnings<br />Attribute Relationships<br />About Aggregations<br />Usage Based Wizard<br />
    32. 32. Common Cube Design Mistakes<br />Poor aggregation design <br />Aggregation Usage Wizard<br />Sub optimal MDX <br />Bad partition design <br />White paper: Distinct Count Optimization<br />Partition size between 2M and 20M records<br />
    33. 33. Methodology<br />Monitoring<br />Enhancing Queries Performance<br />Enhancing Processing <br />Performance<br />
    34. 34. Enhancing Source Query<br />Analyze the time needed to bring the data vs. building the partitions and aggregations<br />Analyze the Execution Plan<br />
    35. 35. Processing Methods<br />
    36. 36. Processing Methods<br />Analysis Services Processing Best Practices <br />Measures Groups and Partitions vs. Dimensions<br />Large dimensions can not be partitioned<br />Dimension: <br />Full <br />Process Update<br />Process Add<br />Flexible vs. Rigid Aggs.<br />
    37. 37. Processing Methods<br />Cube Processing: Full vs. Data + Index<br />
    38. 38. Processing Log Analysis<br />How much time does it take to:<br />Process each dimension<br />Process each partition<br />Process the aggregation of each partition<br />Use SSIS to process the cube. Use SQL Log provider to save the Process Log.<br />Sample Reports in my blog <br />
    39. 39. Demo<br />
    40. 40. Demo – Processing Log<br />Processing Log Analysis<br />
    41. 41. Call For Action<br />Read the performance guides and white papers<br />Monitor the SSAS server<br />Implement the quick no-brainer solutions<br />Call an expert to solve the big problems<br />
    42. 42. Monitor the SSAS Server to identify performance Bottlenecks<br />Partitioning is the key to fast processing<br />Improving the queries is more<br /> complicated. <br />