473,395 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

limit system resources for a request

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

Nov 19 '05 #1
2 1256
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.

Nov 19 '05 #2
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" <Da*******************@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr 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.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Big Dave | last post by:
Hello All, I was wondering wether anyone could help me solve what is probably a very easy issue. I keep getting this damn "The administrative limit for this request was exceeded" whenever I try to...
9
by: Terry E Dow | last post by:
Howdy, I am having trouble with the objectCategory=group member.Count attribute. I get one of three counts, a number between 1-999, no member (does not contain member property), or 0. Using...
5
by: tracernet_v2 | last post by:
good day... i noticed that when moving 750mb (multiple) files, it only used about 20% of the CPU usage... i thought i could also do this 1 to my application, so that it wont eat up much of my...
10
by: Basel | last post by:
Hi All, I'm opening a number of threads, and each thread generates http requests using HttpWebRequest. How to make each thread open only 1 connection ? I tried to set a unique...
5
by: - | last post by:
I have only 1m records in my database running on a laptop of speed 1.6GHz, memory 512MB ram, and Toshiba MK8032GAX hard disk. I use 'LIMIT x,10' for the query to utilise record paging. When the...
6
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am thinking about doing this since I got several cases that some of our internal users open more than one browser at the same time from our server. When one of the transactions was not...
5
by: Nosferatum | last post by:
I am in need of a solution on how to solve this problem: I need to limit access to six different folders. My users are validated in a system which check their prescence with a couple of...
8
by: Nehil | last post by:
When a process is started three segments are created : 1) Text. 2) Stack. 3) Data. The size of First two is fixed and their upperlimit is fixed by the compiler. (Plz correct if i'm wrong) Now...
1
by: Tiger Boon | last post by:
Anyone knows how to overcome the following problem? And also, I belive Crystal Report has a limit of 75 print job. How do we check the current usage? The maximum report processing jobs limit...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.