- Community Home
- >
- HPE Community, Korea
- >
- HP-UX
- >
- 메모리 관리에 관해서
범주
Company
Local Language
포럼
토론 게시판
포럼
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
토론 게시판
토론 게시판
포럼
토론 게시판
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
포럼
블로그
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
날짜: 02-15-2007 11:00 PM
날짜: 02-15-2007 11:00 PM
메모리 관리에 관해서
사용하고 있는 시스템에서 사용가능 메모리가 점점 줄어듭니다. 문제는 기동한채로 그냥 두었음에도 줄어들고 있습니다. 접속도 하지않고 심지어 데이터를 전송하는등의 움직임은 일체 하지 않고있습니다. 이럴경우 커널의 설정이 잘못되어서 (dbc_max_pct는 기본설정으로 50)인지 아니면 애플리케이션의 특정 프로세스가 메모리를 사용하기때문인지,실제메모리가 부족해서인지 분석할수 있는 방법이 없을까요? 자세하게 메모리 관리하는 법을 알려주세요.
(※GlancePlus는 사용할수 없는 상황입니다. 체험판도 인스톨 불가능입니다.)
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
날짜: 02-15-2007 11:00 PM
날짜: 02-15-2007 11:00 PM
메모리 관리에 관해서
제출 날짜: 98. 1. 8.
제목: What process causes a memory leak?
문서 ID: A4955688B
최종 수정 날짜: 05. 8. 5.
이 문서에 대한 피드백 제공을 할 수 있습니다.
Problem Description
What process causes a memory leak?
Configuration Info
Operating System - HP-UX
Version -10.10
Hardware System - HP 9000
Series -800
Solution
A memory leak is a subjective term, but often unix system
administrators will use it to refer to a system-wide problem where,
over time, there is less and less free physical memory. It is also
seen as a shortage of unreserved swap space.
In this context, there are 2 kinds of memory leaks on hp-ux. The
kernel can leak memory, or processes can leak memory. Processes
leaking memory can include user programs, applications, and (rarely)
system daemons.
In the performance tools (GlancePlus, MeasureWare Agent, and PerfView),
all memory leaks are usually seen as GBL_MEM_USER_UTIL (thus
GBL_MEM_UTIL) growing slowly but consistently over time. The metrics
will climb slowly until something crashes (sometimes an application
aborts, sometimes hp-ux itself panics). From a long-term analysis point
of view (such as PerfView provides), You'll see the metrics dip back
down to "normal", then the steady march upward resumes. Often you'll
also see GBL_SWAP_SPACE_UTIL grow apace. On some systems (with large
dynamic buffer caches and lots of disk activity) the GBL_MEM_UTIL metric
will always be near 100% but the growing metric GBL_MEM_USER_UTIL will
cause the buffer cache to shrink until it hits its minimum.
All this doesn't mean that its actual "user" memory being leaked,
however! The System memory is allocated mostly at bootup and a little
after, and most memory leaks even inside the kernel don't show up as
System memory growing. The performance tools calculate User memory as
being equal to:
Physical memory minus Free memory minus System memory minus Buffer Cache
In a system memory leak situation, User memory *seems* to go up because
Free memory is going down and the other memory metrics aren't changing
much.
The easiest case first: System or user processes that leak memory are
usually pretty easy to catch. Typically an application will be
allocating memory for some dynamic object and not freeing it. As this
happens over and over, the memory virtual set size for the process
steadily increases. In the performance tools, you'll see PROC_MEM_VIRT
(thus APP_MEM_VIRT) increasing over time.. sometimes it may take days or
weeks for this to be obvious so one trick to use is to draw a long-term
PerfView Class Compare graph for all applications using APP_MEM_VIRT.
Depending on how well you've defined your parm file applications, this
will help narrow down the problem but at some point you need to go to
the process-level data and look for hogs. Usually PROC_MEM_RES and
APP_MEM_RES (resident set size) will help show the hogs also, since
resident physical memory is usually what's actually being
constrained on the system, but if there is a lot of memory pressure then
sometimes even the memory hog processes will have smallish resident set
sizes because they are being paged out.
There various 3rd-party development tools available on hp-ux that can
be purchased to catch memory leaks in applications when the source is
available. You can use Glance, MeasureWare, or PerfView to characterize
a memory leak down to a single program but these tools will not help you
isolate the specific area of code causing the problem.
For kernel memory leaks (which are fortunately quite rare), analysis is
much more difficult and best left to the HP Response Center to
characterize. You might suspect you're seeing a kernel memory leak when
the Global memory metrics show leakage as described above, but you don't
see any corresponding APP_MEM_VIRT growth. If no processes are
increasing their memory allocations over time, yet system memory is more
and more constrained, then their could be a problem inside the operating
system itself. One such problem seen on busy HP-UX 10.20 systems
resulted in the hp-ux patch PHKL_11165.
For any heavily used system, workloads slowly tend to increase over time.
More users are added to a system, the complexity of the workload increases,
and users log into a system and then forget about the sessions. It may
be hard to tell the difference between normal increasing workload and a
memory leak. Knowing what's normal for your system is the key. Use your
performance tools to look at the system often and then you'll be better
prepared to handle a problem situation.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
날짜: 02-16-2007 11:00 PM
날짜: 02-16-2007 11:00 PM
메모리 관리에 관해서
# sysdef |grep -i dbc
dbc_max_pct 25 - - -
dbc_min_pct 5 - -
하시면 현제 설정된 dyncmic buffer cache설정값을 확인하실수 있습니다.
특정 processor를 확인하기 위해서는 lsof를 설치하시기 바랍니다.
가능하면,정확한 분석을 위하여 glance tool을 설치하시기 바랍니다.
그럼~~~
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
날짜: 02-16-2007 11:00 PM
날짜: 02-16-2007 11:00 PM
메모리 관리에 관해서
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
날짜: 02-20-2007 11:00 PM
날짜: 02-20-2007 11:00 PM
메모리 관리에 관해서
일반적으로 OS올라오면 시스템,버퍼 등
기본적으로 사용하는 메모리 할당 량이 있습니다.
커널 튜닝 안되어 있으면 기본 버퍼 할당량이 50%로 잡혀 있습니다.
(아래 텍스트 로그 참조)
특히 버퍼 캐쉬는 능동적으로 늘었다 줄었다 합니다.
물론 사용중인 버퍼가 줄어드는 경우는 많지않고
처음에는 작았다가 설정 한계치 까지 계속 증가 하게 됩니다.
크리어님 시스템 같은 경우 8G 메모리중 50%이니 약 4G까지 증가 하게 됩니다.
따라서 4G까지 버퍼 증가는 이상 현상이 아닙니다.
다만 너무 큰 버퍼 사용은 유저가 사용할 수 있는 메모리량을 줄이며
메모리 사용량 증가시 버퍼영역을 줄이고 비우는 작업을 하게되 성능 저하가 발생 할 수 있습니다.
따라서 dbc_max_pct 커널 값 적당히 조절 하시면 되고
(/usr/sbin/kctune dbc_max_pct=20)
조절 방법은 11.23에서는 dynamic 하게 변경 하능하며
sam 으로설명하면 아래 순서대로 하시면 됩니다.
SAM -> Kernel Configuration -> Tunable -> Modify (dbc_max_pct)
-----------------------------------------------------------------
Tunable dbc_max_pct
Description Maximum percentage of memory to be used for caching file I/O data and metadata
Dynamic yes
Subsystem fs
Default Value 50
Current Value 50
Planned Value 20
Last Boot Value 20
Constraints dbc_max_pct >= 1
Constraints dbc_max_pct <= 90
Constraints dbc_max_pct >= dbc_min_pct
Auto Tuning Not Supported
Enter Value/Expression OR q(quit) = 20 <-- 필요한 커널 크기(%)
Do you want to hold this change till next boot ? (y/n/q)
<- 온라인중 즉시 적용시 n, 다음 부팅시 적용 y
Do you want to save the current kernel configuration ? (y/n/q)
Enter Comments = imsi
Command Preview: /usr/sbin/kctune -C "imsi" dbc_max_pct=20
Do you want to proceed ? (y/n)