- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: What's the reason program uses too much realti...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2006 12:42 AM
07-17-2006 12:42 AM
What's the reason program uses too much realtime CPU?
int pmin = sched_get_priority_min(schedPolicy);
int pmax = sched_get_priority_max(schedPolicy);
threadParam.sched_priority = pmin + (pmax - pmin)/2;
pthread_attr_setschedparam(&threadAttr,&threadParam);
pthread_create(&thrId,&threadAttr,__run,(void*)this);
After thread started, there is no program to modify priority.
While process running, realtime CPU became so high and also block all the other processes.
Sec Alive Process User Interest Stop SysCall Normal Nice RealTm CSwtch Intrpt Logl Logl Phys FileIO VM System IO Byte Res Virtual Thread Pri DskSubsys Sem LAN Memory
Date Time /Intvl Intvl PID Name Name Pri Reason Reason CPU % CPU % CPU % CPU % CPU % CPU % CPU % Rd Rt Wr Rt IO Rt Rate IO Rt IO Rt Rate Mem Memory Count Wait % Wait % Wait % Wait % Wait %
07/12/06 16:07 60 60.13 5532 notifier mzou 65520 C SLEEP 100.02 0.00 0.00 0.00 99.28 0.01 0.73 0 0 0.4 0.4 0.0 0.0 4.2 5600 9064 3 0.00 0.00 0.00 0.00 0.00
07/12/06 16:08 60 60.10 19480 java innopath 168 DM SLEEP 0.04 0.00 0.00 0.00 0.00 0.01 0.04 113 0 6.3 1.4 0.0 4.9 22.8 198656 797696 101 0.01 0.00 0.00 0.00 0.00
07/12/06 16:08 60 60.10 24363 java innopath 220 C M PRI 8.52 1.00 7.00 0.00 0.00 0.01 0.51 532 0 0.1 0.1 0.0 0.0 1.5 311296 761856 60 0.09 0.00 0.00 0.00 0.00
07/12/06 16:08 60 60.10 24747 java navis 168 M SLEEP 0.08 0.00 0.00 0.00 0.00 0.00 0.08 0 1 0.3 0.3 0.0 0.0 2.9 82944 704512 41 0.01 0.00 0.00 0.00 0.00
07/12/06 16:08 60 60.10 5532 notifier mzou 65520 C SYSTM 100.52 0.00 0.00 0.00 99.88 0.01 0.63 0 0 0.2 0.2 0.0 0.0 2.6 5600 9064 3 0.00 0.00 0.00 0.00 0.00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2006 12:49 AM
07-17-2006 12:49 AM
Re: What's the reason program uses too much realtime CPU?
Lots of possible reasons a proram uses too much cpu.
Not in any order
1) Nothing else on the system needs cpu, which means if nothing else needs it the program that requests cpu gets cpu.
2) A poorly written program is binding itself to the CPU or otherwise hogging resources.
3) The NICE priority on the program is a low number giving it a high priority relative to other processes.
Just a samping.
Bad code need to be dealt with by programmers or app vendors.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2006 01:01 AM
07-17-2006 01:01 AM
Re: What's the reason program uses too much realtime CPU?
CPU(%) 100.0
SysCall(%) 0.00
Normal(%) 0.00
Nice(%) 0.00
RealTm(%) 99.28
CSwtch(%) 0.01
Intrpt(%) 0.73
some ducoment says "Running at a realtime priority means that the process has run using the rtprio command or the rtprio system call to alter its priority."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2006 01:41 AM
07-17-2006 01:41 AM
Re: What's the reason program uses too much realtime CPU?
Oz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2006 01:44 AM
07-17-2006 01:44 AM
Re: What's the reason program uses too much realtime CPU?
I was told many years ago to not renice processes in modern systems - this was a long time ago, so I must be getting very old :-(
Some programs though, I've seen by default, renice themselves - and as a result cause context switching as we see here.
Make sure that the processes are all the default nice value (quick check in top should show them all as 20).
All your system is doing, is using all it's CPU time, trying to give your notifier program extra CPU time. Change its nice value to be 20 and it should all work fine.