0% found this document useful (0 votes)
64 views

SQL Saturday Atlanta 2017

This document discusses performance monitoring of SQL Server Analysis Services (SSAS) servers. It covers: 1) Tools for monitoring SSAS server performance such as Task Manager, Performance Monitor, SQL Server Profiler, and SSAS Dynamic Management Views. 2) Factors that can impact SSAS server performance such as memory usage, disk usage, thread pool settings, and query processing load. 3) How to establish a performance baseline and identify issues such as memory bottlenecks, disk bottlenecks, or excessive query processing loads that can cause slow query performance.

Uploaded by

Mardi Septianto
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

SQL Saturday Atlanta 2017

This document discusses performance monitoring of SQL Server Analysis Services (SSAS) servers. It covers: 1) Tools for monitoring SSAS server performance such as Task Manager, Performance Monitor, SQL Server Profiler, and SSAS Dynamic Management Views. 2) Factors that can impact SSAS server performance such as memory usage, disk usage, thread pool settings, and query processing load. 3) How to establish a performance baseline and identify issues such as memory bottlenecks, disk bottlenecks, or excessive query processing loads that can cause slow query performance.

Uploaded by

Mardi Septianto
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Shabnam Watson

Performance Monitoring SQL


Server Analysis Services
About me
BI consultant with focus on SSAS
15 years of experience working with Microsoft SQL
Server
Speaker at SQLSaturdays and user groups
PASS Summit Speaker Idol participant ☺
@shbWatson
[email protected]

https://shabnamwatson.wordpress.com
Who is this presentation for?
• Anyone who:
• Is responsible for maintaining a SSAS server.
• Wants to look at SSAS from the sever side end user
tools.
• Familiar with what a SSAS database is from a
development standpoint.

Focus is on server during query processing.


Who is this presentation NOT for?
Does not cover:
• Data warehouse design concepts
• SSAS database design and development
• Query performance tuning.
• Performance monitoring for processing databases
(load) .
Agenda
High level look at SSAS (MD) from Server side
Memory/Disk/CPU settings
What to measure?
Tools
Help! Why are my queries running slow?
How do you evaluate the health of a SSAS
server?
• System was running fine up until a day ago
and now everything is slow.
• User cannot get connected to the server
but by time you get in, you can! (…post
crash…)
SSAS process
msmdsrv
Task Manager
Windows Explorer
Performance Monitor: Performance Counters
CPU Memory Disk Network SQL Server Profiler/Extended Events
SSAS Data Management Views (DMVs)
OS 3rd party tools

Ideally you should establish a baseline when server is in a good state.

From Task Manager  Details Tab


Task Manager Resource Monitor

TechNet Task Manager

CPU: Pegged close to %100 for long periods  CPU bottleneck. See how many threads.
Memory consumption: Below the LowMemoryLimit? Too low? (Post crash)
Disk: For MD, which cubes/measure groups are being used to answer queries? Several hundred MB/Sec?
Backups/sync/process operations. Writes in the middle of the day.
Disk: For Tabular: Paging.
SSAS Engine (MD)
Frequently
Formula Engine accessed and
MDX Cache calculated cells

Dimensions
Data Data Data
• The formula engine cache Set 1 Set 2 Set 3
• The storage engine cache
• The file system cache

Storage Engine
Tabular: Default storage Cache Some accessed subcubes
model is VertiPaq, Aggregation Data
performs best when the I/O
entire model fits in Measure Group Data
memory. file system cache or disk.
SSAS Memory Manager
Memory Price/KB

Hard Memory Limit Panic Mode

1000
Total Memory Limit (%80)

Mid point between 10


Low and Total
Low Memory Limit (%65)

Cleaner thread wakes up

0
0
Memory Price zero until memory reaches Low Memory Limit.
The more memory is used the higher the price.
Price gradually increases until memory reaches half point between Low and Total limit.
Controlling the SSAS Memory Manager
LowMemoryLimit: Server is low on memory,
cashes start to clear.

TotalMemoryLimit The maximum amount of


virtual memory that SSAS will use, not always
honored. Caches not in use are cleared.
If memory requests come too fast, cleaner does
not get a chance to free memory.

Hard Memory Limit: Half way between total


physical memory and TotalMemoryLimit: Active
Sessions are cancelled. Sessions get an error
message.

Note: Values under 100 are % of total memory. Values over


100 are actual bytes.
SSAS Memory Manager – Good state
Memory

Hard Memory Limit


Total Memory Limit (%80) Make sure there is a
good gap between Low
Low Memory Limit (%65) and Total Limit

Memory Usage

These defaults should be raised on servers with a large amount of memory.


%65 of 256 GB  167 GB, too aggressive
SSAS Memory Manager – problem state
Memory

Hard Memory Limit


Total Memory Limit (%80)

Low Memory Limit (%65)

Memory Usage Memory gradually coming back up:


No dump files in Log directoy

Cleaner too aggressive –> all caches cleared  Poor performance


SSAS Memory Manager – problem state
Memory

Hard Memory Limit


Total Memory Limit (%80)

Low Memory Limit (%65)

Memory Usage Post crash: Check dump files


in Log directory, Event Viewer

Cleaner cannot keep up with requests coming –> memory passes


Hard Limit  service crash : SSAS Service stopped.

Latest SP and Cumulative update packs, too many users.


SSAS Engine (Tabular)
Default storage model is VertiPaq, performs best when the entire model fits in memory.
What happens when model does not fit in memory?  Paging to Disk = Degraded performance

VertiPaqPagingPolicy 0 (Default) 1
Paging to disk No – VertiPaq data locked in Yes – Data Pages can be flushed to
memory disk
VertiPaqMemoryLimit %Total Memory that VertiPaq Cleaner ignores VertiPaq memory
(%60) can lock in working set beyond VertiPaqMemoryLimit for
clearing caches

VertiPaqMemoryLimit = 38 GB Cleaner Memory =


LowMemoryLimit = 42 GB
TotalMemoryLimit = 52 GB 102 – 100(Non VertiPaq Memory)
VertiPaq Memory = 100 +
Process Memory = 102 38 (instead of 100)= 40
SSAS Memory Manager – Tabular
Memory %100 = 100GB VertiPaq Paged
Connection closes.

Hard Memory Limit %90


Total Memory Limit %80

Low Memory Limit %65


VertiPaqMemoryLimit %60

VertiPaqPagingPolicy = 0 VertiPaqPagingPolicy = 1
Thread Management
• Too many: context switches and resource
competition
• Too few: CPU and Disk underutilization
• ThreadPool\Parsing\Short
• ThreadPool\Parsing\Long
• ThreadPool\Query: FE
• ThreadPool\IOProcess: SE
Disk structures (Windows Explorer)
• MD:
• Database
• Measure Groups
• Dimensions
• Partitions
• Aggregations
• Tabular
• Table

Pay attention to
• size and last update date
• size of aggregations
• Temporary folders
Log Directory
Server Properties
msmdsrv.ini Back up!

\Program Files\Microsoft SQL Server\MSAS13.InstanceName\OLAP\Config

• Memory properties
OLAP properties (connection timeout,…,mostly advanced: don’t change)
• AggregationUseEnabled
• Thread Pool properties

Some properties more likely to change are exposed through SSMS.


Performance Counters – 1
If too low, probably post crash, look at dump files.

Shortcut to how many times the cleaner has got to


work, resets with each service start.

If too low, probably post crash, look at dump files.


Performance Counters - 2
If almost
zero?

Processor
utilization for SSAS
Perfmon Data Collectors
Use custom data collectors to turn on for certain periods of time on servers.
SQL Server Profiler
Not depreciated for SSAS
Find out who is connected.
Look at queries running. Catch long running queries.
Look at build/sync activities.
What tool are users using?
Use “Query End” event to log a list of queries: Save to
a table, use as worklist to establish baseline.
SSAS Dynamic Management Views
Provide information about local server operations and server
health.
Syntax based on a SELECT SQL statement
JOIN, GROUP BY, LIKE, CAST, and CONVERT are not supported

• Who is connected?
• Who is killing my server?
• How to kill a session?

https://docs.microsoft.com/en-us/sql/analysis-services/instances/use-dynamic-
management-views-dmvs-to-monitor-analysis-services
Extended Events
Tracing and performance monitoring system
Light weight compared to profiler traces
• 2016: Interface available in SSMS
• https://docs.microsoft.com/en-us/sql/analysis-services/instances/monitor-
analysis-services-with-sql-server-extended-events
• https://www.youtube.com/watch?v=ja2mOHWRVC0&index=1&list=PLv2Bt
OtLblH1YvzQ5YnjfQFr_oKEvMk19
Other tools to check out

Foglight by Quest
BI Sentry by SentryOne

AS Trace: runs as a service:


http://sqlsrvanalysissrvcs.codeplex.com/downloads/get/382237
Kasper De Jonge’s DMV workbook
https://www.kasperonbi.com/what-is-using-all-that-memory-on-my-
analysis-server-instance/
Resources
Applied Microsoft SQL Server 2012 Analysis Services Tabular Modeling (Teo
Lachev), chapter 12
Tabular Modeling in Microsoft SQL Server Analysis Services Second Edition
(Marco Russo, Alberto Ferrari), Chapter 14
Expert Cube Development with Microsoft SQL Server Analysis Services (Chris
Webb, Alberto Ferrari, Marco Russo), Chapter 11
Microsoft SQL Server 2008 Analysis Services Unleashed (Irina Gorbach,
Alexander Berger, Edward Melomed), Chapters 26 to 28
Task Manager: https://technet.microsoft.com/en-us/library/cc938567.aspx
SSAS Server Properties: https://docs.microsoft.com/en-us/sql/analysis-
services/server-properties/server-properties-in-analysis-services

You might also like