cancel
Showing results for 
Search instead for 
Did you mean: 

TOP command result analysis

SOLVED
Go to solution
CA1452717
Occasional Advisor

TOP command result analysis

Hi Experts,

I have 8 GB physical memory and 18 GB SWAP in my HPUX 11.23 Itanium box. But when I check in top command I didn't find 18 GB + 8 GB at all.

Can some genius help me to understand the top command result. I have attached the top command screen shot.

many thanks in advance for your valuable time and suggestion.

Thanks,

Vaibhav
9 REPLIES
Dennis Handly
Acclaimed Contributor

Re: TOP command result analysis

If you want accuracy, use glance.
Otherwise top(1) says: Memory Data
Includes virtual and real memory in use (with the amount of memory considered "active" in parentheses) and the amount of free memory.

You can also look at "swapinfo -tam".
CA1452717
Occasional Advisor

Re: TOP command result analysis

Thanks Dennis for your suggestion.

However, one of the vendor's application will stuck at some point of time mentioning insufficient memory. When we contacted them, they are firm that your top command says that there is an issue with memory and system is unable to use full memory.

Any guesses. I have enclosed swapinfo -tam output for your reference.
Don Morris_1
Honored Contributor

Re: TOP command result analysis

Then kindly inform them that (as the man page states), top reports the Virtual and Real memory in use by processes and the system free memory. At the time of your screen shot, your processes were only using 1,099,752Kb of virtual address space (just over 1Gb) and the system had over 4Gb of free memory.
You don't see your 24Gb of virtual address space possible (not all the 8Gb of RAM is available as virtual address space) simply because the user space processes aren't using that much. There is no indication of a low memory condition here, nor is there any sign that the system isn't using the full memory. (Only that user processes aren't consuming it all at this time, which is very normal - especially since at the time of the screen shot, the load looks very light).

There _could_ be a low virtual address space condition if the swap was reserved via other paths (such as almost all swap being memory swap and almost all of that being kernel consumption, but that's more than a bit unlikely with 4Gb free). Still, the swapinfo output is also needed to establish that there is no virtual memory lack on the system (and your output shows 21.8Gb or so available for reservation, so there certainly is not at this time, anyway).

If/when the application issue happens again (is it reporting a clear error number that you know of? Is it ENOMEM? Is there any indication of what system call it may have been using [malloc? mmap?])? It is certainly possible (in fact likely) that what is really going on here is that they've hit maxdsiz and hence their application rlimit/ulimit on data or stack and there's no resource issue with the system as a whole at all.
Dennis Handly
Acclaimed Contributor

Re: TOP command result analysis

>one of the vendor's application will stuck at some point of time mentioning insufficient memory.

What is maxdsiz?
kctune | grep maxdsiz

>they are firm that your top command says that there is an issue with memory and system is unable to use full memory.

What were the particular fields in top they didn't like? How much memory does the application need?

>I have enclosed swapinfo -tam output

This says you have 21.8 Gb swap and 6 Gb memory free. If you need much more than 6 Gb, you will start to page.
CA1452717
Occasional Advisor

Re: TOP command result analysis

Hi Don,

Thanks for your detailed information. Which indeed is helpful to understand the "top".

I have also attached the error screen shot which has given vendor to create an issue mentioning top result. But now I will talk to them and make them understand as well.

Hello Dennis,

Thanks to you too for your inputs.

I have attached kctune result output for your reference.

Thanks,

Vaibhav
Dennis Handly
Acclaimed Contributor
Solution

Re: TOP command result analysis

>I have also attached the error screen shot which has given vendor to create an issue mentioning top result.

It seems the vendor is correct. The error says it wants 7.19 Gb.

>I have attached kctune result output for your reference.

This says the current maxdsize_64bit is 4 Gb.

You need to increase it to 8 Gb:
kctune maxdsiz_64bit="8*0x40000000"

You may need more RAM if your performance is poor.
CA1452717
Occasional Advisor

Re: TOP command result analysis

Thanks Dennis,

So as a conclusion first I will tune the kernal and check the performance.

By the way what is kctune will do in terms of system performance.

Regards,
Vaibhav
Dennis Handly
Acclaimed Contributor

Re: TOP command result analysis

>By the way what is kctune will do in terms of system performance.

Nothing directly. It is basically a policeman that stops memory pigs or runaway programs.

By raising the limit, you run a risk of these bad programs bringing the system to its knees.

Of course if you only run this good app, then you don't have to worry, unless it wants lots more than the memory you have.
CA1452717
Occasional Advisor

Re: TOP command result analysis

Thanks everyone. My problem has been solved after I modified KERNAL parameter recommended by Dennis and also patch sets have been updated to latest.

I am closing this thread. All the best.

Vaibhav