Sie sind auf Seite 1von 26

How are my SSAS Cubes /

Tabular Models Performing? Performance Monitoring


Kenney Snell
Profile

39 years of work experience in designing, developing and


implementing software and databases; 28 years at UPS
Oracle OpenWorld Speaker
Achieving the Holy Grail of Rolling Database Upgrades
IOUG World Conference Speaker
Data Guard Broker, Rolling Upgrades
Currently working as an Senior Database Administrator (DBA) in
Microsoft SQL Server - Business Intelligence (MSBI) group at UPS
Technologies
SQL Server Enterprise 2012, SSAS cubes / tabular models, Dashboards,
SSIS (ETL)
Microsoft Business Intelligence (MSBI) Toolset
Data Warehousing: ETL, Dimensional Modeling, and Reporting
Hobbies Running, Photography, Woodworking
Contact Info KenneySnell@bellsouth.net
UPS

UPS Airlines

UPS operates one of the world's largest, safest and most on-time
airlines
Over 500 aircraft
Nearly 2,000 flight segments / day
Reaching more than 700 destinations in over 200 countries
Air system includes air hubs in
Cologne, Germany; Shanghai,
Miami (to serve Latin America)
intra-Asia hub in China, and
Louisville (Worldport)
Worldport has over 5.2 million square feet
Heart of UPSs global air network
Air sort capacity is 416,000 packages/documents per hour
300 acres with 135 aircraft parking positions
Average # Daily UPS Flights 251 in/out bound flights
SSAS Cubes or Tabular Models Performance
Agenda and Welcome

Profile
UPS
Background Questions
What to monitor in SSAS?
What questions to ask about resource usage?
How to monitor with Demos?
SSAS Performance Architecture
Tables and Scripts
SSAS Performance Tabular Model
Reports
Questions
SSAS Performance Monitoring
BI Questions

Are you familiar with SSAS Cubes or Tabular Models?


Have you built SSAS cubes?
Have you built SSAS Tabular models
Have you used PowerPivot, Power View, Office 365 or
Power BI?
SSAS Performance Monitoring
Resources

Performance monitoring on SSAS is similar to


monitoring a SQL Server Instance / database
You need to monitor these system resources
Memory
CPU
I / O (reads and writes)
SSAS Multidimensional cubes Disk I/O
Tabular models In Memory database
Collection methods are the same for both
SSAS Performance Monitoring
Resource Questions

Is my memory configured correctly for the SSAS Instance?


What is using all that memory on my SSAS Instance?
Where does SSAS spend most of its time?
In which object does SSAS spend most of its CPU time?
How many aggregation misses are occurring on which Objects?
What is the longest running query (MDX)?
What are the top 20 longest running queries?
Who is connecting to the SSAS server?
Which sessions are using the most reads and writes?
SSAS Performance Monitoring
Collection Methods

Data Management Views (DMV)


PowerShell script to get SSAS memory Performance Counters
ASTrace (Windows Service)
Dynamic Management Views (DMV)
What are they?

DMVs are query structures that expose information about


Local SSAS server operations
Server health
Views exist for SSAS Same for Cubes or Models
There are 60 DMVS
SELECT * FROM $System.DBSchema_Tables
WHERE TABLE_TYPE = 'SCHEMA'
ORDER BY TABLE_NAME ASC
DMV queries return information about operations and resource
consumption that are not available through other means
Writing a DMV query is simpler because the query syntax is
based on SQL
Select as
From <DMV>
Where
Order by
Dynamic Management Views (DMV)
Important ones (Demos)

Discover_object_memory_usage
Lists the memory usage for each object
cube, dimension, cache, measure, partition, etc.
select * from $system.discover_object_memory_usage
order by Object_Memory_nonshrinkable desc

Discover_object_activity
Stores information since start up; like reads, rows scanned
What object is consuming the most CPU?
What aggregations are missing
How many times these objects were read, and how many rows were returned
select * from $system.discover_object_activity
order by Object_CPU_Time_MS desc
order by Object_Aggregation_Miss desc

Discover_sessions
Lists the MDX/command used by each user, which SSAS database/cube they are using
Session Reads and writes,
How much CPU and memory is used
Last Command
select * from $system.discover_sessions
Discover_connections
Lists whos connecting to the server,
Since when, for how long, and
From which PC (IP) and using what client
Select * from $system.discover_connections
SSAS Performance Counters
Memory

Performance Counters requests the current value of performance data at


specified time intervals (collection point)
Memory Counters are available for both SSAS cubes and Tabular Models
Main counters for memory are
Memory Usage KB - Total of private virtual memory allocated by Analysis
Services
Corresponds to Process \ PrivateBytes counter
Provided by the OS
Memory Limit Low KB - returns the actual amount of memory that corresponds
to the threshold set by the LowMemoryLimit property
Memory Limit High KB - returns the actual amount of memory that
corresponds to the threshold set by the TotalMemoryLimit property
Memory limit hard KB Maximum memory SSAS can ever allocate
Memory limit Vertipaq KB (SSAS Tabular)
SSAS Performance Counters
Memory for SSAS Multidimensional Cubes

Memory Limit High KB - TotalMemoryLimit property (SSAS Instance)


Memory Limit Low KB - LowMemoryLimit property (SSAS Instance)
Memory Usage KB Memory used at collection
Cleaner Memory KB non-shrinkable KB - amount of memory that
cannot be purged by the Memory Manager
Cleaner Memory shrinkable KB - amount of memory that can be
purged by the Memory Manager
SSAS Multidimensional Memory Instance Level
Properties
SSAS Performance Counters
Memory for Tabular Models

Memory Limit High KB - TotalMemoryLimit property (SSAS Instance)


Memory Limit Low KB - LowMemoryLimit property (SSAS Instance)
Memory Usage KB Memory used by query
VeriPaqPagingPolicy
Mode 0 xVelocity Data is locked in memory
Mode 1 - xVelocity Data is not locked in memory
Means that the in memory-engine can page data to disk if its running
out of memory
Hash dictionaries are locked
Data pages can be paged to disk
Allows xVelocity to use more memory than is available
Memory limit Vertipaq KB
Mode 0 Total about of memory that can be used for the in-memory
database
Model 1 Total amount of Physical memory that can be used; allowing
paging for remaining memory
Vertipaq Paged KB Memory paged to disk (Mode 1)
SSAS Tabular Memory Properties Instance Level
SSAS Memory Performance Counters DEMO
ASTRACE
Captures info about MDX Queries

ASTrace Windows Service that captures


MDX text,
CPU
Duration of MDX queries

Located on Codeplex and developed by former Analysis Services Program


Manager Edward Melomed
ASTrace 2.0 is available
Run on SQL Server 2012
Requires SQL Profiler
ASTrace
Preconfigured with a Analysis Services Profiler template
Stores results in SQL Server database Profile Question
Profiler GUI consumes unnecessary memory and processor power capturing the
trace events and displaying them on the screen.
ASTrace runs as a Windows Service - doesnt consume lots of memory
Uses an xml configuration file can be set up to
Capture multiple SSAS instances
Name the SQL Instance, database and table
Restart and recovery operations
SSAS Performance / Monitoring Architecture

SSAS
Servers

Performance Profiler
Performance DMV
Counters Trace
Views

DMV Perf CTR ASTRACE


SSIS SSIS Package SSAS Package (ps1) Service
Servers
Central
Admin

Data
Mart SSAS
Servers Perf

SSAS Performance Tabular Model

SSRS (Native)
Reporting Servers

SSRS

Clients
SSAS Performance Database
BI_Mon_SSAS (Tables)

[BI_AppData].[ssas_Command_Objects] contains
$system.discover_command_objects
[BI_AppData].[ssas_Commands] contains
$system.discover_commands
[BI_AppData].[ssas_connections] contains
$system.discover_connections
[BI_AppData].[ssas_memory] contains
Memory Performance Counters
[BI_AppData].[ssas_memory_usage] contains
$system.discover_object_memory_usage
[BI_AppData].[ssas_object_activity] contains
$system.discover_object_activity
[BI_AppData].[ssas_sessions] contains
$system.discover_sessions
[dbo].[ASTraceTable_<SSAS_server>] contains
ASTrace MDX query data
SSAS Performance Tabular Model Dimensions / Facts
Data Loaded into the model Rows Loaded
SSAS Performance Reports
SSRS

Run jobs to Capture SSAS performance data


Process SSAS Fact Tables
Run Reports
SSAS Aggregations Design
Why are they so important?

Aggregations are pre-summarized datasets stored in your cube


Aggregations are similar to a Group By clause used in a SQL Select
statement
select CustomerKey, ProductKey, count(OrderQuantity) Orders
,sum(SalesAmount) Sales
from [AdventureWorksDW2012].[dbo].[FactInternetSales]
group by CustomerKey, ProductKey, OrderQuantity, SalesAmount
If the aggregations are stored then the SSAS Storage Engine has less
work to do a run time
Building the correct aggregation is one of the most important tasks you
can do to improve query performance
Good Dimension design is the key to getting the most out of your
aggregations. Creating Natural Hierarchies (Date: Year, month, day)
Two Aggregation Wizards
Design Aggregation Creates first draft of what the wizard thinks you need
Usage Based Optimization Collect User Queries and log to SQL Table
Aggregation Wizards Visual Studio
SSAS Cubes or Tabular Models Questions
How are my SSAS Cubes /
Tabular Models Performing?

Kenney Snell
Contact Info KenneySnell@bellsouth.net

Das könnte Ihnen auch gefallen