Showing posts with label memory. Show all posts
Showing posts with label memory. Show all posts

Tuesday, March 20, 2012

rs.render (programmagically the fastest way to printer HELP)

I have written a c# app that renders in real time the RS Reports in an
'EMF' memory stream straight to the printer.
Would it be faster to stream them to a file and then send to the
printer? Streaming straight to the printer is VERY slow!
Thanks,
TrintI would be interested in your solution, and whether you found a faster way. I
need to be able to stream reports directly to a user's default printer and
need to find an effective way to do that. Can you help?
--
Thanks,
CGW
"trint" wrote:
> I have written a c# app that renders in real time the RS Reports in an
> 'EMF' memory stream straight to the printer.
> Would it be faster to stream them to a file and then send to the
> printer? Streaming straight to the printer is VERY slow!
> Thanks,
> Trint
>

Monday, March 12, 2012

RS still crippling server

We are still having issues running certain reports that take up to 100%
CPU and eat memory like it is candy. Some of these are not very large.
Could this be due to the fact that IIS, MS SQL and RS are all running
on the same box?You should definitely have a separate license for RS and run it on its
own server.
Bryon wrote:
> We are still having issues running certain reports that take up to 100%
> CPU and eat memory like it is candy. Some of these are not very large.
> Could this be due to the fact that IIS, MS SQL and RS are all running
> on the same box?|||Jerry wrote:
> You should definitely have a separate license for RS and run it on its
> own server.
>
> Bryon wrote:
>> We are still having issues running certain reports that take up to
>> 100% CPU and eat memory like it is candy. Some of these are not very
>> large. Could this be due to the fact that IIS, MS SQL and RS are all
>> running on the same box?
I that a license for a separate SQL Server? Does this mean use 3 boxes?
One for the web front, one for MS SQL and one for MS SQL with RS?|||Not three licenses. I assume that IIS and SQL Server were running just
fine for you previously and can stay on the same box. Just get an extra
box and SQL license to run RS. RS is pretty resource intensive and its
happiest by itself.
Bryon wrote:
> Jerry wrote:
>> You should definitely have a separate license for RS and run it on its
>> own server.
>>
>> Bryon wrote:
>> We are still having issues running certain reports that take up to
>> 100% CPU and eat memory like it is candy. Some of these are not very
>> large. Could this be due to the fact that IIS, MS SQL and RS are all
>> running on the same box?
>
> I that a license for a separate SQL Server? Does this mean use 3 boxes?
> One for the web front, one for MS SQL and one for MS SQL with RS?|||The main time I have seen extensive resource utilization is when rendering
to some other format than html. Particularly PDF and Excel. These are done
in memory and can take a lot of memory. If you have a multi-user cpu box
with decent amount of RAM you should be OK. Remember that you can't just use
memory usage because SQL Server will use all available memory and then give
back memory when under load.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Bryon" <blape@.whittmanhart.com> wrote in message
news:OGyUJK$EFHA.1564@.TK2MSFTNGP09.phx.gbl...
> Jerry wrote:
> > You should definitely have a separate license for RS and run it on its
> > own server.
> >
> >
> > Bryon wrote:
> >
> >> We are still having issues running certain reports that take up to
> >> 100% CPU and eat memory like it is candy. Some of these are not very
> >> large. Could this be due to the fact that IIS, MS SQL and RS are all
> >> running on the same box?
> I that a license for a separate SQL Server? Does this mean use 3 boxes?
> One for the web front, one for MS SQL and one for MS SQL with RS?

Wednesday, March 7, 2012

RS Memory Leak?

I am testing the SQL Web Reporting Services and noticed that the memory
usage of sqlservr.exe and w3wp.exe remain at a high level even though all
the client applications were closed. Is this a known issue? Is there a fix?
Thanks.
FabianThe two exe's you mention have nothing directly to do with Reporting
Services. Reporting Services is an asp.net application that uses SQL Server
as an object store.
Here is a good article about how SQL Server manages memory:
http://support.microsoft.com/default.aspx?scid=kb;en-us;321363
An excerpt from the article:
>>>>>>>>>>
When you start SQL Server, SQL Server memory usage may continue to steadily
increase and not decrease, even when activity on the server is low.
Additionally, the Task Manager and Performance Monitor may show that the
physical memory available on the computer is steadily decreasing until the
available memory is between 4 to 10 MB.
This behavior alone does not indicate a memory leak. This behavior is normal
and is an intended behavior of the SQL Server buffer pool.
By default, SQL Server dynamically grows and shrinks the size of its buffer
pool (cache) depending on the physical memory load reported by the operating
system. As long as enough memory is available to prevent paging (between 4 -
10 MB), the SQL Server buffer pool will continue to grow. As other processes
on the same computer as SQL Server allocate memory, the SQL Server buffer
manager will release memory as needed. SQL Server can free and acquire
several megabytes of memory each second, allowing it to quickly adjust to
memory allocation changes.
>>>>>>>>>>>
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Fabian Cevallos" <fcevallos@.bellsouth.net> wrote in message
news:Ow$lZ6w3EHA.3820@.TK2MSFTNGP11.phx.gbl...
>I am testing the SQL Web Reporting Services and noticed that the memory
>usage of sqlservr.exe and w3wp.exe remain at a high level even though all
>the client applications were closed. Is this a known issue? Is there a
>fix? Thanks.
> Fabian
>|||Thanks for the link. It provided good information.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%230TWWmz3EHA.404@.TK2MSFTNGP10.phx.gbl...
> The two exe's you mention have nothing directly to do with Reporting
> Services. Reporting Services is an asp.net application that uses SQL
> Server as an object store.
> Here is a good article about how SQL Server manages memory:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;321363
> An excerpt from the article:
>>>>>>>>>>
> When you start SQL Server, SQL Server memory usage may continue to
> steadily increase and not decrease, even when activity on the server is
> low. Additionally, the Task Manager and Performance Monitor may show that
> the physical memory available on the computer is steadily decreasing until
> the available memory is between 4 to 10 MB.
> This behavior alone does not indicate a memory leak. This behavior is
> normal and is an intended behavior of the SQL Server buffer pool.
> By default, SQL Server dynamically grows and shrinks the size of its
> buffer pool (cache) depending on the physical memory load reported by the
> operating system. As long as enough memory is available to prevent paging
> (between 4 - 10 MB), the SQL Server buffer pool will continue to grow. As
> other processes on the same computer as SQL Server allocate memory, the
> SQL Server buffer manager will release memory as needed. SQL Server can
> free and acquire several megabytes of memory each second, allowing it to
> quickly adjust to memory allocation changes.
>>>>>>>>>>>
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Fabian Cevallos" <fcevallos@.bellsouth.net> wrote in message
> news:Ow$lZ6w3EHA.3820@.TK2MSFTNGP11.phx.gbl...
>>I am testing the SQL Web Reporting Services and noticed that the memory
>>usage of sqlservr.exe and w3wp.exe remain at a high level even though all
>>the client applications were closed. Is this a known issue? Is there a
>>fix? Thanks.
>> Fabian
>>
>|||Could this be related to article 885268?
I'm experiencing the same problem.
-Bill
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%230TWWmz3EHA.404@.TK2MSFTNGP10.phx.gbl...
> The two exe's you mention have nothing directly to do with Reporting
> Services. Reporting Services is an asp.net application that uses SQL
Server
> as an object store.
> Here is a good article about how SQL Server manages memory:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;321363
> An excerpt from the article:
> >>>>>>>>>>
> When you start SQL Server, SQL Server memory usage may continue to
steadily
> increase and not decrease, even when activity on the server is low.
> Additionally, the Task Manager and Performance Monitor may show that the
> physical memory available on the computer is steadily decreasing until the
> available memory is between 4 to 10 MB.
> This behavior alone does not indicate a memory leak. This behavior is
normal
> and is an intended behavior of the SQL Server buffer pool.
> By default, SQL Server dynamically grows and shrinks the size of its
buffer
> pool (cache) depending on the physical memory load reported by the
operating
> system. As long as enough memory is available to prevent paging (between
4 -
> 10 MB), the SQL Server buffer pool will continue to grow. As other
processes
> on the same computer as SQL Server allocate memory, the SQL Server buffer
> manager will release memory as needed. SQL Server can free and acquire
> several megabytes of memory each second, allowing it to quickly adjust to
> memory allocation changes.
> >>>>>>>>>>>
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Fabian Cevallos" <fcevallos@.bellsouth.net> wrote in message
> news:Ow$lZ6w3EHA.3820@.TK2MSFTNGP11.phx.gbl...
> >I am testing the SQL Web Reporting Services and noticed that the memory
> >usage of sqlservr.exe and w3wp.exe remain at a high level even though all
> >the client applications were closed. Is this a known issue? Is there a
> >fix? Thanks.
> >
> > Fabian
> >
> >
>

Saturday, February 25, 2012

RS creates Active Sessions too easily

Problem: Can't run a script to test reports over night without running out
of memory because too many Active Sessions are being generated.
We have a Reporting Service test utiltiy that we are trying to run over
night. It gathers up all the possible parameter combinations and runs all of
these. The trouble is the number of Active Sessions increases by one for
each report and eventually the server fails. We added the ability to
generate a script when the test utility runs.
The .rss is compiled and ran against a single rs instance, still a new
session for every report render.
This is the same report getting rendered over and over, just with different
parameters.
Running the same report with the same parameters doesn't generate new Active
Sessions.
Running the reports from the RS Manager, I can change the parameters and not
get an additional Active Session, but when I switch reports and switch back
I get a new Active Session, once for the new report and once again when I
switch back to the report I was just on.
My guess is that this relates to the Web Service keeping my info in Session
State, and releasing it after 10 minutes.
Anyone with any ideas what I should do? I'd like to keep my session state
to 10 minutes, this same machine is used during the day by QA.
Here's my .rss code:
Dim ParentPath As String = "/" + ReportDir
Public Sub Main()
RunReport("myReport", "c:\temp\run1.pdf", "a,b,c", "1,2,3")
RunReport("myReport", "c:\temp\run2.pdf", "a,b,c", "4,5,6")
RunReport("myReport", "c:\temp\run3.pdf", "a,b,c", "4,5,6")
End Sub
Public Sub RunReport(ByVal reportName As String, ByVal FileName As String,
ByVal ParamNames As String, ByVal ParamValues As String)
Dim objReportResult As Byte()
Dim encoding As String
Dim mimeType As String
Dim rptParamsUsed As ParameterValue()
Dim warnings As Warning()
Dim streamIDs As String()
Dim fs As FileStream
Dim Names As String()
Dim Values As String()
Dim rptParamValues As ParameterValue()
Dim Counter As Integer
If ParamNames Is Nothing Then
rptParamValues = Nothing
Else
Names = ParamNames.Split(",")
Values = ParamValues.Split(",")
ReDim rptParamValues(Names.Length - 1)
For Counter = 0 To Names.Length - 1
rptParamValues(Counter) = New ParameterValue()
rptParamValues(Counter).Name = Names(Counter)
rptParamValues(Counter).Value = Values(Counter)
Next Counter
End If
Try
objReportResult = rs.Render(ParentPath + "/" + reportName, "PDF", Nothing,
Nothing, rptParamValues, Nothing, Nothing, encoding, mimeType,
rptParamsUsed, warnings, streamIDs)
fs = new FileStream(FileName, FileMode.OpenOrCreate)
fs.Write(objReportResult, 0, objReportResult.Length)
fs.Close()
Catch e As Exception
Console.WriteLine(e.Message)
End Try
End Sub
Here's the documentation on MSRS 2005 Web Service Active Sessions:
Active Sessions
Number of active sessions. This counter provides a cumulative count of all
browser sessions generated from report subscriptions, whether they are still
active or not.
The counter is decremented as session records are removed. By default,
sessions are removed after ten minutes no activity.
Steve MunLeeuwEntered support incident, need to provide stack trace of error. Will do
tomorrow. Took about an hour to get the support incident set up...fun :)
"Steve MunLeeuw" <smunson@.clearwire.net> wrote in message
news:OhBp4jf1GHA.1040@.TK2MSFTNGP06.phx.gbl...
> Problem: Can't run a script to test reports over night without running
> out of memory because too many Active Sessions are being generated.
> We have a Reporting Service test utiltiy that we are trying to run over
> night. It gathers up all the possible parameter combinations and runs all
> of these. The trouble is the number of Active Sessions increases by one
> for each report and eventually the server fails. We added the ability to
> generate a script when the test utility runs.
> The .rss is compiled and ran against a single rs instance, still a new
> session for every report render.
> This is the same report getting rendered over and over, just with
> different parameters.
> Running the same report with the same parameters doesn't generate new
> Active Sessions.
> Running the reports from the RS Manager, I can change the parameters and
> not get an additional Active Session, but when I switch reports and switch
> back I get a new Active Session, once for the new report and once again
> when I switch back to the report I was just on.
> My guess is that this relates to the Web Service keeping my info in
> Session State, and releasing it after 10 minutes.
> Anyone with any ideas what I should do? I'd like to keep my session state
> to 10 minutes, this same machine is used during the day by QA.
> Here's my .rss code:
> Dim ParentPath As String = "/" + ReportDir
> Public Sub Main()
> RunReport("myReport", "c:\temp\run1.pdf", "a,b,c", "1,2,3")
> RunReport("myReport", "c:\temp\run2.pdf", "a,b,c", "4,5,6")
> RunReport("myReport", "c:\temp\run3.pdf", "a,b,c", "4,5,6")
> End Sub
>
> Public Sub RunReport(ByVal reportName As String, ByVal FileName As String,
> ByVal ParamNames As String, ByVal ParamValues As String)
> Dim objReportResult As Byte()
> Dim encoding As String
> Dim mimeType As String
> Dim rptParamsUsed As ParameterValue()
> Dim warnings As Warning()
> Dim streamIDs As String()
> Dim fs As FileStream
> Dim Names As String()
> Dim Values As String()
> Dim rptParamValues As ParameterValue()
> Dim Counter As Integer
> If ParamNames Is Nothing Then
> rptParamValues = Nothing
> Else
> Names = ParamNames.Split(",")
> Values = ParamValues.Split(",")
> ReDim rptParamValues(Names.Length - 1)
> For Counter = 0 To Names.Length - 1
> rptParamValues(Counter) = New ParameterValue()
> rptParamValues(Counter).Name = Names(Counter)
> rptParamValues(Counter).Value = Values(Counter)
> Next Counter
> End If
>
> Try
> objReportResult = rs.Render(ParentPath + "/" + reportName, "PDF", Nothing,
> Nothing, rptParamValues, Nothing, Nothing, encoding, mimeType,
> rptParamsUsed, warnings, streamIDs)
> fs = new FileStream(FileName, FileMode.OpenOrCreate)
> fs.Write(objReportResult, 0, objReportResult.Length)
> fs.Close()
> Catch e As Exception
> Console.WriteLine(e.Message)
> End Try
> End Sub
>
> Here's the documentation on MSRS 2005 Web Service Active Sessions:
> Active Sessions
>
> Number of active sessions. This counter provides a cumulative count of all
> browser sessions generated from report subscriptions, whether they are
> still active or not.
> The counter is decremented as session records are removed. By default,
> sessions are removed after ten minutes no activity.
> Steve MunLeeuw
>