- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Understanding HP-UX memory usage
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
06-11-2005 04:29 AM
06-11-2005 04:29 AM
On one of our ia64 11.23 DB boxes, I see the sum of the 'sz' column in 'ps -elf' (with 4096b pagesize) amounts to 4.4gb for all processes in the process table. I calculated that total by multiplying the ps numbers by 4096 and then summing them. My measurements do not agree with the man page, which says pagesize is _SC_PAGE_SIZE from unistd.h (3001 bytes). I wrote the attached simple C program to test via malloc + memset. I run the program, which mallocs and memsets the memory, and the sleeps long enough to let me look at the 'ps -elf' number. Empirically, the pagesize seems to be obviously 4096 (vs. unistd.h _SC_PAGE_SIZE = 3001). What am I missing?
Second, the box has a total of 16gb of RAM. Glance GBL_MEM_UTIL says it is 80% consumed. dbc_max_pct is 20% (3.2gb). If ps says 4.4gb is being used, and 3.2gb is allocated for the OS buffer cache, that leaves 16gb - 4.4gb - 3.2gb = 8.4gb unaccounted for. If pagesize is 3001 and not 4096, then even more memory is unaccounted for. How do I find it?
Thanks,
Ed
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2005 06:56 AM
06-11-2005 06:56 AM
SolutionBill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2005 07:27 AM
06-11-2005 07:27 AM
Re: Understanding HP-UX memory usage
Glance says 16gb of RAM is 80% exhausted, with 2.9gb "free", and 3.2gb in dynamic buffer cache. My database server is asking for 110MB in shared memory at start-up, but won't start because of memory shortage. My DB server definitely demands more than shared memory alone. But it's difficult to conjecture my DB server is asking for 2.9gb or more in total memory (shared libs, memory-mapped files, etc). What gives? Must I assume the sumtotal of the DB server request exceeds 2.9gb??
As a rule of thumb, what percentage of physical RAM, as reported by glance, should I expect to be able to use?
Thanks,
Ed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2005 01:31 PM
06-11-2005 01:31 PM
Re: Understanding HP-UX memory usage
$ getconf _SC_PAGE_SIZE
4096
I think that your buffer cache is too large. With 16G of RAM you should look into changing the buffer cache size to 800M or 1G maximum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2005 02:10 PM
06-11-2005 02:10 PM
Re: Understanding HP-UX memory usage
Now database apps are notorious for not telling you anything useful about memory problems. If the app is 32bits, the max local data area is just under 1Gb. Recompile for EXEC magic (cc options -Wl -N) and the program can reach about 1700 megs. Use chatr to set +q3p enable (2700 megs) and +q4p enable (3700 megs). Or recompile the app as a 64bit program and local data is unlimited (well, multiple terabytes of RAM).
Use ipcs -bmop to look at shared memory allocation. And note that the above recommendations are for PA-RISC 11i machines which may not translate 100% for ia64 at 11.23. Of course, the maxdsiz/maxdsiz_64 values (for local data) and shmmax values in the kernel must allow the program to grab lots of data. Otherwise, it will say it can't get more than 100 megs of local or shared memory (because of the kernel fences).
I would agree that the buffer cache is far too large. 500-900 megs is all you need, less if your DBA uses record buffering in SGA. That will likely not change your database program's problem. Also look at ulimit -a (specifically ulimit -d) to make sure the shell environment allows for large memory.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2005 10:11 AM
06-12-2005 10:11 AM
Re: Understanding HP-UX memory usage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2005 12:01 PM
06-12-2005 12:01 PM
Re: Understanding HP-UX memory usage
I've attached a small C program that demonstrates how much memory a program can obtain from your system depending on how it is compiled. If you have lots of swap space (16Gb or more), the 64bit version of this program may grab more than 20Gb with no problem. Don't worry, the program doesn't write anything so the RAM is just reserved and won't cause active programs to page out. All memory is returned when the program terminates. It is lots of fun to watch this program using Glance. Be sure to compile and chatr it each of the ways shown in the comments to see how even a 32bit program can grab almost 4Gb. Note also that settings for ulimit (shell), maxdsiz and maxdsiz_64 (kernel) will limit the program.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2005 12:06 PM
06-12-2005 12:06 PM
Re: Understanding HP-UX memory usage
Bill Hassell, sysadmin