The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
consumption memory tagger AIX 9 10-10-2008 11:34 PM
need to find the power consumption of a RX7640 server. sag71155 HP-UX 3 04-21-2008 08:56 PM
Ghost Process + CPU consumption neal.opperman SCO 1 02-14-2008 01:53 AM
Memory Consumption Commands siebeladmin HP-UX 2 07-29-2006 10:06 AM
Memory consumption of threads Fong AIX 0 08-02-2005 08:56 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-06-2006
Registered User
 

Join Date: Feb 2006
Posts: 2
CPU consumption

Hello experts,

I am writing an application in Solaris, which is supposed to work on PrimePower 650 and SunFire 440 machines. The application listens to the events raised by the Hardware and OS in /dev/log. The application listens to the messages logged into /dev/log and do some processing on them. Now, when there is a load condition occuring at /dev/log(i.e. number of messages per second ocurring at /dev/log is high), CPU consumption by my application shoots up to 50%, while my application is expected to consume not more than 1% CPU.
Now, I want to bring down the CPU consumption to 1%. Since the CPU consumtion can vary according to various CPU configurations, i have to ensure that the CPU consumption remains below 1% for low end CPUs.

Thanks in advance.

Currently to solve this problem, i am using the following technique:
1.Process is only reading 5 messages per second from /dev/log and process them. The process sleeps for rest of the time per second.
2. Every 100 messages, the process sleeps for 5 seconds.

This solution brings down the CPU consumption. On some CPU configurations, it is less than 1% CPU consumption. But on others still varies from 3-13%.

Please tell me if the processing delay technique used has some fundamental faults, or what is the correct technique of introducing processing delay for controlling CPU consumption.

Please also tell your suggestions for controlling CPU consumption. I would also appreciate , if you can redirect me to some links where i can find CPU consumption control techniques and fundamentals.

Thanks and regards.
Reply With Quote
Forum Sponsor
  #2  
Old 02-16-2006
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
This sounds like a silly requirement. Lower the priority of your process so that it is the most disfavored process on the system. And then consume all the cpu you want.
Reply With Quote
  #3  
Old 02-17-2006
Registered User
 

Join Date: Nov 2003
Location: Minnesota
Posts: 388
I agree with what Perderabo said. But if for some reason you really do need to keep it under 1%, check into the resource management features of Solaris 10. I'm not sure if you can limit cpu usage per process or not, but you should be able to find a way to make it work. If necessary you could even create a new user who owns and runs that process and limit the resources that user has access to.
Reply With Quote
  #4  
Old 02-17-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,298
Is this on a realtime system?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:13 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0