- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Latency problem
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
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
11-16-2005 09:26 AM
11-16-2005 09:26 AM
I can't quite understand why this would be as the app runs with a lower priority than most other apps (using renice -n 10).
I would have thought that this would ensure that if any other process with a higher nice value was pending the OS would immediately switch from my app to the other app.
Memory utilisation is below 80% and I would have thought that therefore, potential delays caused by swapping memory to disk and back could be ruled out.
The only unknown factor to me is Oracle. My app heavily interacts with a particular Oracle instance which runs at a normal priority.
Still, the bottom line is that when my app is under heavy load, users experience noticeable performance degradation. The client suggested using tools like PRM or WLM, but I can't understand why these would be needed if the OS worked as expected.
One last thing, my app is always started using a shell script and piping commands. Is it possible that this could have an impact?
Many thanks for any help
Pete
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2005 10:07 AM
11-16-2005 10:07 AM
Re: Latency problem
You may have a poorly written application that requires more processors or memory.
That is however speculation. You may wish to collect some performance data to determine the actual issue.
Here is a script:
http://www.hpux.ws/system.perf.sh
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
11-16-2005 10:09 AM
11-16-2005 10:09 AM
Re: Latency problem
Think again, the nice value is only one component that the scheduler uses when comparing processes in the same scheduler class (e.g. Time-Sharing as opposed to Real-Time). Nice should really be thought of as a hint.
In general, when processes are not running, the scheduler raises their priorities and while they are running, their priorities are decreased. During execution the priority decreases linearly; during waiting the priority increases exponentially - most rapidly when the CPU load is low and least rapidly when the CPU load is high.
When a process other than the current process reaches a higher priority, the scheduler suspends the current process and starts running the process with higher process.
It's time to profile your code and determine what it is doing. The idea that you needed to (not) nice your code was a big hint that you probably should have thought of a better way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2005 10:53 AM
11-16-2005 10:53 AM
Re: Latency problem
I'm using the boost thread library for threads. My app runs as a daemon and has no UI. Think of my application as consisting of multiple concurrent threads, each of which would calculate the next move in a chess game and then wait for the opponents move.
The latency issue I was talking about was not between threads of my app, it was that when my app was running under heavy load, users of other applications on the same system would notice significant performance degradation.
So what I really need to know is and answer to this question: "How can I ensure that the threads of my process run with a priority lower than normal and behave in a way like a 'system idle' process does under Windows?".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2005 11:27 AM
11-16-2005 11:27 AM
Re: Latency problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2005 11:29 AM
11-16-2005 11:29 AM
Re: Latency problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2005 12:55 PM
11-16-2005 12:55 PM
Re: Latency problem
renice -n 10 -p [pid]
Where [pid] was the process ID of my daemon. When I look at the process using the command:
ps -elf
The nice value is shown as 30, i.e. exactly as intended.
So obviously, setting the nice value is not the correct means to ensure the process only runs when the system is otherwise idle.
What is the correct way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2005 01:41 PM
11-16-2005 01:41 PM
SolutionOne of the very first things to check because it can cause all sorts of scheduling anomalies is the timeslice tunable. If it has been set to a 1 then that could cause all sorts of strange behavior. It should be left very near 10.
It would also help to know if your threads are doing intense computation and how loaded the machine is in terms of CPU use.
One trick that you might consider is sprinkling some nanosleep()'s in your code and I'm thinking of a separate daemon that might look for heavy system usage and signal your process to make nanosleep calls and then ramp them back down as the load drops.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2005 08:29 AM
11-17-2005 08:29 AM
Re: Latency problem
Yes, each thread does intensive computing (which is why I compared it to a chess program). CPU utilisation varies but if my app is under heavy load on a test system where nothing else runs CPU utilisation (using glance) goes to close to 100%.
I like your nanosleep suggestion.
I don't understand though why I need another daemon. I really have no idea how I can work out if the system is busy or idle. But if I can determine that I suppose I could write another thread which periodically checks system load and if this is to high sets some shared variable which - if turned on - would seed nanosleep() calls into the worker threads.
What do you think?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2005 08:51 AM
11-17-2005 08:51 AM
Re: Latency problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2005 03:31 AM
11-21-2005 03:31 AM
Re: Latency problem
http://www.dbis.informatik.uni-goettingen.de/Teaching/oracle-doc/admin-guide/appb_hp.htm#i636964
Actually what we found was that to avoid obscure scheduling problems, we ended up having to run *all* processes on the server at this priority (as otherwise Oracle processes ran at a lower priority than application processes which can cause starvation of the Oracle processes).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2005 07:07 AM
11-21-2005 07:07 AM
Re: Latency problem
What I don't know how to do is how to check system load in a way that is extremely responsive and non-intrusive. Any hints?