Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > limit system resources for a request

Reply
Thread Tools

limit system resources for a request

 
 
Michael Per
Guest
Posts: n/a
 
      06-01-2005
Does anybody know of a best way to limit system resources (CPU/memory) for
each particular request? In my application based on user's parameters a
request may take considerable amount of time and system resources. This kind
of request may take 100% CPU and make all other requests in the queue halt.
While I don't want this request to simply time out, I'd like to limit
somehow the resources each request can allocate so one request does not halt
the whole application.

Any suggestions are greatly appreciated.

- Mike



 
Reply With Quote
 
 
 
 
Damien
Guest
Posts: n/a
 
      06-01-2005
Michael Per wrote:
> Does anybody know of a best way to limit system resources (CPU/memory) for
> each particular request? In my application based on user's parameters a
> request may take considerable amount of time and system resources. This kind
> of request may take 100% CPU and make all other requests in the queue halt.
> While I don't want this request to simply time out, I'd like to limit
> somehow the resources each request can allocate so one request does not halt
> the whole application.
>
> Any suggestions are greatly appreciated.
>
> - Mike


If the type of requests which cause 100% CPU fall into a simple, easily
identifiable category (e.g. requests from one page), then you may be
able to achieve your aim through the Async request model. This, in
combination with a low priority thread to perform the actual work would
lower your impact on other requests.

Course, then we get to how you manage your additional threads. Three
options:

1) Only 1 thread, deals with all processor intensive tasks in series.
Has the effect of serialising all such requests.
2) Launch one thread per request. Doesn't scale well when there are a
thousand requests.
3) Build a thread pool. Most complex option.

 
Reply With Quote
 
 
 
 
Michael Per
Guest
Posts: n/a
 
      06-01-2005
Damien, thank you for you response. Unfortunately they don't fall into an
easily identifiable category. It depends on user parameters and database
content. I am looking for more generic solution that I can apply on
application level to "protect" every request from monopolizing the system.

"Damien" <> wrote in message
news: oups.com...
> Michael Per wrote:
>> Does anybody know of a best way to limit system resources (CPU/memory)
>> for
>> each particular request? In my application based on user's parameters a
>> request may take considerable amount of time and system resources. This
>> kind
>> of request may take 100% CPU and make all other requests in the queue
>> halt.
>> While I don't want this request to simply time out, I'd like to limit
>> somehow the resources each request can allocate so one request does not
>> halt
>> the whole application.
>>
>> Any suggestions are greatly appreciated.
>>
>> - Mike

>
> If the type of requests which cause 100% CPU fall into a simple, easily
> identifiable category (e.g. requests from one page), then you may be
> able to achieve your aim through the Async request model. This, in
> combination with a low priority thread to perform the actual work would
> lower your impact on other requests.
>
> Course, then we get to how you manage your additional threads. Three
> options:
>
> 1) Only 1 thread, deals with all processor intensive tasks in series.
> Has the effect of serialising all such requests.
> 2) Launch one thread per request. Doesn't scale well when there are a
> thousand requests.
> 3) Build a thread pool. Most complex option.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some shareware has a time limit and the software will not work after the time limit has expired. anthony crowder Computer Support 20 01-16-2007 10:01 AM
py2app question: Resources/Python -> Resources/lib/python2.4 Russell E. Owen Python 0 09-08-2006 08:08 PM
c program, file size limit, how to solve? 2G bytes limit. guru.slt@gmail.com C++ 1 06-27-2005 11:05 PM
Re: Accessing Request.InputStream / Request.BinaryRead *as the request is occuring*: How??? Brian Birtle ASP .Net 2 10-16-2003 02:11 PM
System.Web.HttpException: Request timed out - [HttpException (0x80004005): Request timed out.] Steve ASP .Net 0 07-01-2003 12:11 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57