The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-07-2006
pleaseteachmeun pleaseteachmeun is offline
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.
  #2 (permalink)  
Old 02-16-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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.
  #3 (permalink)  
Old 02-17-2006
rhfrommn rhfrommn is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2003
Location: Minnesota
Posts: 422
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.
  #4 (permalink)  
Old 02-17-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,715
Is this on a realtime system?
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:22 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0