Windows NT 4.0 Performance Tuning Guide
Introduction
Optimizing Windows NT Server 4.0 performance requires understanding system bottlenecks and applying appropriate tuning techniques. This guide covers monitoring tools, optimization strategies, and best practices for maximizing server performance.
Performance Monitoring Tools
Performance Monitor
-
Starting PerfMon
Start → Programs → Administrative Tools → Performance Monitor Or run: perfmon.exe
-
Key Features
- Real-time monitoring
- Historical data collection
- Alert configuration
- Report generation
-
Remote monitoring
-
Basic Usage
Edit → Add to Chart Select Computer: \\LocalMachine or \\RemoteServer Select Object: Processor, Memory, Disk, etc. Select Counter: % Processor Time, Pages/sec, etc. Select Instance: _Total or specific
Task Manager
Quick performance overview:
Ctrl+Shift+Esc or right-click taskbar
Tabs:
- Applications: Running programs
- Processes: All processes with CPU/Memory
- Performance: CPU and Memory graphs
Network Monitor
For network performance analysis:
Install from NT Server CD
Capture and analyze network traffic
Identify bandwidth usage
Troubleshoot network issues
CPU Performance
Monitoring CPU Usage
Key Performance Counters:
Processor Object:
- % Processor Time: Overall CPU usage
- % User Time: Application CPU usage
- % Privileged Time: Kernel/driver usage
- Interrupts/sec: Hardware interrupt rate
- Processor Queue Length: Waiting threads
System Object:
- Processor Queue Length: System-wide queue
- Context Switches/sec: Thread switching rate
CPU Bottleneck Indicators
Signs of CPU bottleneck: - Processor Time consistently > 80% - Processor Queue Length > 2 per CPU - High context switches (> 15,000/sec) - System responsiveness degraded
CPU Optimization
- Process Priority Adjustment ``` Task Manager → Processes → Right-click Set Priority: Low, Normal, High, Realtime
Or command line: start /low applicationname.exe start /high importantapp.exe ```
- Processor Affinity (Multi-CPU) ``` Task Manager → Processes → Right-click Set Affinity → Select CPUs
Bind processes to specific CPUs ```
- Registry Optimizations ``` HKLM\System\CurrentControlSet\Control\PriorityControl Win32PrioritySeparation = 2 (favor foreground)
Values: 0 = Equal priority 1 = Favor foreground slightly 2 = Favor foreground more ```
Memory Performance
Memory Monitoring
Critical Memory Counters:
Memory Object:
- Available Bytes: Free physical memory
- Pages/sec: Hard page faults
- Page Reads/sec: Disk reads for paging
- Page Writes/sec: Disk writes for paging
- Cache Bytes: System cache size
- Pool Nonpaged Bytes: Kernel memory
Process Object:
- Working Set: Process memory usage
- Page Faults/sec: Total page faults
- Private Bytes: Process-specific memory
Memory Bottleneck Indicators
Signs of memory pressure: - Available Bytes < 4 MB consistently - Pages/sec > 20 sustained - Page Reads/sec > 5 - Excessive disk activity for paging
Memory Optimization
- Page File Configuration ``` System Properties → Performance → Change
Best Practices: - Initial size = 1.5 × RAM - Maximum size = 2 × RAM - Multiple page files on different disks - Avoid system drive if possible
Example for 128 MB RAM: C:\pagefile.sys: 0 MB (disabled) D:\pagefile.sys: 192-256 MB E:\pagefile.sys: 192-256 MB ```
- Memory-Related Registry Tweaks ``` HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management
LargeSystemCache = 1 (for file servers) Size = 3 (maximize cache)
DisablePagingExecutive = 1 (keep kernel in RAM) - Only if sufficient RAM (256+ MB) ```
- 4GT Tuning (3GB Switch) For applications needing > 2GB: ``` Edit BOOT.INI: multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Server" /3GB
Gives applications 3GB address space Reduces kernel to 1GB ```
Disk Performance
Disk Monitoring
Essential Disk Counters:
LogicalDisk/PhysicalDisk Objects:
- % Disk Time: Disk busy percentage
- Disk Queue Length: Pending I/O requests
- Disk Reads/sec: Read operations
- Disk Writes/sec: Write operations
- Avg. Disk sec/Read: Read latency
- Avg. Disk sec/Write: Write latency
- Disk Bytes/sec: Throughput
Disk Bottleneck Indicators
Signs of disk bottleneck: - % Disk Time > 90% sustained - Disk Queue Length > 2 sustained - Avg. Disk sec/Transfer > 25ms - Page file on busy disk
Disk Optimization
- Physical Configuration ``` Optimization strategies:
- Separate OS, data, and page file
- Use multiple controllers
- Implement RAID appropriately
- Use SCSI over IDE
Example layout: C: (RAID 1) - OS and programs D: (RAID 1) - Page file E: (RAID 5) - Data files F: (RAID 0) - Temp files ```
- File System Optimization ``` Always use NTFS Regular defragmentation (3rd party tools)
Cluster size optimization: - Default 4KB for most uses - 64KB for large media files - Small clusters waste less space - Large clusters better performance ```
- Controller Cache ``` Enable write caching (with UPS): Device Manager → Disk drives → Properties [X] Write cache enabled
RAID controller cache: - Battery-backed cache recommended - Configure for write-back mode ```
Network Performance
Network Monitoring
Key Network Counters:
Network Interface Object:
- Bytes Total/sec: Total throughput
- Packets/sec: Packet rate
- Output Queue Length: Transmit queue
- Packets Received Errors: Error rate
Server Object:
- Bytes Total/sec: Server throughput
- Work Item Shortages: Resource shortage
- Blocking Requests Rejected: Overload
Protocol Objects (TCP, UDP, etc.):
- Segments/sec
- Segments Retransmitted/sec
Network Optimization
- Network Card Settings ``` Control Panel → Network → Adapters Properties → Advanced
Optimize: - Full Duplex (if switch supports) - Maximum frame size - Receive buffers - Transmit buffers ```
- Protocol Binding Order ``` Network → Bindings
Order for performance: 1. Most-used protocol first 2. Remove unused protocols 3. Unbind from unused adapters ```
- Registry Network Tweaks ``` HKLM\System\CurrentControlSet\Services\Tcpip\Parameters
TcpWindowSize = 65535 (maximum window) DefaultTTL = 128 TcpMaxDataRetransmissions = 5
For high-latency networks: TcpWindowSize = 131070 or higher ```
Server Service Optimization
Server Service Settings
- Optimization Setting ``` Network → Services → Server → Properties
Options: - Minimize Memory Used: < 10 users - Balance: 10-64 users - Maximize Throughput for File Sharing: > 64 users - Maximize Throughput for Network Apps: IIS, SQL ```
- Server Service Registry ``` HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters
Size = 3 (large) MaxWorkItems = 512 MaxMpxCt = 50 MaxRawWorkItems = 512 ThreadPriority = 1 ```
Workstation Service
For client optimization:
HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters
MaxCmds = 50
MaxThreads = 17
MaxCollectionCount = 32
Application Performance
Process Management
- Identify Resource Consumers ``` Task Manager → Processes Click column headers to sort by:
- CPU usage
- Memory usage
- Handle count
-
Thread count ```
-
Process Priority ``` Critical services: High priority Background tasks: Low priority Interactive apps: Normal priority
Permanent priority via registry or shortcuts ```
Service Optimization
- Disable Unnecessary Services ``` Services consuming resources:
- Indexing Service (if not needed)
- Task Scheduler (if not used)
- Unnecessary network protocols
-
Unused device drivers ```
-
Service Startup Configuration ``` Control Panel → Services
Startup types: - Automatic: System startup - Manual: On demand - Disabled: Never start
Set non-critical services to Manual ```
Database Performance
SQL Server Optimization
- Memory Configuration ``` SQL Enterprise Manager → Server Properties
Memory tab: - Fixed memory allocation - Leave OS memory (32-64 MB) - Example: 192 MB system = 128 MB SQL ```
- Database File Placement ``` Separate physical disks:
- System databases
- User databases
- Transaction logs
- TempDB ```
File Server Optimization
- Opportunistic Locking ``` Registry for better performance: HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters
EnableOpLocks = 1 EnableOpLockForceClose = 1 ```
- Directory Cache
For many small files: MaxMpxCt = 100 MaxWorkItems = 1024
Boot Performance
Boot Optimization
- Boot.ini Configuration ``` [boot loader] timeout=10 (reduce from 30)
[operating systems] Remove unnecessary entries Set default to primary OS ```
- Startup Programs ``` Minimize startup applications:
- Check Startup folder
- Registry Run keys
-
Services set to Automatic ```
-
Driver Loading
Disable unnecessary drivers: Control Panel → Devices Set unused devices to Disabled
Performance Best Practices
Regular Maintenance
- Defragmentation
- Weekly for busy file servers
- Monthly for application servers
-
Use third-party tools (NT lacks built-in)
-
Registry Maintenance
- Regular registry backups
- Remove orphaned entries
-
Compact if possible
-
Event Log Management
- Regular archiving
- Clear when full
- Set appropriate sizes
Capacity Planning
- Baseline Performance ``` Establish baselines:
- Normal CPU usage
- Memory utilization
- Disk I/O patterns
-
Network throughput ```
-
Trend Analysis ``` Track over time:
- Peak usage periods
- Growth patterns
- Resource constraints
-
Bottleneck trends ```
-
Upgrade Planning ``` When to upgrade:
- CPU > 80% sustained
- Memory pages/sec > 20
- Disk queue > 2 constant
- Network utilization > 60% ```
Documentation
Document all changes: - Registry modifications - Service configurations - Hardware changes - Performance baselines - Optimization results
Troubleshooting Performance
Systematic Approach
- Identify Symptoms
- User complaints
- Specific operations slow
-
General sluggishness
-
Monitor Key Metrics
- CPU, Memory, Disk, Network
- Look for obvious bottlenecks
-
Compare to baselines
-
Isolate Problem
- Single process issue?
- System-wide problem?
-
Time-specific occurrence?
-
Test Solutions
- One change at a time
- Monitor results
- Document changes
Common Issues
- Sudden Slowdown
- Check for runaway processes
- Look for memory leaks
- Verify disk space
-
Check for hardware errors
-
Gradual Degradation
- Database growth
- Log file accumulation
- Registry bloat
- Fragmentation
Conclusion
Windows NT Server 4.0 performance tuning requires careful monitoring and systematic optimization. Focus on identifying bottlenecks through Performance Monitor, then apply appropriate solutions. Regular maintenance and capacity planning prevent performance degradation. Always test changes in non-production environments first, and maintain detailed documentation of all optimizations.