< 증 상 >
이벤트 뷰어의 시스템 로그에서 아래와 같은 Event log 를 볼 수 있습니다.
Type: Error
Event ID: 333
Source: Application Popup
Computer: MachineName
Description:
An I/O operation initiated by the Registry failed unrecoverably. The Registry could
not read in, or write out, or flush, one of the files that contain the system's
image of the Registry.
Data:
0000: 00000000 006c0001 00000000 c000014d
0010: 00000000 c000014d 00000000 00000000
0020: 00000000 00000000
C000014d 가 무엇일까요?
Microsoft 웹사이트상의 Bing Keywords 로 “Error code look-up” 등으로 찾을 수 있습니다.
Microsoft Exchange Server Error Code Look-up Tool
http://www.microsoft.com/downloads/details.aspx?FamilyID=be596899-7bb8-4208-b7fc-09e02a13696c&DisplayLang=en
이 툴로 Commnad 상에서 실행하면 아래와 같이 오류 코드를 볼 수 있습니다.
C:\>err.exe c000014d
# for hex 0xc000014d / decimal -1073741491
STATUS_REGISTRY_IO_FAILED ntstatus.h
# An I/O operation initiated by the Registry failed
# unrecoverably.
# The Registry could not read in, or write out, or flush, one
# of the files that contain the system's image of the
# Registry.
# 1 matches found for "c000014d"
또한, 이 이벤트와 함께 아래와 같은 추가적인 증상을 볼 수 있습니다.
- SQL database 가 계속 멈췄다가 재 시작합니다.
- IP 및 Cluster Name 이 오프라인 됩니다.
- File and Print 서버가 Freezing 됩니다.
- 서버에 Ping 할 수 있습니다.
- Keyboard 와 마우스를 사용할 수 있습니다.
- Application 이벤트 로그에서 아래와 같은 로그가 기록될 경우도 있습니다.
Windows cannot load the user’s profile but has logged you on with the default profile for this system.
Insufficient system resources exist to complete the requested service.
그래서 복구하는 유일한 방법은 서버를 재 시작하는 것입니다.
< 원 인 >
Event ID 333’s 은 만약 OS 가 Registry hive 를 Flush 하고 Write 할 수 없다면 System 이벤트에 로그됩니다.
Event ID 333’s 는 다음 원인들에 의해 발생할 수 있습니다.
원인1. Memory pressure
Physical (Physical RAM, Virtual memory, Working set trimming, Pagefile, 등등)
Kernel (Low paged/nonpaged pool/System Page Table Entries (PTE’s))
원인 2. 오래된 Filter/Kernel driver 가 Flush 되고 있는 Registry를 잡고 있을 경우
원인 3. System partition을 호스팅하는 Disk 가 Disk load와 보조를 맞추지 못하고 있을 경우
(High disk queue lengths)
< 해결 방법 >
원인 1 에 대한 해결 방법
Pro-active troubleshooting
===================
Windows Server 2003 SP1 환경의 경우
------------------------------------
- 커널 업데이트
A computer that is running Windows Server 2003 may use lots of nonpaged pool memory
http://support.microsoft.com/?id=918976
You may experience increased paging to the hard disk when you run an SAP R/3 program on a Windows Server 2003-based computer
http://support.microsoft.com/kb/931308/en-us
A Windows Server 2003-based computer stops responding when the registry is in heavy use
http://support.microsoft.com/kb/935926/en-us
A Windows Server 2003-based computer becomes unresponsive because of a memory manager trimming operation that is caused by an indeterminate module that requests lots of memory
http://support.microsoft.com/kb/938486/en-us
만약 Volume Shadow Copies (VSS)가 사용된다면,
A computer may run out of paged pool memory if the "Shadow Copies for Shared Folders" feature is enabled in Windows Server 2003
http://support.microsoft.com/kb/927435/en-us
The Volume Shadow Copy Service may leak private bytes and virtual memory when you use the service to take frequent snapshots in Windows Server 2003 or in Windows XP
http://support.microsoft.com/kb/940252/en-us
만약 File server 이거나 Backup 을 사용하고, 가장 높게 사용하고 있는 Paged pool memory tag 가 MmSt 여서,
Paged pool 의 크기를 최대로 확장하고 Paged pool trimming 이 일찍 발생하도록 설정할 경우
Server is unable to allocate memory from the system paged pool
http://support.microsoft.com/kb/312362/en-us
Regedit.exe 에서
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Memory Management]
"PoolUsageMaximum"=dword:0000001E
"PagedPoolSize"=dword:ffffffff
Note: /3GB 를 사용하는 x86 서버의 경우 ffffffff 대신에 아래를 사용
0x11800000 (대략 280 MB로 설정)
0xC0000000 (대략 250 MB로 설정)
0x0d800000 (대략 216 MB로 설정)
Note: /3GB 와 함께 Windows Server 2003 SP1/R2/SP2 서버상에서 이 값은 코드에서 무시되므로
이 값을 FFFFFFFF 로 설정하지 마십시오.
* 3GB 옵션
/3GB 스위치가 필요한지 확인합니다. 실행 파일의 Virtual memory 를 체크하여, 1.8GB 에 도달하는지
체크합니다. 만약 그렇지 않을 경우 이 스위치는 필요하지 않습니다.
<필요한 경우>
# x86 Exchange Servers
# x86 Oracle older versions. 새 버전의 Oracle 은 PAE를 사용할 수 있음
<필요하지 않은 경우>
# x64 Exchange 2007
# x86 SQL Server 2005, 만약 동일 서버에 실행하고 있는 SAP 이나 오래된 버전의 Oracle 을 App가 없다면.
# x64 SQL Server 2005
- 32bit 시스템에서 이용 가능한 System PTEs를 증가
만약 /3GB 스위치를 사용하고 있다면, /USERVA 스위치를 추가함으로서 System PTEs를 증가시킬 수 있습니다.
ex)
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows Server 2003" /fastdetect /3GB /Userva=2970
Note: 만약 x86 Windows Server 2003 가 Application mode 에 Terminal Server 를 운영하고 있지 않다면,
fancy drivers 대신 VGA driver 를 사용합니다.
How to use the /userva switch with the /3GB switch to tune the User-mode space to a value between 2 GB and 3 GB
http://support.microsoft.com/kb/316739/en-us
- Pagefile 크기를 증가시키고 System physical disk 로부터 다른 Disk로 이동
- Handle leak 을 야기하는 Processes/services 를 확인
- Hot-add memory를 Disable
Decreased performance, driver load failures, or system instability may occur on Hot Add Memory systems that are running Windows Server
http://support.microsoft.com/kb/913568/en-us
Windows Server 2003 SP2 환경의 경우
만약 SQL Server 2005 Enterprise edition 을 운영하고 있다면,
x64 SQL 2005 RTM/SP1/SP2 Enterprise Edition servers 상에서 기본적으로 "Locked Pages in Memory (LPIM)"을
Turn on 해서는 안됩니다.
Proactive Action Plan
================
- Windows Server 2003 SP1/SP2 에 대한 위에서 언급된 Hotfixes 를 설치합니다.
- 추가적으로 다음 Hotfix 를 설치합니다.
You experience application performance issues after you install the update from security bulletin MS07-043 on a computer that is running Windows Server 2003 or Windows XP Professional x64 Edition
http://support.microsoft.com/kb/943172/en-us
- 시스템상에 Drivers 와 Firmware 가 최신 버전인지 확인합니다.
- 시스템상에 Antivirus, Quota management drivers 가 최신인지 확인합니다.
- SQL 담당자를 통해 다음 사항을 체크합니다.
How to reduce paging of buffer pool memory in the 64-bit version of SQL Server
http://support.microsoft.com/kb/918483/en-us
만약 x86 SQL 2000 Server Enterprise Edition 을 운영하고 있다면,
SQL 이 Buffer pool 에 대해 Less memory를 사용하도록 설정
SQL Server 2000 64-bit eagerly acquires the amount of memory that is specified in the min server memory configuration option
http://support.microsoft.com/kb/918035/en-us
만약 x86/x64 SQL Server 2005 RTM/SP1/SP2 Enterprise Edition 을 운영하고 있다면,
Reactive Action Plan
===============
- 문제가 발생하고 있는 동안 일정 기간 동안 Perfmon 로그를 수집합니다.
SQL 관련 성능 카운터 정보
http://msdn2.microsoft.com/en-us/library/ms187024.aspx
http://blogs.technet.com/askperf/archive/2007/05/18/sql-and-the-working-set.aspx
- x86 Exchange Serve 2003 을 운영하고 있을 경우
다음 Hotfixes 를 설치합니다.
Stop error message on an Exchange Server 2003 server: "INVALID_PROCESS_ATTACH_ATTEMPT (5)"
http://support.microsoft.com/?id=908674
Error code when you use the Winsock Select function on a Windows Server 2003-based multiprocessor computer: "WSAENOBUFS (10055)"
http://support.microsoft.com/kb/917114/en-us
HTTP 가 더 많은 NonPaged pool memory를 사용하도록 아래 Registry entry 를 추가합니다.
HKLM\SYSTEM\CurrentControlSet\Services\HTTP\Parameters
EnableAggressiveMemoryUsage=1 (DWORD)
Users receive a "The page cannot be displayed" error message, and "Connections_refused" entries are logged in the Httperr.log file on a server that is running Windows Server 2003, Exchange 2003, and IIS 6.0
http://support.microsoft.com/kb/934878/en-us
Error message when you try to view a Web page that is hosted on IIS 6.0: "Page cannot be displayed"
http://support.microsoft.com/kb/933844/en-us
Http.sys registry settings for IIS
http://support.microsoft.com/kb/820129/en-us
만약 Exchange 2003 SP2 라면, Exchange EXIFS (AuxL and Flst tags)는 NonPaged pool 에서 Paged pool 을 옮겨질 수 있습니다.
HKLM\SYSTEM\CurrentControlSet\Services\EXIFS\Parameters
AuxFreeListInPagedPool=1 (DWORD)
FreeListInPagedPool=1 (DWORD)
Reactive Troubleshooting
1. MPS Report Setup/Perf 용 및 MPS Report SQL 용 로그를 수집합니다.
2. Poolmon 을 수집합니다.
3. Remote Perfmon log를 수집합니다.
How to create a log using System Monitor in Windows
http://support.microsoft.com/kb/248345/en-us
4. 수동으로 Memory dump 를 수집합니다.
Windows feature lets you generate a memory dump file by using the keyboard
http://support.microsoft.com/kb/244139/en-us
기타:
Windows Server 2003 Performance and Scalability
http://www.microsoft.com/windowsserver2003/evaluation/performance/perfscaling.mspx
Detection, Analysis, and Corrective Actions for Low Page Table Entry Issues
http://www.microsoft.com/downloads/details.aspx?FamilyID=ed0e8084-abf7-4c00-ba6a-7d658cdb052a&DisplayLang=en
원인 2에 대한 해결 방법
- 아래 링크에서 해당 시스템 아키텍쳐에 맞는 MPS Report 툴을 실행하여 수집/생성된 로그 (.cab)을 압축 해제합니다.
로그상의 Pstat.txt 를 오픈 후 아래 Categoies의 오래된 3rd party filter/kernel drivers 가 있는지 체크합니다.
Anti-virus/Spyware softwares
Quota management
Backup software (Microsoft Volume Shadow Copy 포함)
OEM Server Management software
Kernel mode print drivers
- 가장 최신 버전의 TCPIP.sys 파일인지 확인합니다.
You may experience network-related problems after you install Windows Server 2003 SP2 or the Scalable Networking Pack on a Windows Server 2003-based computer
http://support.microsoft.com/kb/936594/en-us
Step 1. 다음 레지스트리 설정을 확인합니다.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"EnableTCPChimney"=dword:00000000
"EnableTCPA"=dword:00000000
"EnableRSS"=dword:00000000
Step 2. 시작 - 실행에서 Netsh int ip set chimney DISABLED 을 실행합니다.
http://support.microsoft.com 에서 keywords "Windows Server 2003" TCPip.sys hotfix 를 이용해 최신 버전의 TCPIP.sys를 적용합니다.
- 가장 최신 버전의 Ntoskrnl.exe (또는 Ntkrnlmp.exe 또는 Ntkrpamp.exe 또는 Ntkrnlpa.exe) 가 설치되어 있는지 확인합니다.
http://support.microsoft.com 에서 keywords "Windows Server 2003" Ntoskrnl.exe hotfix 를 이용해 최신 버전의 Ntoskrnl.exe를 적용합니다.
원인 3에 대한 해결 방법
- System 드라이브(보통 C:\)상에 충분한 디스크 여유 공간이 있는지 확인합니다. 적어도 15% 가량의 공간이 남아 있어야 합니다.
- System 드라이브가 얼마나 Fragmented 되었는지 확인합니다. 조각 모음 도구로 확인하여 필요 시 조각 모음을 실행합니다.
Note: 성능 카운터 사용 시 Physical Disk (Object), Split IO/sec (Counter)의 평균이 1보다 클 경우 Fragmented disk로 봄
Note: Microsoft Disk Defragmenter는 현재 MFT(Master File Table)을 조각 모음하지 않습니다. 유일한 방법은 Data를
복사 후 Disk를 포멧한 다음 다시 Data를 디스크에 복사하는 것입니다.
3rd party 제품 또는 Sysinternal(http://technet.microsoft.com/en-us/sysinternals/default.aspx) 의 Contig.exe 를 사용 가능합니다.
- SCSI controller 에 대한 Driver/firmware 업데이트를 확인합니다.
- 만약 SAN 으로 부터 부팅하거나 SAN attached storage를 가지고 있다면, Scsiport 대신 StorPort를 사용하는 HBA driver/firmware를 사용하는지 확인합니다. 이것은 Disk I/O 성능을 증가시킬 수 있습니다.
HBA자신의 Disk queue lengths 설정을 체크합니다. 기본값은 16 또는 32 입니다. HBA/SAN 하드웨어 벤더를 통해 적절한 값을 체크합니다.
- 성능상의 이슈가 있다면 하나의 물리적 디스크를 여러 논리 드라이브로 나누지 않습니다.
- System 파티션을 호스트하는 드라이브에 대해 Power Protected Write Cache (Enhanced Disk performance)를 Enable 합니다.
Obtain the Dskcache.exe tool to configure the "Power Protected" Write Cache option
http://support.microsoft.com/kb/811392/en-us
- http://support.microsoft.com 에서 keywords "Windows Server 2003" 아래파일명 hotfix 를 이용해 가장 최신 버전을 적용합니다.
mountmgr.sys
ftdisk.sys
partmgr.sys
disk.sys
classpnp.sys
ntfs.sys
storport.sys
< 추가 정보 >
177415 How to Use Memory Pool Monitor (Poolmon.exe) to Troubleshoot Kernel Mode Memory Leaks
http://support.microsoft.com/?id=177415
298102 How to find pool tags that are used by third-party drivers
http://support.microsoft.com/?id=298102
248345 How to create a log using System Monitor in Windows
http://support.microsoft.com/?id=248345
244139 Windows feature lets you generate a memory dump file by using the keyboard
http://support.microsoft.com/?id=244139
315263 How to read the small memory dump files that Windows creates for debugging
http://support.microsoft.com/?id=315263