- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shared memory and swapinfo output
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
05-18-2004 03:41 AM
05-18-2004 03:41 AM
My box holds two Oracle databases whose SGAs occupy 2 GB aprox.
ipcs -ma | grep oracle
m 840707 0x7d4ba85c --rw-r----- oracle dba oracle dba 9 1061339136 27372 1620 12:52:40 13:16:25 13:23:32
m 12292 0xb87b04f4 --rw-r----- oracle dba oracle dba 49 1094467584 22456 2880 17:32:46 17:32:47 16:40:11
The problem is output of 'swapinfo -tam' doesn't show 2 GB are in use:
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol13
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol10
reserve - 2318 -2318
memory 3091 668 2423 22%
total 6163 2986 3177 48% - 0 -
As shared memory is locked memory (as found in white paper "HP-UX Memory Management" available in your box at /usr/share/doc/mem_mgt.txt) it will never be swapped out and it reduces the amount of physical memory available for other processes... Therefore, the line "memory" should print less free memory -- At least, the "MB Used" should be greater than 2GB.
Any idea ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 05:51 AM
05-18-2004 05:51 AM
Re: shared memory and swapinfo output
from this command u get only info about swapping, not about memory usage, u should use top or vmstat to see the amount memory pages used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 05:59 AM
05-18-2004 05:59 AM
Re: shared memory and swapinfo output
The "avm" should show you your average amount of memory that has been used over the last 5 minutes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 10:13 PM
05-18-2004 10:13 PM
Re: shared memory and swapinfo output
When system uses pseudo-swap is because all space in dev and fs swap is reserved. When system uses memory pages as pseudo-swap, those pages are LOCKED in memory (LOCKED means they won't be swapped out because ... there is no space in disk reserved for this pages). Then the percentage of memory free in this "memory" line is decreased. The problem is that others than swapper can LOCK memory pages and causes to decrease the free memory percentage -- some processes may call plock(), mlock() or shmctl() or other system calls to lock memory.
In my case, swapinfo tells there are 2423 MB free from a pool of 3GB, but how is it possible if 1 GB is already locked as shared memory ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 12:11 AM
05-19-2004 12:11 AM
Re: shared memory and swapinfo output
Cesare is wright, the system pretent that it has reserved swap memory, so called pseudo swap, that is because of application need of virtual memory.
Example: if there is 5 applications and they need 20 MB of additional memory each to start working (but they will not use it completely), in case you have only 70 MB virtual memory all 5 applications can't work at once because they "need" 100MB. Those 30 MB extra will be "reserved" from nonexist pseudo swap.
Regards,
Boris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 12:56 AM
05-19-2004 12:56 AM
SolutionIf you compile and run the attached C program, your memory usage will become a lot more clear. Any user can run it.
compile with cc -o meminfo meminfo.c
It may help us if you post the results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 04:38 AM
05-19-2004 04:38 AM
Re: shared memory and swapinfo output
Today I've learned that not all shared memory is locked.
I've written this little C program:
#include
#include
int main()
{
int myshmid;
myshmid = shmget (IPC_PRIVATE, 512*1024*1024, 0600);
shmctl(myshmid, SHM_LOCK, 0);
printf("sh id: %d\n",myshmid);
}
This program creates a shared memory segment whose size is 512 MB.
If shmctl() is present, swapinfo reports increments of percentage in pseudo-swap memory.
If shmctl() is removed from program, pseudo-swap memory is not changed, but reserved swap is increased in 512 MB.