473,799 Members | 3,817 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1275
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.goo glegroups.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
12346
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 query my LDAP server. Does anyone have any idea how to fix this. I have tried the pagesize and the sizelimit to no avail. Please help. --- Here is my code below: --- using System;
9
10850
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 LDIFDE as a comparison I get the same results. No members means just that, an empty group. Zero means that the DirectorySearcher.SizeLimit has been exceeded....
5
13373
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 CPU usage and hang up eventually... do you have codes for this 1??? hope someone here can give me this... thanks....
10
20499
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 ConnectionGroupName for each thread, but after some time the number of connections exceeds the number of threads (I see more than thousand connection while only 100 threads are running). Thank you
5
4751
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 value of x is nearer to 0, the query speed is fast. Presently, 'LIMIT 0,10', 'LIMIT 50000,10' and 'LIMIT 100000,10' takes about 0sec, 11secs and 4mins respectively. 1) Is there anything I should do, in terms of sql statement or database design,...
6
2413
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 completed finished, the second browser jusk pick up some session variables from the first browser and process right after that. It messed up everything. I was thinking about use remote_addr, but it seems not working since we are behind the...
5
10195
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 variables in a db and then forwards them if they exist. Based upoen their status they are redirected to one of six folders. Users belonging to group A shall get access to folder A, but not B, C etc. It must be possible to limit access in this order by...
8
3175
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 The Data Segment : at the start it's size is small but as the process goes on and requires Dynamic Memory allocation, its size increases.
1
5049
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 configured by your system administrator has been reached. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in...
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9543
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10237
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10029
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7567
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.