[문의사항]

서버 메모리 사용량 90% 임계치 초과

Svchost.exe (Eventlog, lmhosts) 메모리 사용량 증가

 

[환경]

Windows Server 2008 R2 SP1

SQL Server

 

[제안]


 

1. 모니터링 카운터

버퍼 캐시 메모리 부족을 확인하기 위해 SQLServer:Buffer Manager Buffer cache hit ratio, Page life expectancy 카운터를 모니터링 하시기 바랍니다.

아래 제시된 임계값은 일반적으로 알려진 허용 수치입니다. 절대값이 아니므로 임계값 이하라고해서 반드시 메모리가 부족한 상황은 아닙니다.

메모리 부족 판단이 어려울 경우 참고용으로 활용하실 수는 있습니다.

성능모니터(perfmon)으로 카운터를 추가해서 확인해도 관계 없습니다.

 

Buffer cache hit ratio – 캐시 적중률 (90% 이상)

SELECT (a.cntr_value * 1.0 / b.cntr_value) * 100.0 as BufferCacheHitRatio

FROM sys.dm_os_performance_counters  a

JOIN  (SELECT cntr_value,OBJECT_NAME

    FROM sys.dm_os_performance_counters 

    WHERE counter_name = 'Buffer cache hit ratio base'

        AND OBJECT_NAME = 'SQLServer:Buffer Manager') b ON  a.OBJECT_NAME = b.OBJECT_NAME

WHERE a.counter_name = 'Buffer cache hit ratio'

AND a.OBJECT_NAME = 'SQLServer:Buffer Manager'

 

Page life expectancy – 페이지 메모리 상주 시간 (300초 이상)

시간() 개념이기 때문에 무제한 증가하지도 값을 유지하지도 않습니다.

300 이상의 값까지 증가한 0으로 다시 초기화되는 상황은 정상이라고 판단해도 무방합니다.

SELECT object_name, counter_name, cntr_type

FROM sys.dm_os_performance_counters 

WHERE counter_name = 'Page life expectancy'

AND OBJECT_NAME = 'SQLServer:Buffer Manager'

 

 

2. Max Server Memory 현재 설정값 확인

sp_configure 'show advanced options', 1

go

reconfigure

go

 

sp_configure 'max server memory (mb)'

reconfigure

go

 

(아래 캡쳐에서는 2048MB(2GB) 설정됨)

 

3. Max Server Memory 설정

주의) 업무시간대에 진행하실 것을 권고 드립니다.

온라인 중에 적용 가능하지만, Plan Cache 초기화되어 적용 얼마간 CPU 사용량이 급증하고 성능이 저하될 수 있습니다.

-- ) 10GB(10240MB)로설정

sp_configure 'max server memory (mb)', 10240

reconfigure

go

 


'Microsoft > SQL' 카테고리의 다른 글

SQL Account expired date 확인 방법  (0) 2018.09.07
트랜젝션 로그 불리는 방법  (0) 2018.08.03
Disk I/O Query  (0) 2018.08.03
DBCC SHRINKFILE & Internal  (0) 2018.08.03

+ Recent posts