- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Process and Memory Management
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
04-20-2006 01:23 AM
04-20-2006 01:23 AM
I have rp4440 with 11.11 installed
It had 64 GB of RAm.
Actually I want learn Process management and Memory Management.
This server has a lot of JAVA Programms running . And the CPU and Memory Utilization is always nearing 100 % .
Right I check using vmstat command
There is lot of Page in's but no page Outs and also There are lot of page faults .
Could please help what does this scenario means
And how do I find out which process cosuming more CPU / Memroy .
Also what is page faults
Please help me .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2006 03:02 AM
04-20-2006 03:02 AM
Solution1) to get sorted list of CPU consumption per process, use top command.
2) to monitor CPU on a singl process, consider sar command.
3) to check memory usage, consider using:
export UNIX95=1
ps -ef -o pid,sz,vsz,comm,args
does this answer your questions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2006 03:04 AM
04-20-2006 03:04 AM
Re: Process and Memory Management
exemple:
# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 0 4194304 0% 0 - 1 /dev/vg00/lvol2
reserve - 3304292 -3304292
memory 14465736 1696364 12769372 12%
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2006 03:58 PM
04-20-2006 03:58 PM
Re: Process and Memory Management
Thanks for your help
Firstly
What is the differnce between between vsz and sz.
does sz -- Means total size of the process in memeory
vsz --- Means total size of the process.
Also
What command optins should i use fro sar to single out a process
I normally use
ps -e -o pid,pcpu | grep "desired pid"
When i use use swapinfo -tam command
I do see that my device files are used up
So is the reason that the Pageouts are not possible
because there is no space to pageout .
Also when there is a lot of pagein's does it heavily loads the CPU,
Thanks again
Sagar Sirdesai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2006 04:05 PM
04-20-2006 04:05 PM
Re: Process and Memory Management
Awadhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2006 04:14 PM
04-20-2006 04:14 PM
Re: Process and Memory Management
1. First thing to is ask users whey so many Java processes are to be run. With some start options in java (particularly initial heap size, max heap size etc.), you can control how much memory they are using and should be using.
ps -xef | grep [j]ava will tell you what options they are starting Java with.
2. Now, to know what programs are using most of the memory/cpu do as follows.
UNIX95= ps -ef -o vsz,pid,ppid,ruser,args | sort -k1
UNIX95= ps -ef -opcpu,pid,ppid,ruser,args|sort -k1
3. Page faults keep happening. Unless their number is very high, you should not be worrying about. It happens, when processes tries to access a memory page and it;s not there. It may be paged out to swap. This is page fault. Also check swap usage. swapinfo -mat. If you have this much RAM, what are your settings for following
dbc_max_pct, dbc_min_pct, nbufs, buffpages. Also what about swapmem_on kernel setting?
In nutshell, unless you ask users to control memory usage, you would always be hitting 100% CPU, memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2006 06:35 PM
04-20-2006 06:35 PM
Re: Process and Memory Management
additionally to previous answers, if your server is intensively running java applications, you should run hpjconfig utility on it (if not yet done) in order to check that patches and system configuration is OK for java:
http://www.hp.com/products1/unix/java/java2/hpjconfig/index.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2006 08:50 PM
04-26-2006 08:50 PM
Re: Process and Memory Management
Thanks all to your answers....
Right now servers is stable . We figure out a few processes which make server task.
So we are not running them now.
Awadesh : size command looks very useful .
Please help me how do I use more effecyively.
RAC: here are the required kernel parameters.
bufpages 204800
nbuf 0 dbc_max_pct 0
dbc_min_pct 0
swapmem_on 1
Please assist and advise.
Regards
Sagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2006 09:05 PM
04-26-2006 09:05 PM
Re: Process and Memory Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2006 09:53 PM
04-26-2006 09:53 PM
Re: Process and Memory Management
thanks for the tips
One last help
Could you please help me understanding the kernel parameters .So that I can use them more appropriately .
I am aware of swapmem_on .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2006 09:58 PM
04-26-2006 09:58 PM
Re: Process and Memory Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2006 10:16 PM
04-26-2006 10:16 PM
Re: Process and Memory Management
nbuf
dbc_max_pct
dbc_min_pct
maxdsiz
maxdsiz_64
maxtsiz
maxtsiz_64
maxssiz
maxssiz
Also what are data size , test size , stack size of process .
It will be more clear if any exaple is used to explain.
Thanks again
Sagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2006 10:37 PM
04-26-2006 10:37 PM
Re: Process and Memory Management
http://docs.hp.com/en/TKP-90202/index.html
http://docs.hp.com/en/939/KCParms/KCparams.OverviewAll.html
bufpages - buffer pages setting. Buffer cache setting.
nbuf - no. of buffers. One of bufpages or nbuf needs to set. This static buffer cache setting.
dbc_max_pct - Used for dynamic buffer cahe max setting. Need to give max % of RAM that will be used as buffer cache.
dbc_min_pct - min % dynamic buffer cache. Dynamic buffer cache can expand, contract as required. With static, you set once and that memory set aside as buffer cache.
maxdsiz - data size for 32 bit programs.
maxdsiz_64 - data size for 64 bit programs.
maxtsiz - text segment size for 32 bit programs
maxtsiz_64 - text segment size for 64 bit programs
maxssiz - stack segment size for 32 bit programs.
maxssiz_64bit - stack segment size for 32 bit programs.
Every program has three segments assigned to it-data,text and stack.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 12:03 AM
04-27-2006 12:03 AM
Re: Process and Memory Management
> does sz -- Means total size of the process in memeory
> vsz --- Means total size of the process.
The man page for ps is helpful here. sz is the core image of the process measured in pages while vsz is the same measurement shown in Kbytes.
> What command optins should i use fro sar to single out a process
sar has no options for a single process (per the man page). sar measures overall kernel activity.
> I normally use
> ps -e -o pid,pcpu | grep "desired pid"
Again, the man page is very useful. You can show this information without grep:
UNIX95= ps -e -p "desired pid" -o pid,pcpu
I noticed in your example that UNIX95 was not set on the command line. If you use oprions like -o -H -C you will get an error unless UNIX95 is set. However, it is a very bad idea to set or export UNIX95 in your shell as it affects many other commands and libraries. Be sure UNIX95 is unset in your shell and always set it temporarily on the command line. You can safely set UNIX95 for all ps commands with an alias in .profile:
alias ps="UNIX95= ps"
> When i use use swapinfo -tam command I do see that my device files are used up
If you mean that the percentage of occupied space is close to 100%, then your RAM is far too small for the applications.
> So is the reason that the Pageouts are not possible because there is no space to pageout .
Pageouts only occur when processes are deactivated to make room for other processes. So this is an instantaneous measurement and does not show previous pageouts. Note that extensive use of memory mapped files can also occupy swap space. If there is no space to pageout, the processes needing more RAM will fail or crash.
> Also when there is a lot of pagein's does it heavily loads the CPU,
Pagein is actually two conditions measured as one. When a process starts for the first time, the executable file is the source and the process is 'paged in' from that file. So every program start will create pageins. If a process must be returned from swap, that will also cause pageins. There is no way to separate the count into starts versus pagein from swap.
Now pageins do not load the CPU as there is little computation beign done. But as is true for swapping of any sort, the entire system will be crippled (as far as performance) when a lot of pageouts start occuring.
You will find Glance exceedingly helpful in looking at specific processes as well as instantly determining the busiest processes (RAM, CPU, disk I/O).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2006 04:17 PM
05-07-2006 04:17 PM
Re: Process and Memory Management
I apologize for the late response.
Thanks every one for your response.
One more query I have regarding required memory for a program
With respect to a process Is it possible to find what values I need set for parameters maxdsiz, maxtsiz , maxssiz so that the process does not exit because of lack of memory.
I checked the size dommand .. But was not successful ..
Please suggest
Sagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2006 02:11 AM
05-08-2006 02:11 AM
Re: Process and Memory Management
Memory management is not simple, especially if you have to run old 32bit applications. With 64Gb of RAM, you should not have to be concerned about running out of RAM, but there are several limits imposed by addressing in 32bit programs. These limits will appear to be out of memory but the reason is due to the program itself, not the OS and available RAM.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2006 05:39 PM
05-09-2006 05:39 PM
Re: Process and Memory Management
How do I know whether a program is a bad program .. To start with I need to specify some benchmark for java process .
In my case I set values for Kernel Parameters
Asked the users to start thier builds but the builds fail with Out of Swap error.
I checked I do have swap space ..
Then I increase the value of mazdsiz and so-on till the build gets successful.
Can I find out any how the kernel values required for a java process and then set the kernel parameters accordingly
Thanks again
Sagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2006 11:27 PM
05-09-2006 11:27 PM
Re: Process and Memory Management
A bad program is one that uses massive resources such as memory and/or disk I/O without a good reason, or the resources are consumed due to mistakes in the code. Poor programming would also include a lack of requirements, that is, the programmer does not know how much memory or disk I/O is needed.
> To start with I need to specify some benchmark for java process.
Java is a complex language to analyze, partly because it can be used to generate dozens to hundreds of threads or subprograms (and hitting limits with kernel parameters such as NPROC, NFILE and threads). A lot depends on the quality of the Java support libraries which means that the Java installation must be patched to the latest level, Java 5.something at this point. See:
http://www.hp.com/products1/unix/java/?jumpid=go/java
A programmer can easily request 1000 megs of RAM when only 100 megs is needed. The above recommendations to identify such processes (using the ps command) can point out big resource problems.
> In my case I set values for Kernel Parameters
As far as limits such as maxdsiz, nproc, nfile, maxuproc, etc, they can be set to very high values to allow the programs to run, then the programmers can work on improving the code for more efficient use of system resources.
> Asked the users to start thier builds but the builds fail with Out of Swap error.
I checked I do have swap space ..
Well, all HP-UX systems have swap space, the question is how much. HP-UX is a virtual memory system so memory is a combination of RAM and swap. Once you run out of RAM, HP-UX will use the swap space. If you have 4Gb of RAM but all your programs need a total of 16Gb, then you'll need more than 12Gb of swap space. However, swap is extremely slow compared to RAM so your programs will run very slow when swapping starts. There is no fix for this except a lot more RAM. To avoid swapping, RAM should be large enough to keep swapping below 4-8 pages per second.
As far as the builds that are failing, the simplest fix is to double or triple your swap area. Use the command swapinfo -tam to identify the current usage.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2006 11:24 PM
05-11-2006 11:24 PM
Re: Process and Memory Management
Thanks all for your comments
Sagar