cpu

CPU throttling in C++

I was just wandering if there is an elegant way to set the maximum CPU load for a particular thread doing intensive calculations. Right now I have located the most time consuming loop in the thread (it does only compression) and use GetTickCount() and Sleep() with hardcoded values. It makes sure that the loop continues for a certain peri...

Some kind of task manager for JavaScript in Firefox 3?

Recently I have been having issues with Firefox 3 on Ubuntu Hardy Heron. I will click on a link and it will hang for a while. I don't know if its a bug in Firefox 3 or a page running too much client side JavaScript, but I would like to try and debug it a bit. So, my question is, is there a way to have some kind of process explorer, or...

Replicating load related crashes in non-production environments

Hi all, We're running a custom application on our intranet and we have found a problem after upgrading it recently where IIS hangs with 100% CPU usage, requiring a reset. Rather than subject users to the hangs, we've rolled back to the previous release while we determine a solution. The first step is to reproduce the problem -- but we...

Choosing a new development machine

I'm not sure how this question will be recieved here but lets give it a shot... It's time for me to get a new dev PC. What's the best choice these days? I typically have 2-3 Visual Studios open along with mail and all that stuff. Ideally I would imagine 2+ GB of RAM would be nice as my current XP box is dying. =) I hopped on the Dell ...

Feasability of GPU as a CPU?

What do you think the future of GPU as a CPU initiatives like CUDA are? Do you think they are going to become mainstream and be the next adopted fad in the industry? Apple is building a new framework for using the GPU to do CPU tasks and there has been alot of success in the Nvidias CUDA project in the sciences. Would you suggest that a ...

How to monitor the computer's cpu, memory, and disk usage in Java?

I would like to monitor the following system information in Java: current cpu usage** (percent) available memory* (free/total) available disk space (free/total) *note that I mean overall memory available to the whole system, not just the JVM I'm looking for a cross-platform solution (Linux, Mac, Windows) that doesn't rely on my own ...

Limiting CPU speed for profiling

I'm trying to optimize several bottlenecks on an application which is supposed to run on a really wide range of CPUs and architectures (some of them very close to embeded devices). The results of my profiler, however, aren't really significant because of the speed of my CPU. Is there any way (preferably under Windows or Mac OS X) to lim...

Assembly CPU frequency measuring algorithm

What are the common algorithms being used to measure the processor frequency? ...

How to do I check CPU and Memory Usage in Java?

I need to check CPU and memory usage for the server in java, anyone know how it could be done? ...

AMD 64 bit Dual Core Optimization

We have a graphics intensive application that seems to be experiencing problems on AMD 64 bit Dual Core platforms that are not apparent on Intel platforms. Running the application causes the CPU to run at 100%, in particular when using code for shadows and lighting (Open GL). Does anyone know of specific issues with AMD processors that...

Winform application profiling CPU usage / spikes . .

I have a winforms application that normally is at about 2-4% CPU. We are seeing some spikes up to 27% of CPU for limited number of times. What is the best profiling tool to determine what is actually causing this spike. We use dottrace but i dont see how to map that to exactly the CPU spikes? Appreciate the help ...

Performance comparison of current PDAs

Are there any up-to-date performance comparisons of current PDAs available online? Or comparisons of the different available CPUs? I want to buy the right PDA for developing CPU-intensive C# graphics apps (in my spare time). So far I've found: Futuremark's handheld benchmarks don't aggregate results online SpbBenchmark only has result...

What is the best way to measure "spare" CPU time on a Linux based system

For some of the customers that we develop software for, we are required to "guarantee" a certain amount of spare resources (memory, disk space, CPU). Memory and disk space are simple, but CPU is a bit more difficult. One technique that we have used is to create a process that consumes a guaranteed amount of CPU time (say 2.5 seconds ev...

How to programmatically get the CPU cache page size in C++?

I'd like my program to read the cache line size of the CPU it's running on in C++. I know that this can't be done portably, so I will need a solution for Linux and another for Windows (Solutions for other systems could be usefull to others, so post them if you know them). For Linux I could read the content of /proc/cpuinfo and parse th...

Detecting CPU architecture compile-time

What is the most reliable way to find out CPU architecture when compiling C or C++ code? As far as I can tell, different compilers have their own set of non-standard preprocessor definitions (_M_X86 in MSVS, __i386__, __arm__ in GCC, etc). Is there a standard way to detect the architecture I'm building for? If not, is there a source for...

What constitutes 'high cpu' for SQL Server

What level of CPU usage should be considered high for SQL Server? ie 80% 90% 100%? ...

On 32-bit CPUs, is an 'integer' type more efficient than a 'short' type?

On a 32-bit CPU, an integer is 4 bytes and a short integer is 2 bytes. If I am writing a C/C++ application that uses many numeric values that will always fit within the provided range of a short integer, is it more efficient to use 4 byte integers or 2 byte integers? I have heard it suggested that 4 byte integers are more efficient as ...

How do you disable the CPU window in Delphi 7

When stepping a program in Delphi 7, the CPU window sometimes pops up and then steps through that instructions. I find this an annoyance as I wish to only step Pascal Code. Does anyone know how to disable this CPU pop-up? I would not be sorry if this window never ever shows. It did not happen on Delphi 5 which was my previous IDE t...

Detecting the number of processors

How do you detect the number of physical processors/cores in .net? ...

How to restrict the CPU usage a C# program takes?

I am developing a C# program, and i have one function that consumes too much CPU. I would like to know a way to control this by code (not with any external application) and restrict the percentage of CPU usage. For example, if it uses 90% of the CPU usage, to make my app consume only a 20%, even if it becomes slower. It must be done aut...