1825759 Members
2217 Online
109687 Solutions
New Discussion

Memory analyze

 
SOLVED
Go to solution
memoud
Occasional Advisor

Memory analyze

Hi
With RX7620 4GB, 1 partition
top command shows me:
Memory: 218796K (95308K) real, 358004K (180620K) virtual, 970136K free Page# 1/1

Where is the rest of memory?
Somebody can explain me this output ?
Thanks All
Mem
12 REPLIES 12
Rasheed Tamton
Honored Contributor

Re: Memory analyze

Hi,

>Memory: 218796K (95308K) real, 358004K (180620K) virtual, 970136K free Page# 1/1

Memory: 218796K (Total physical memory in the system DEDICATED to text, data or stack segments for all processes on the system)

(95308K) real: (Total physical memory for runnable processes, as opposed to sleeping processes)

358004K : (Total memory dedicated to text, data or stack segments for all processes on the system. Some of this is paged out to disk (that is, not all of this is in current physical memory)


(180620K) virtual: (Total memory for runnable processes, as opposed to sleeping or stopped processes)

970136K free: (Physical memory the system considers to be unused and available to new processes)

So you have got 947MB free.

If you want more, just give the swapinfo -tam and glance -m (footer) output.

Rgds.
memoud
Occasional Advisor

Re: Memory analyze

Hi Rasheed
Thanks for you reply.
glance not installed
swapinfo -tam :

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
reserve - 237 -237
memory 4075 881 3194 22%
total 8171 1118 7053 14% - 0 -

My problem is : with no charge, and 4 GB, we have just 947MB free ?? it's normal ?

Regards
mem
Rasheed Tamton
Honored Contributor

Re: Memory analyze

Hi mem,

Just give the output of

kctune|grep dbc

may be you are allocating 50% of RAM to buffer cache.

UNIX95= ps -e -o ruser,vsz,pid,args | sort -rnk2|more (calculate the total and see how much memory your processes are using).

If you are still confused, and suspect a memory leak, get a reboot, and just start the OS only and see how much memory left without using any application/db, etc.

rgds.
memoud
Occasional Advisor

Re: Memory analyze

Hi Rasheed
After reboot, same thing

# kctune |grep dbc
dbc_max_pct 50 Default Immed
dbc_min_pct 5 Default IAmmed

Help please
Thanks
Mem
Bill Hassell
Honored Contributor

Re: Memory analyze

> # kctune |grep dbc
> dbc_max_pct 50 Default Immed
> dbc_min_pct 5 Default IAmmed

These are the (bad) defaults. Change dbc_max_pct to 20. Note that top is very difficult to use as a memory reporter. The only thing you need to concerned about is vmstat, specifically the po (page out) column. If this is 0 to 9 (single digits) most of the time, you have plenty of memory. 2 digits (10-99) is a concern because swap is being used. This can impact your applications. 3 digits or more has a major impact on performance. You'll need a lot more RAM (double or triple).

Are you having performance problems or are there programs that abort as out of memory?


Bill Hassell, sysadmin
Asif Sharif
Honored Contributor

Re: Memory analyze

Hi Memoud,
See the response regarding kmeminfo in the following thread.
http://forums12.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1213463617046+28353475&threadId=1214356

Regards,
Asif Sharif
Regards,
Asif Sharif
memoud
Occasional Advisor

Re: Memory analyze

Hi Bill
Thnks for replies
I changed dbc_max_pct from 50 to 20 and vmstat
(free) change from 391598 to 515087.
vmstat/po still 0.
My main problem is to know where is my 4GB of memory.
for example, SAM shows :
Physical Memory: 4078.9 MB
Real Memory:
Active: 109753.2 KB
Total: 243341.0 KB
Virtual Memory:
Active: 186099.4 KB
Total: 398106.3 KB
Free Memory Pages: 511568 at 4 KB/page
Swap Space:
Avail: 4096 MB
Used: 253 MB

What does means ?

Rgds
Memoud
Asif Sharif
Honored Contributor

Re: Memory analyze

Hi Memoud,

Did you see the thread which i posted? run kmeminfo and it will show you detailed memory information.

Regards,
Asif Sharif
Regards,
Asif Sharif
Asif Sharif
Honored Contributor

Re: Memory analyze

HI Memoud,

See the Technical knowledge base - document
How to account for memory usage on an HP-UX system?
http://www12.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c01011582-5

Regards,
Asif Sharif
Regards,
Asif Sharif
memoud
Occasional Advisor

Re: Memory analyze

Hi Asif
Thanks, for your help
(see attached result of kmeminfo & memdetail)

Two new différents results (sam/top/kmeminfo/memdetail/vmstat etc..)

Very big confusion !!

I try read Technical knowledge base - document

Bests regards
Memoud
Don Morris_1
Honored Contributor
Solution

Re: Memory analyze

I don't understand what you're confused about.

Look, from your prior comments you've set dbc_max_pct to 20. Assuming you left dbc_min_pct to 5, that means that the system will use between 5% to 20% of total memory for buffers in the buffer cache to improve performance. 20% if there is more than enough free memory that it would be sitting around idle, and down to 5% *when there is memory pressure*. 25% of memory free (or 50% in this output) is not memory pressure. (Closer to 1% free). Idle RAM is wasted RAM.

So -- according to the first output, your kernel is consuming around 20% for kernel dynamic data and another 20% for DBC. Since you told it it could, that's to be expected. (Obviously there's actually some buffered I/O going on to generate these). 50% or so of the memory is free, and the remaining 10% of the memory is User (7%) or Static system.

Within the 20% of the kernel dynamic memory allocations since you chose to break it down -- 4% is in the superpage cache of the kernel [free kernel dynamic memory pages which are subsets of large page kernel translations for improved Translation Lookaside Buffer (TLB) performance -- if you can access multiple kernel addresses without causing a TLB miss fault on the processor, you get better performance. These will be used for new allocations or returned to the system when entirely free (if Garbage Collection runs... which it _won't_ with this much memory laying around. Again, HP-UX favors actually using your memory for performance until you need it for something else.] Another 3% is in metadata needed for the buffer cache... the rest (11%) is split across general metadata and other stuff needed for the kernel to support what you're doing, but dominated by VxFS related metadata -- so I have to assume you're doing a bunch of read/write operations across one or more (probably large) file systems... hence you cause the kernel to allocate file system metadata, buffers for the read/writes, etc...

This all looks perfectly normal and fine. If you started putting an actual load on the box such that the User component rises and free memory goes down to 1%, memory will be reclaimed from the Buffer Cache, kernel garbage collection will run as needed, etc. to flush some of these performance enhancing caches to get you memory for your user space activities.
Chuck Ciesinski
Honored Contributor

Re: Memory analyze

Memoud,

If you search the archives of Encompassus, you may find Bill Hassell's earlier performance guidelines. Additionally, Steve Cuillo, another HP-UX performce guru posted his perfomence notes from last years HP TEch Forum there. One last item you may want to download is an HP white paper on the most mis-configured kernel paramaters. the two most mentioned in this thread are among the most mis-configurede there are.


Chuck Ciesinski
"Show me the $$$$$"