I've installed a SQL Reporting server (2008 R2), with some reports. But I've some performances issues.
我安装了一个SQL报告服务器(2008 R2)和一些报告。但我有一些表演问题。
The first call of the day to the server(going on the report interface by example), is VERY slow(something like 30-45seconds at best).
当天对服务器的第一次调用(通过示例进入报告界面)非常慢(最好是30-45秒)。
The report generation is then "fast"(1-2 seconds).
然后报告生成“快速”(1-2秒)。
The next calls to the server are always fasts until the next day. I've the impression that it loads a lot of thing in the memory. But what can takes 30-45 seconds to be loaded in memory??? And how to load it only once?
对服务器的下一次调用总是快到第二天。我的印象是它在内存中加载了很多东西。但是什么可能需要30-45秒加载到内存???以及如何只加载一次?
The server is good enough(quad core, 8GB of ram, never near its capacity for now).
服务器足够好(四核,8GB内存,现在从未接近其容量)。
What is the problem? How can I resolve this ?
问题是什么?我该如何解决这个问题?
Thoses reports will be launched only 4-5 times in a week, so they will always be slow if I can't change this. And since it's available for customer, I just can't make them understand this(and the report is called through a website, so I risk to have timeout).
Thoses报告将在一周内启动4-5次,因此如果我无法改变这一点,它们将总是很慢。由于它可供客户使用,我无法让他们理解这一点(并且报告是通过网站调用的,因此我有可能超时)。
Thank you very much
非常感谢你
6 个解决方案
#1
22
It seems to be an SSRS issue. There is nothing wrong with your report.
这似乎是一个SSRS问题。您的报告没有任何问题。
It's "normal" that SSRS takes more time to load the first time you access it after a long time of inactivity. The issue is caused by the way how SSRS works and SSRS regularly restarts application domain after a specific time period. After the application domain is restarted, then upon first request to the SSRS it needs to load all the settings and it takes quite a long time.
SSRS在长时间不活动后第一次访问时会花费更多时间加载,这是“正常的”。问题是由SSRS的工作方式和SSRS在特定时间段后定期重新启动应用程序域引起的。重新启动应用程序域后,在第一次请求SSRS时,它需要加载所有设置,这需要相当长的时间。
This blog show's a workaround for the situation
这个博客节目是针对这种情况的一种解决方法
#2
2
Here is the powershell script that I wrote to fix the problem. It is setup as a task to run every 1:00am:
这是我为解决问题而编写的powershell脚本。它被设置为每凌晨1:00运行一次的任务:
Stop-Service "SQL Server Reporting Services (MSSQLSERVER)"
Start-Service "SQL Server Reporting Services (MSSQLSERVER)"
$wc = New-Object system.net.webClient
$cred = [System.Net.CredentialCache]::DefaultNetworkCredentials
$wc.Credentials = $cred
$src = $wc.DownloadString("http://localhost/Reports/Pages/Report.aspx?ItemPath=***NAME OF HOME PAGE***")
#3
1
The best solution I could come up with was to issue a 'curl' command to the http page of the report using via windows batch command in a windows service. This ran up the page(s) every morning before the users came in.
我能想到的最好的解决方案是使用windows服务中的windows batch命令向报告的http页面发出'curl'命令。在用户进来之前,每天早上都会对页面进行调整。
Don't have access to the code anymore (job was a while ago) but this question shows how to use curl:
不再能够访问代码了(工作是前一段时间)但是这个问题显示了如何使用curl:
http://blogs.plexibus.com/2009/01/15/rest-esting-with-curl/
http://blogs.plexibus.com/2009/01/15/rest-esting-with-curl/
#4
1
As Diego said, SSRS has some issues. The first call it is slow, regarding your server configuration. I recommend you the following config to add in rsreportserver.config (located if you don't know in C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\ )
正如迭戈所说,SSRS存在一些问题。关于服务器配置,第一次调用很慢。我建议您在rsreportserver.config中添加以下配置(如果你不知道在C:\ Program Files \ Microsoft SQL Server \ MSRS10.MSSQLSERVER \ Reporting Services \ ReportServer \中找到)
If you want to increase the max memory used by SSRS: (which means 7 GB)
如果要增加SSRS使用的最大内存:(表示7 GB)
<WorkingSetMaximum>7000000</WorkingSetMaximum>
If you want to improve the first call, you can set (in minutes)
如果您想改善第一个电话,您可以设置(以分钟为单位)
<RecycleTime>4320</RecycleTime>
Actually SSRS has a reset (recycle) time in which cleans its buffer. By default its setted at 720 min (12h) so thats why if you open a report every morning it actually load very slow. As you need you can set the recycle time higher (2-3 days). I don't recommend a higher time because the buffer will fill up and you will get only blank pages, so you will have to manually restart Reporting Services.
实际上SSRS有一个重置(循环)时间来清理它的缓冲区。默认情况下,它设置为720分钟(12小时),这就是为什么如果你每天早上打开一个报告,它实际加载速度非常慢。根据需要,您可以将回收时间设置得更高(2-3天)。我不建议更长的时间,因为缓冲区将填满,您将只获得空白页,因此您必须手动重新启动Reporting Services。
#5
0
It may be completely unrelated to SQL Server. Try to see if is not the code sign revocation list check issue, see Fix slow application startup due to code sign validation
它可能与SQL Server完全无关。尝试查看是否不是代码签名撤销列表检查问题,请参阅由于代码签名验证而修复慢速应用程序启动
#6
0
I converted the main query and the dropdown controls on the page to load from stored procedures, it made a difference of say 5 sec in the loading process.Avoid using any inline queries.
我将主要查询和页面上的下拉控件转换为从存储过程加载,它在加载过程中产生了5秒的差异。避免使用任何内联查询。
#1
22
It seems to be an SSRS issue. There is nothing wrong with your report.
这似乎是一个SSRS问题。您的报告没有任何问题。
It's "normal" that SSRS takes more time to load the first time you access it after a long time of inactivity. The issue is caused by the way how SSRS works and SSRS regularly restarts application domain after a specific time period. After the application domain is restarted, then upon first request to the SSRS it needs to load all the settings and it takes quite a long time.
SSRS在长时间不活动后第一次访问时会花费更多时间加载,这是“正常的”。问题是由SSRS的工作方式和SSRS在特定时间段后定期重新启动应用程序域引起的。重新启动应用程序域后,在第一次请求SSRS时,它需要加载所有设置,这需要相当长的时间。
This blog show's a workaround for the situation
这个博客节目是针对这种情况的一种解决方法
#2
2
Here is the powershell script that I wrote to fix the problem. It is setup as a task to run every 1:00am:
这是我为解决问题而编写的powershell脚本。它被设置为每凌晨1:00运行一次的任务:
Stop-Service "SQL Server Reporting Services (MSSQLSERVER)"
Start-Service "SQL Server Reporting Services (MSSQLSERVER)"
$wc = New-Object system.net.webClient
$cred = [System.Net.CredentialCache]::DefaultNetworkCredentials
$wc.Credentials = $cred
$src = $wc.DownloadString("http://localhost/Reports/Pages/Report.aspx?ItemPath=***NAME OF HOME PAGE***")
#3
1
The best solution I could come up with was to issue a 'curl' command to the http page of the report using via windows batch command in a windows service. This ran up the page(s) every morning before the users came in.
我能想到的最好的解决方案是使用windows服务中的windows batch命令向报告的http页面发出'curl'命令。在用户进来之前,每天早上都会对页面进行调整。
Don't have access to the code anymore (job was a while ago) but this question shows how to use curl:
不再能够访问代码了(工作是前一段时间)但是这个问题显示了如何使用curl:
http://blogs.plexibus.com/2009/01/15/rest-esting-with-curl/
http://blogs.plexibus.com/2009/01/15/rest-esting-with-curl/
#4
1
As Diego said, SSRS has some issues. The first call it is slow, regarding your server configuration. I recommend you the following config to add in rsreportserver.config (located if you don't know in C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\ )
正如迭戈所说,SSRS存在一些问题。关于服务器配置,第一次调用很慢。我建议您在rsreportserver.config中添加以下配置(如果你不知道在C:\ Program Files \ Microsoft SQL Server \ MSRS10.MSSQLSERVER \ Reporting Services \ ReportServer \中找到)
If you want to increase the max memory used by SSRS: (which means 7 GB)
如果要增加SSRS使用的最大内存:(表示7 GB)
<WorkingSetMaximum>7000000</WorkingSetMaximum>
If you want to improve the first call, you can set (in minutes)
如果您想改善第一个电话,您可以设置(以分钟为单位)
<RecycleTime>4320</RecycleTime>
Actually SSRS has a reset (recycle) time in which cleans its buffer. By default its setted at 720 min (12h) so thats why if you open a report every morning it actually load very slow. As you need you can set the recycle time higher (2-3 days). I don't recommend a higher time because the buffer will fill up and you will get only blank pages, so you will have to manually restart Reporting Services.
实际上SSRS有一个重置(循环)时间来清理它的缓冲区。默认情况下,它设置为720分钟(12小时),这就是为什么如果你每天早上打开一个报告,它实际加载速度非常慢。根据需要,您可以将回收时间设置得更高(2-3天)。我不建议更长的时间,因为缓冲区将填满,您将只获得空白页,因此您必须手动重新启动Reporting Services。
#5
0
It may be completely unrelated to SQL Server. Try to see if is not the code sign revocation list check issue, see Fix slow application startup due to code sign validation
它可能与SQL Server完全无关。尝试查看是否不是代码签名撤销列表检查问题,请参阅由于代码签名验证而修复慢速应用程序启动
#6
0
I converted the main query and the dropdown controls on the page to load from stored procedures, it made a difference of say 5 sec in the loading process.Avoid using any inline queries.
我将主要查询和页面上的下拉控件转换为从存储过程加载,它在加载过程中产生了5秒的差异。避免使用任何内联查询。