Re: CPU usage, memory and virtual memory

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Syj wrote:
Hello,

On certain occasions, some applications can consume close to 100% cpu
usage and freeze up the machine. But some apps can consume 100% cpu,
but allow you to work on other applciations. What is the difference? Is
it the memory and virtual memory consumption? Number ofpage faults?

I am working on a multithreaded MFC application, which freezes up the
machine (when it does some computations). A look at the task manager
tells me it consumes 99% cpu and a lot of memory and virtual memory
space. I would like to make sure that when my applciation computes, it
does it as fast as possible and it does not interrupt the user from
working on other applications (all real time apps).
How do I solve the problem? Either make sure that CPU usage does not
hit say more than 70%? or let the cpu hit the maximum (so that
computation is done fast), but still does not freeze the machine.? and
what are the steps should I take to solve either of this? IS there a
better newsgroup to post this question?

As you see, I have a very weak understanding of the workings of the
operating system in this reagard. Some explanatory help in what ways
can I go in solving the current problem would benefit me.


Thank you


Review the code for calls to SetThreadPriority and/or SetPriorityClass. The machine will remain responsive to the user, even when your code wants to consume 100% of the CPU, if you lower the appropriate thread priority to BELOW_NORMAL_PRIORITY_CLASS or IDLE_PRIORITY_CLASS. The basic policy provided by the OS is that the highest priority thread gets what it wants - to the extent possible.


--
Scott McPhillips [VC++ MVP]

.



Relevant Pages

  • Re: Where to find statistics for fetched programs?
    ... I got the question how frequently programmes are fetched, ... and then how much CPU they consume. ... This in order to put together kind of a hit parade of big CPU consumers & then tackle their tuning. ... RMF can't help me while Monitor I and Monitor III provide long-term data collection about system workload and resource utilization, while covering all hardware and software components of the system. ...
    (bit.listserv.ibm-main)
  • Re: need help making shell script use two CPUs/cores
    ... That is a large amount of disk data ... When you are runing four processes on your two cpu machine ... consume a little more overhead for process scheduling. ...
    (Debian-User)
  • Where to find statistics for fetched programs?
    ... I got the question how frequently programmes are fetched, ... and then how much CPU they consume. ... This in order to put together kind of a hit parade of big CPU consumers & then tackle their tuning. ... RMF can't help me while Monitor I and Monitor III provide long-term data collection about system workload and resource utilization, while covering all hardware and software components of the system. ...
    (bit.listserv.ibm-main)
  • Re: ACCOUNT Product
    ... Keep in mind that 10% of use o CPU, consume DASD access and some gigabytes stored in you storage subsystem. ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: INFO IBM-MAIN ...
    (bit.listserv.ibm-main)
  • Re: Percentage of code executed that is user written was Re: Delete all members of a PDS that is all
    ... one application I have worked on almost 50% of its previous CPU ... the science center had pioneered a lot of performance tools in the 60s & ... transition from real storage environment to virtual memory environment ...
    (bit.listserv.ibm-main)