[hobbit] Important ! HP-UX and the memory utilisation

thomas.seglard.enata at cnp.fr thomas.seglard.enata at cnp.fr
Fri Jul 28 20:04:37 CEST 2006


Hello,

with your help I'm beginning to understand !! It's very difficult to 
determine the true memory usage on hpux...

I'm confusing with the fact that every process on hpux will reserve a 
maximum space of memory on "swapdisk". So, it's normal on hpux to have a 
high percentage of swap space used even when server have a very little 
amount of applications running. But, it's a problem when disk is swapping continuously (you can see that with the "pi" and "po" metrics on vmstat 
output, right ?). 

The other point is the weird behaviour of the system memory ( = main 
memory = physical memory = RAM ?). This memory is used as a part of the swap space if you activate an operating-system parameter : swapmem_on (by defautl is set to 1). At this time, the part of the system memory embedded in the swap space is called "pseudo-swap". In the HP documentation, I read that only three-quarters of the system memory could be used into swap 
space. Thus, I don't understand why I'm getting 16372M available on the 
"memory" line from my "swapinfo" output ?! From what HP says I would only have 12G available for the pseudo-swap ! My system has 16Go of physical 
memory or RAM.

As I wrote before, the main problem is the amount of "reserved" memory 
because it's a max value ! So, the values indicated by "swapinfo" are 
bigger than the actual memory used by the system. Look at this new output :

psd216:~# swapinfo -tm
                   Mb          Mb          Mb        PCT     START/ Mb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev               24000     973         23027    4%       0       -    1 
/dev/vg00/lvol2
reserve       -           9876      -9876
memory  16372    4764      11608   29%
total             40372    15613    24759   39%       -       0    -

In fact, only 5737M (4764+973) of swap space is actually used. That 
corresponds to 14% of the total swap space. In case of troubles or 
necessity, processes COULD require a maximum value of 9876M taken from the reserved memory. In this case, you will have a swap space full at 39%... Am I right on this point ?

I'm so sorry to make such troubles for nothing but I want to understand 
how memory management works on hpux !! 
Thanks again for all your patience and help ! 
Best regards,

Thomas

Here is some very useful documentation : 

http://www.docs.hp.com/en/5965-4641/ch01s09.html#d0e4274

http://unix.ittoolbox.com/groups/technical-functional/hp-ux-l/swap-511113#

http://www.math.ntnu.no/~perhov/public/unix/memory.html




"lars ebeling" <lars.ebeling at leopg9.no-ip.org> a écrit sur 28/07/2006 
07:16:42 :

> Hi,
> 
> From hpux-meminfo you get the 95% = (Total-Free)/Total . When you start > HP-UX memory is used for "swapping" (up to 75%) and that is included in > (Total-Free). This is called pseudo-swap. This is controlled by the 
> kernelparameter swapmem_on. By default it's on (=1).
> 
> Memory used by processes should be 16372 - 212 - 4770
> 
> 29% of your memory is used for pseudo-swap.
> 30% of your swapdisk is used.
> 
> Everytime when a process is started space on you swapdisk is reserved, 
so 
> that the process won't run out of swapspace when it's needed.
> 
> Total Available swap = Available memory + Available swapdevice
> Total Used swap = Used memoryswap + Used deviceswap + Reserved 
deviceswap
> 
> More confused now???
> 
> Regards
> Lars Ebeling
> 
> ----- Original Message ----- 
> From: <thomas.seglard.enata at cnp.fr>
> To: <hobbit at hswn.dk>
> Sent: Thursday, July 27, 2006 2:46 PM
> Subject: Re: [hobbit] Important ! HP-UX and the memory utilisation
> 
> 
> Hello,
> 
> Thanks for your explanation ! I'm sorry to insist but it's a bit hard to
> understand. I think the true problem is the "reserved" memory. It's a
> maximum value and may not be used totally. For me, the real information is 
> on the first line and given by the swapdisk. In my example, I got a 
total of 
> 24G for swapping (also called paging by HP) and only 23% is used.
> Moreover, to determine the total physical memory used, a little script
> called "hpux_memory" is launched. I got very different results between
> this script and "swapinfo -Mm" :
> 
> bash-3.00$ ./hpux-meminfo
> Total:16372
> Free:212
> 
> So, on my hobbit display I got percentage of memory utilisation > 95%
> whereas I got 29% with the other command !! Where is the truth ?!
> 
> bash-3.00$ /usr/sbin/swapinfo -Mm
>             Mb         Mb         Mb        PCT
> TYPE      AVAIL    USED    FREE  USED
> memory  16372   4770     11602     29%
> 
> For the swap or paging memory, "swapinfo -dm" :
> 
> bash-3.00$ /usr/sbin/swapinfo -dm
>              Mb      Mb      Mb   PCT              Mb
> TYPE      AVAIL    USED    FREE  USED   START RESERVE  PRI  NAME
> dev       24000    7264   16736   30%       0       -    1 
/dev/vg00/lvol2
> 
> I got several servers with two or more swapdisks, so this command may be
> launched :
> 
> psu106:/# /usr/sbin/swapinfo -dtm
>              Mb      Mb      Mb   PCT              Mb
> TYPE      AVAIL    USED    FREE  USED   START RESERVE  PRI  NAME
> dev        8192    4906    3286   60%      0            -    1
> /dev/vg00/lvol2
> dev        8192    4908    3284   60%      0            -    1
> /dev/vg00/lvol3
> dev        6144    5735     409   93%       0           -    0
> /dev/vg_swap/lv_swap01
> total     22528   15549    6979   69%           -    0  -
> 
> If you can explain me where I'm wrong I would greatly appreciate ! 
Thanks 
> again !
> Sincerly,
> 
> Thomas
> 
> "lars ebeling" <lars.ebeling at leopg9.no-ip.org> a écrit sur 25/07/2006
> 18:05:31 :
> 
> >
> > From: <thomas.seglard.enata at cnp.fr>
> > To: <hobbit at hswn.dk>
> > Sent: Tuesday, July 25, 2006 2:34 PM
> > Subject: [hobbit] Important ! HP-UX and the memory utilisation
> >
> >
> > > Hello,
> > >
> > > I got some troubles with HPUX and memory values. With Hobbit, in my
> memory
> > > test, I got this :
> > >
> > > Memory              Used       Total  Percentage
> > > Physical          16156M      16372M         98%
> > > Swap              22117M      40372M         54%
> > >
> > > Everything seems normal but for me, these numbers are high 'cause 
this
> > > server does nothing during the day. So, I connected to the server 
and 
> > > ran
> > > this command to see the available memory :
> > >
> > > psd216:~# swapinfo -atm
> > >             Mb      Mb      Mb   PCT  START/      Mb
> > > TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
> > > dev       24000    5474   18526   23%       0       -    1
> /dev/vg00/lvol2
> > > reserve       -   11550  -11550
> > > memory    16372    4754   11618   29%
> > > total     40372   21778   18594   54%       -       0    -
> > >
> > > This output clearly shows an error in the Hobbit display. If you 
look, 
> > > my
> > > total swap memory is equal to 24000M not 40372M as shown in Hobbit 
and
> > > only 23% is used !! Apparently, the values for the swap memory test
> are
> > > taken from the last line and that's not correct !
> > > Then I tried to execute the binary called "hpux-meminfo" in the 
client
> > > "bin" directory and I get this :
> > >
> >
> > The 24000M is not swapmemory it is swapdisk, ie diskdevice configured to 
> > be
> > used for swap.
> >
> > The 16372 is swapmemory or pseudo-swap as HP name it. It is a part of
> memory
> > that could be used used for swapping (or as I prefer paging). If you
> have a
> > lot of memory it is more efficient to use memory for paging. When a
> process
> > is started in HP-UX swapdisk is reserved for the process (reserve
> above). If
> > that swap isn't used, it's is waste of diskresources.
> >
> > It is a try to explain.
> >
> > Regards
> > Lars Ebeling
> >
> >
> >
> > To unsubscribe from the hobbit list, send an e-mail to
> > hobbit-unsubscribe at hswn.dk
> >
> >
> 
> 
> 
> Ce message (et toutes ses pieces jointes eventuelles) est confidentiel 
et 
> etabli a l'intention exclusive de ses destinataires.
> Toute utilisation de ce message non conforme a sa destination, toute 
> diffusion ou toute publication, totale ou partielle, est
> interdite, sauf autorisation expresse.
> L'internet ne permettant pas d'assurer l'integrite de ce message, CNP 
> Assurances et ses filiales declinent toute responsabilite
> au titre de ce message, s'il a ete altere, deforme ou falsifie.
> 
> *****
> 
> This message and any attachments (the "message") are confidential and 
> intended solely for the addressees.
> Any unauthorised use or dissemination is prohibited.
> E-mails are susceptible to alteration.
> Neither CNP Assurances nor any of its subsidiaries or affiliates shall 
be 
> liable for the message if altered, changed or falsified.
> 
> 
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
> 
> 
> 
> 
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
> 
> 



Ce message (et toutes ses pieces jointes eventuelles) est confidentiel et etabli a l'intention exclusive de ses destinataires.
Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est
interdite, sauf autorisation expresse.
L'internet ne permettant pas d'assurer l'integrite de ce message, CNP Assurances et ses filiales declinent toute responsabilite
au titre de ce message, s'il a ete altere, deforme ou falsifie.

*****

This message and any attachments (the "message") are confidential and intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.
E-mails are susceptible to alteration.
Neither CNP Assurances nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.




More information about the Xymon mailing list