Download presentation
Presentation is loading. Please wait.
Published byHertha Ziegler Modified over 6 years ago
1
SQL Server Reporting Services 2017 Performance Troubleshooting
Alexander Kalenik SQL Server Reporting Services 2017 Performance Troubleshooting
2
Alexander Kalenik Senior Field Engineer,
4/5/ :19 AM Alexander Kalenik Senior Field Engineer, MS Customer Support 12 years Technology lead MS RUS team for: SQL Server (OLTP, BI), Windows Failover Cluster, Analytic Platform System (PDW) PhD (Cybernetic and computer science) © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
3
SQLSat Kyiv Team Denis Reznik Yevhen Nedashkivskyi Oksana Borysenko
Eugene Polonichko Mykola Pobyivovk Oksana Tkach
4
Sponsors
5
Overview Section 1. Main components Section 2. Types of deployments
4/5/ :19 AM Overview Section 1. Main components Section 2. Types of deployments Section 3. Log types Section 4. Performance counters Section 5. Report preparation phases Section 6. How to optimize © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
6
Section 1: Main components
4/5/ :19 AM Section 1: Main components © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
7
What is the SSRS? SQL Server Reporting Services (SSRS) is a server-based, end-to-end reporting solution SSRS supports: Report authoring Distribution Management End-user access Reporting Services includes client and server components. SSRS is intended for working with: Paginated reports Power BI reports Mobile reports
8
What SSRS Includes now SSRS includes 3 independent components:
Usual (classic) SSRS (for Paginated reports) Power BI RS (for Power BI reports) Mobile RS (for Mobile reports)
9
Main Components and How It Works
Metadata Request Report Request Report Catalog SSRS Client SSRS Reporting Data Sources Metadata Requested Report Data Request Data
10
Report Catalog Report Server Catalog (RSDB) Stores all report metadata including report definitions, report/history snapshots, scheduling, default parameters, etc. RS Temp DB Stores temporary snapshots while running reports What are the specificities : Lot of Write activity to the RSTempDB log Catalog has a lot of I/O and transactions SSRS 2008 and after uses RSTempDB significantly more than SSRS 2005 does Can be optimized by applying using the standard SQL DB optimizing techniques
11
Performance Troubleshooting: Overview
SSRS retrieving, rendering, processing time Performance Troubleshooting: Overview Data source processing time Client processing time Network latency SSRS Client Network latency SSRS Report Catalog Reporting Data Sources Network latency SSRS Catalog processing time
12
Section 2: Types of deployments
4/5/ :19 AM Section 2: Types of deployments © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
13
Types of deployments: Single server
14
Types of deployments: Multi–server
15
Types of deployments: Scale-out with NLB
16
Types of deployments: Scale-out with SQL Server FC/AG
17
Section 3: Log Types 4/5/2019 11:19 AM
© 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
18
Log Types: Overview Report Server Execution Log
Report Server Service Trace Log Report Server HTTP Log Windows Application Log
19
Report Server Execution Log: Overview
The Reporting Services, report server execution log contains information about the reports that execute on the server in any type of deployment. You can use the report execution log to find out how often a report is requested, what output formats are used the most, and how many milliseconds of processing time is spent on each processing phase. The log contains information on the length of time spent executing a report's query and the time spent processing the data.
20
Report Server Execution Log: Configuring
By default, log entries are kept 60 days. Entries that exceed this date are removed at 2:00 A.M. every day. On a mature installation, only 60 days of information will be available at any given time. You cannot set limits on the number of rows or on the type of entries that are logged. You can configure: For SharePoint mode – from SharePoint Central Administration For Native mode – from Server Properties page in SQL Server Management Studio
21
Report Server Execution Log: Fields
To get information you should execute query: USE ReportServer; SELECT * FROM ExecutionLog3 order by TimeStart DESC Query returns a lot of columns very detail documented here
22
Report Server Execution Log: Fields (1)
Column Description InstanceName Name of the report server instance that handled the request. ItemPath Path of where a report or report item is stored. UserName User identifier. ExecutionID The internal identifier associated with a request. RequestType Interactive, Subscription, Format Rendering format. Parameters Parameter values used for a report execution. ItemAction Render, Sort, BookMarkNavigation, DocumentNavigation, etc TimeStart, TimeEnd Start and stop times that indicate the duration of a report process. TimeDataRetrieval Number of milliseconds spent retrieving the data. TimeProcessing Number of milliseconds spent processing the report. TimeRendering Number of milliseconds spent rendering the report.
23
Report Server Execution Log: Fields (2)
Column Description Source Live, Cache, Snapshot, History, AdHoc, Session (Indicates a follow up request within an already established session),Rdce (Indicates a Report Definition Customization Extension. An RDCE custom extension can dynamically customize a report definition before it is passed to the processing engine upon report execution.) Status Status (either rsSuccess or an error code (error codes)). ByteCount Size of rendered reports in bytes. RowCount Number of rows returned from queries. AdditionalInfo An XML property bag containing additional information about the execution. The contents can be different for each row.
24
Field: AdditionalInfo
The AdditionalInfo field is an XML property bag or structure containing additional information about the execution. The contents can be different for each row in the log.
25
AdditionalInfo: Detail Info
Column Description ProcessingEngine 1=SQL Server 2005, 2=The new On-demand Processing Engine. ScalabilityTime The number of milliseconds spent performing scale related operations in the processing engine. EstimatedMemoryUsageKB An estimate of the peak amount of memory, in kilobytes, consumed by each component during a particular request. DataExtension The types of data extensions or data sources used in the report. The number is a count of the number of occurrences of the particular data source. ExternalImages The value is in miliseconds. The time needed to retrieve images from an external webserver may slow the overall report execution. Connections A multi-leveled XML-structure.
26
Report Server Service Trace Log: Overview
The Reporting Services report server trace logs are an ASCII text file that contain detailed information for operations. Information include operations performed by the Report Server Web service, the web portal, and background processing. The trace log file includes redundant information that is recorded in other log files, plus additional information that is not otherwise available. Trace log information is useful if you are debugging an application with a report server or investigating a specific problem logged to the event or execution log.
27
Report Server Service Trace Log: Location
The trace log files are ReportServerService_<timestamp>.log and Microsoft.ReportingServices.Portal.WebHost_<timestamp>.log and are located in C:\Program Files\Microsoft SQL Server\MSRSxx.MSSQLSERVER\Reporting Services\LogFiles The trace logs are created daily, starting with the first entry that occurs after midnight (local time), and whenever the service is restarted. The timestamp is based on Coordinated Universal Time (UTC). The file is in EN-US format. By default, trace logs are limited to 32 megabytes and by default they are deleted after 14 days.
28
Report Server Service Trace Log: Configuration
Trace log behavior is managed in the configuration file ReportingServicesService.exe.config. The configuration file is in C:\Program Files\Microsoft SQL Server\MSRS13.<instance name>\Reporting Services\ReportServer\bin
29
Report Server Service Trace Log: Fields
The following fields can be found in a trace log: System information, including operating system, version, number of processors, and memory. Reporting Services component and version information. Events logged the Application log. Exceptions generated by the report server. Low resource warnings logged by a report server. Inbound SOAP envelopes and summarized outbound SOAP envelopes. HTTP header, stack trace, and debug trace information.
30
Report Server HTTP Log: Overview
The Report Server HTTP log file keeps a record of every HTTP request and response handled by the report server. Because request overflow and timeout errors do not reach the report server, they are not recorded in the log file. HTTP logging is not enabled by default. You must modify the ReportingServicesService.exe configuration file to use it. The log is an ASCII text file. You can use a text editor to view it. The Report Server HTTP log file is equivalent to the W3C log file. By default, logs are limited to 32 MB and deleted after 14 days.
31
Report Server HTTP Log: Configuration
To configure the Report Server HTTP log, modify the ReportingServicesService.exe.config file, is located in the C:\Program Files\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer\Bin folder. To enable the HTTP server, you must add to the RStrace section of the ReportingServicesService.exe.config file
32
Report Server HTTP Log: Fields (1)
Description HttpTraceFileName This value is optional. The default is ReportServerServiceHTTP_. Date The date when the activity occurred. Time The time when the activity occurred. ClientIp The IP address of the client accessing the report server. UserName The name of the user who accessed the report server. ServerPort The port number used for the connection. Host The content of the host header. Method The action or SOAP method called from the client.
33
Report Server HTTP Log: Fields (2)
Description UriStem The resource accessed. UriQuery The query used to access the resource. ProtocolStatus The HTTP status code. BytesReceived The number of bytes received by the server. TimeTaken The time (in milliseconds) from the instant HTTP.SYS returns request data until the server finishes the last send, excluding network transmission time. ProtocolVersion The protocol version used by the client. UserAgent The browser type used by the client. CookieReceived The content of the cookie received by the server. CookieSent The content of the cookie sent by the server.
34
Windows Log: Overview Reporting Services writes event messages to the Windows application log. You can use the message information written to the application log to find out about events that are generated by the report server applications running on the local system. Reporting Services does not provide a way to turn off application event logging for a report server or control which events are logged. The schema that describes report server event logging is fixed. You cannot extend the schema to support custom events.
35
Windows Log: Event Sources
Reporting Services provides a few event sources: Report Server (Report Server Windows service) Report Manager Scheduling Processor Delivery Processor
36
Section 4: Performance counters
4/5/ :19 AM Section 4: Performance counters © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
37
Performance Counters: Overview
In this version SSRS there are no specific objects for SSRS Performance Monitor For analyzing SSRS performance problem you should use general purposes There are 4 main SSRS related processes and all of them you can see in Performance Monitor: ReportingServicesService RSHostingService RSManagement RSPortal Performance SSRS mainly depends on ReportingServicesService and RSPortal.
38
Performance Counters: General purpose counters
Memory: Available Bytes Committed Bytes Physical Disk: Avg. Disk sec/Transfer (Avg. Disk sec/Read + Avg. Disk sec/Write) Processor Information: %Processor Time Network Interface: Bytes Total/sec (Bytes Sent/sec + Bytes Received/sec)
39
General purpose counters: Thresholds
Memory: Available Bytes – more than 5% installed RAM Memory: Committed Bytes – not more than installed RAM, if more than Paging Physical Disk: Avg. Disk sec/Transfer – less than 15 ms Processor Information: %Processor Time - not more than 80…85% Network Interface: Bytes Total/sec – not more than 60…70%% Network Interface: Current Bandwidth
40
Performance Counters: Process specific
Process(*):%Processor Time Process(*):Working Set Process(*):IO Data Bytes/sec
41
Process specific: Thresholds
Process(*):%Processor Time - no Process(*):Working Set - no Process(*):IO Data Bytes/sec - no
42
Section 5: Report Preparation Phases
4/5/ :19 AM Section 5: Report Preparation Phases © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
43
Report Preparation Phases
When you view a report, you might experience a long wait time before you see the first page. After you determine whether the delay time is in data retrieval, report processing, or report rendering, use this topic to help troubleshoot issues. There are 3 report preparation phases: Retrieving data Processing report Rendering report And total time for report visualization consists of: Retrieving time Processing time Rendering time
44
Retrieving time There are a few reasons for long retrieving time:
More Data is Retrieved for a Report Than is Needed Large Amounts of Network Traffic To estimate Retrieving time use column TimeDataRetrieval and RowCount in ExecutionLog3 TimeDataRetrieval is time (in milliseconds) spent executing the query and retrieving data. RowCount is number of rows returned from queries.
45
Processing time Report processing occurs after data is retrieved for report datasets, when the report processor combines the report layout and the data to create an interim report format. In general, the report processor combines data and layout only for the current page that is viewed by the user. To estimate Processing Time use TimeProcessing and ByteCount from ExecutionLog3 TimeProcessing is time spent processing the report. ByteCount is size of rendered report in bytes.
46
Processing time: Depends on
Expressions in the Page Header or Footer Force All Pages To Be Processed No Page Breaks in the Report Complex Tablix Data Region Grouping and Aggregate Functions Many Instances of Subreports in a Tablix Slow Report Performance Report Execution Times Out
47
Rendering Time Report rendering occurs after data and layout are combined into an interim format and then passed to a rendering extension. Rendering time can be estimated using TimeRendering from ExecutionLog3 TimeRendering—Time spent rendering the report. Rendering time depends on Requested rendering format. You can see it using Format field from ExecutionLog3. Size of rendered report affect Rendering time as well. You can obtain it from fiels ByteCount from ExecutionLog3.
48
Section 6: How to optimize
4/5/ :19 AM Section 6: How to optimize © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
49
How to optimize: Retrieving time
4/5/ :19 AM How to optimize: Retrieving time © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
50
More Data is Retrieved than you need
Write queries to return only the level of detail that you show in the report. Write queries with WHERE clauses or HAVING Write queries with the ORDER BY clause to presort data that is retrieved for a report. Sort the data in the order you want to use. Write queries with GROUP BY to aggregate values Many times, the most effective way to communicate information is by aggregating values and displaying summaries. Consider the amount of data needed for a chart or gauge. Drawing hundreds of points in a few pixels on a monitor degrades performance and does not enhance the visualization. Consider creating execution snapshots for a report.
51
Filters and Snapshot Instead of Query Parameters
Reporting Services has several methods for dynamically filtering report contents, including the following: Query parameters filter data at the source as it is retrieved. Report filters, applied to a dataset or data region, limit the data that is displayed from a generated report. Using filters retrieves all data, but only data that is relevant to the user is displayed. This may be less efficient on an individual report basis than filtering at the source. However, it lets you retrieve the data once from the source and store in it a snapshot to serve many different users. On the other hand, when using query parameters, you must revisit the data source for each new value of the query parameters.
52
Large Amounts of Network Traffic
Large amounts of data passed as network traffic can introduce wait times for the user. Depending on your expected user base and the expected volume of report views, you can select the appropriate approach for deploying report server components. Keep the report server catalog on the same computer as the report server. If it’s possible from point of performance. The report server database tempdb manages report data that is retrieved for each dataset query in a report definition. Keeping report data with the report processor reduces network traffic. Keep the DW source(s) on a separate server(s) than the SSRS. Having both the data warehouse and SSRS that contend for memory on the same server can slow performance.
53
How to optimize: Processing time
4/5/ :19 AM How to optimize: Processing time © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
54
Expressions Force All Pages To Be Processed
When you include a reference to the built-in field [&TotalPages], the report processor must paginate the entire report before it can render the first page. If no reference to [&TotalPages] exists, the first page can be rendered and returned to the user immediately, without processing the rest of the report. The report processor assumes that any complex expression in the page header or footer might contain a direct or indirect reference to [&TotalPages]. To avoid having the report processor paginate a lengthy report, do not include a reference to [&TotalPages] or any complex expressions in the page header and page footer.
55
No Page Breaks in the Report
For a report that has no page breaks, the whole report must be processed before the user can view the first page. A soft-page break renderer, such as the HTML viewer, automatically handles paging for you. You can override this automatic behavior if you set the Report property InteractiveHeight to 0. For hard-page break renderers, you must add page breaks manually. Verify that InteractiveHeight is not 0 and that it is set to some reasonable page size. Add page breaks to report items or Tablix groups to help organize the report into pages. This reduces the amount of data that must be processed for each page
56
Complex Grouping and Aggregate Functions in Tablix
Many levels of nested and adjacent groups in a Tablix data region can affect report processing performance. Consider both the level of grouping, the number of group instances, and the use of aggregate functions which require evaluating after group, filter, and sort expressions are applied. Evaluate the report design of your report and consider whether some data aggregation can occur on the data source. Reducing the amount of data in the report might be sufficient to provide acceptable performance without changing any aggregate function calls.
57
Many Instances of Subreports in Tablix
Do use subreports when there are just a few subreport instances. Do not use subreports inside a group when there are many group instances. Do use subreports when the subreport uses a different data source than the main report.
58
Report Execution Times Out
In order to run large reports, there are two time-outs you must adjust: report execution time-out and the ASP.NET time-out. Report execution time-out values are specified on the report server ASP.NET time-out policy is controlled by the report server configuration file. The default location for this file is <drive>:\Program Files\Microsoft SQL Server\MSRS10_5.MSSQLSERVER\Reporting Services\ReportServer\web.config. To set the maximum number of seconds a request can execute, add the <httpRuntime executionTimeout="90"/> element to the file.
59
How to optimize: Rendering time
4/5/ :19 AM How to optimize: Rendering time © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
60
Optimization steps Rendering time can be affected by the amount of data, the number of instances of report items, and paging. When you export a report, you are passing the report in an interim format to a specific renderer. Some features are not supported in all renderers. For exporting to Excel, do not merge cells in a Tablix data region. HTML parsers are not efficient at rendering very large HTML pages. If you have trouble rendering a report, select a format that produces a smaller file (for example, CSV).
61
How to optimize: SSRS Catalogs
4/5/ :19 AM How to optimize: SSRS Catalogs © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
62
Best Practice Use Dedicated Server for Catalog Databases
Separate Report Server Catalog and SQL Server Data Sources on Servers. Disks Use High Performance disks such as SAN Use Separate Disks for RSDB and RSTempDB (RSDB – Does a lot of small transactions and RSTempDB does larger transactions that contains report data Pre grow Report Server Catalog Databases
63
4/5/ :19 AM Q & A © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.