This is a migrated thread and some comments may be shown as answers.

Limiting CPU usage during report generation

1 Answer 250 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 24 Sep 2009, 04:13 PM
I have a customer that reports that when they render a report, the CPU on the server spikes to 100%. They are not too worried about the CPU usage in itself (it is a big report and they know it will take some time to render). But they ARE concerned that the report generation is consuming so much CPU that other interactive requests to the server cannot be quickly serviced.

Is there a way to limit the amount of CPU used or to set the thread priority to lower than normal for the thread that is servicing the render request? In .NET, I know you can set a thread's priority before starting the thread, but can it be changed once the thread has started? I am thinking that in the NeedDataSource callback for my report I could set the current thread's priority to belowNormal, but I don't know if there will be unwanted side effects. I am assuming that the thread that services the render request is a normal IIS-provided thread and that when it is done servicing the rendering request it will exit (thus, the low priority setting of the thread won't affect any other requests since the thread won't be servicing any other requests).

Has anyone tried limiting the cpu usage of a rendering request?

Thanks,
-Eric

keywords: Telerik Reporting Performance

1 Answer, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 25 Sep 2009, 03:54 PM
Hello Eric,

Generally speaking you are allowed to change the priority of a thread as long as it is alive.

In the case of the ASP.NET report viewer, the report processing is performed as part of a request which means in a thread that belongs to the IIS's thread pool. Since IIS recycles the threads, changing one thread's priority will definitely reflect on the web server as this thread will be used next time a request is pending.

Besides changing the thread's priority you can't do much more. Currently we're working on some improvements on the server part of the reporting engine that will take the report processing outside the IIS thread thus making the web server much more responsive. Once this feature is available I guess you may change the thread priority without worries for the web server's performance.

Greetings,
Svetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Eric
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Share this question
or