Operating System - HP-UX
1834814 Members
2561 Online
110070 Solutions
New Discussion

how to diagnose memory fragmentation?

 
mobidyc
Trusted Contributor

how to diagnose memory fragmentation?

Hello,

(shminfo, ipcs -ao and swapinfo are in attachment)

my memory allocation knowledge is very limited and i'm trying to understand it, for now, i search to know how to diagnose a memory fragmentation problem.

with shminfo, i see a lot of FREE and OTHER lines, that would say that there is fragmentation? (it's not contiguous)

with ipcs is see...a lot of things but i'm unable to say if there is fragmentation information.

another question,
shmemin say "available swap 0 Kbytes":
Limits for 32-bit SHMEM allocation:
===================================

Maximum shmem segment: 1048576 Kbytes (shmmax)
Largest free segment: 1048576 Kbytes (Window id 0 (global) quadrant 2)
Available swap : 0 Kbytes (swapspc_cnt)
Available pseudo-swap: 1843636 Kbytes (swapmem_cnt)

however, i've enough free swap:
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2048 0 2048 0% 0 - 1 /dev/vg00/lvol2
reserve - 2048 -2048
memory 3139 1121 2018 36%
total 5187 3169 2018 61% - 0 -

i don't understand it.

what advices do you have for my questions ?

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: how to diagnose memory fragmentation?

It appears you are trying to diagnose shared memory virtual address fragmentation and not heap fragmentation?

If you have more than 4 GB of memory, you don't really need to look at swap space. ;-)
Steven E. Protter
Exalted Contributor

Re: how to diagnose memory fragmentation?

Shalom,

Your system use looks typical of a system with a fair number of users or small memory resident applications.

If you actually have a performance issue, more memory might help.

If you don't have heavy disk i/o or if you have Oracle you can reduce overall memory consumption by lowering kernel parameters dbc_max_pct/dbc_min_pct to a lower value and no more than 5 percent apart. This controls buffer cache which is sometimes wasted.

Perf tools:
http://www.hpux.ws/system.perf.sh

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
mobidyc
Trusted Contributor

Re: how to diagnose memory fragmentation?

Hello,

Dennis:
i don't know what i need to look for diagnose memoryfragmentation, virtual or heap memory?

do you have more informations?

PS: yes, i've more of 4GB of physical memory ;).


Steven:
i've no performance problem, a perl module can't load a shared library (tusc report ENOMEM), according to:
http://www.chapelhill.homeip.net/horton/copies/MemoryUsage-HPUX.htm

the problem - in my case - can be the tunable parameter max[dst]siz or memory fragmentation.

even if the problem is not memory fragmentation, it could be useful to know how to retrieve this information ;)

PS: the result of your system.perf.sh id in attachment

thanks by advance.
Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
mobidyc
Trusted Contributor

Re: how to diagnose memory fragmentation?

Hello,

Dennis:
i don't know what i need to look for diagnose memoryfragmentation, virtual or heap memory?

do you have more informations?

PS: yes, i've more of 4GB of physical memory ;).


Steven:
i've no performance problem, a perl module can't load a shared library (tusc report ENOMEM), according to:
http://www.chapelhill.homeip.net/horton/copies/MemoryUsage-HPUX.htm

the problem - in my case - can be the tunable parameter max[dst]siz or memory fragmentation.

even if the problem is not memory fragmentation, it could be useful to know how to retrieve this information ;)

PS: the result of your system.perf.sh is in attachment

thanks by advance.
Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
Dennis Handly
Acclaimed Contributor

Re: how to diagnose memory fragmentation?

>i don't know what i need to look for diagnose memory fragmentation, virtual or heap memory?

Well for shared memory, you just look at your first attachment.
It seems you have lots of small FREE chunks. With the biggest of 19620 KB:
Q4 0x0ae02400.0xec506000-0xec5fffff 1000 FREE
Q4 0x0ae02400.0xed057000-0xed3d6fff 3584 FREE
Q3 0x0ae02400.0xbf14b000-0xbfffffff 15060 FREE
Q4 0x0ae02400.0xeecd7000-0xefffffff 19620 FREE

For heap fragmentation you call mallinfo(3).

>PS: yes, i've more of 4GB of physical memory

Hmm, swapinfo says you only have 3139 Mb. ??
Perhaps your disk cache is taking the rest?
(You have it from 5 - 10% of memory.)

>a perl module can't load a shared library (tusc report ENOMEM),

Do you have the tusc parms? That will tell if text or data and what size.

>can be the tunable parameter max[dst]siz or memory fragmentation.

Your maxdsiz is 1 Gb. maxssiz is 8 M. maxtsiz is 64 Mb.