Understand the runtime engine architecture.
Reference → Solution → Runtime → UI | Engine | Troubleshooting | Diagnostics | Client-Server
The Runtime Engine (Reference): The core execution component managing real-time data processing, module coordination, and client services in production environments.
TServer.exe is the computer process maintaining the real-time database. During execution, it:
| Component | Function | Key Features |
|---|---|---|
| Core Engine | Central coordinator | Module management, event routing, memory management |
| Tag Services | Real-time database | In-memory storage, microsecond updates, quality management |
| Module Host | Module execution | Dynamic loading, lifecycle management, isolation |
| Communication Layer | Network services | Client connections, protocol handlers, buffering |
| Security Context | Access control | Authentication, authorization, audit logging |
Memory Structure:
| Area | Purpose | Management |
|---|---|---|
| Tag Database | Current values storage | Automatic optimization |
| Module Memory | Processing buffers | Per-module allocation |
| System Cache | Performance data | LRU cache policy |
Modules - Services Thread Pool:
Client Services Threads:
System Threads:
Script Task Execution:
| Mode | Threading | Configuration |
|---|---|---|
| Default | One thread per task | Standard isolation |
| Multi-thread | Multiple threads | Parallel execution |
| Configurable | Max threads setting | Resource control |
Script Expression Execution:
Script Classes:
Flow Sequence:
Field Devices → Device Module → Tag Database → Processing Modules → Clients
↓
Historian
↓
DatabaseData Flow Stages:
| Stage | Processing | Latency |
|---|---|---|
| Acquisition | Device polling/events | 1-100ms |
| Tag Update | Memory write | <1ms |
| Processing | Alarms/Scripts | 1-10ms |
| Distribution | Client notification | 10-50ms |
| Storage | Historian/Database | 50-500ms |
Event Processing:
| Event Type | Priority | Handler |
|---|---|---|
| Tag Change | High | Direct notification |
| Alarm | Critical | Immediate processing |
| Script Trigger | Normal | Queued execution |
| Client Request | Variable | Thread pool |
| System | Low | Background thread |
| Phase | Actions | Duration |
|---|---|---|
| Initialize | Load configuration | 100-500ms |
| Start | Begin processing | 10-100ms |
| Run | Active execution | Continuous |
| Stop | Graceful shutdown | 100-1000ms |
| Dispose | Release resources | 10-100ms |
Each module runs with:
| Metric | Typical | Maximum |
|---|---|---|
| Tag Updates/sec | 10,000 | 100,000+ |
| Concurrent Clients | 50 | 500+ |
| Script Executions/sec | 1,000 | 10,000+ |
| Alarm Processing/sec | 5,000 | 50,000+ |
| Component | CPU Usage | Memory |
|---|---|---|
| Core Engine | 5-10% | 100-200 MB |
| Tag Services | 10-20% | Varies with count |
| Modules | 20-40% | 50-500 MB each |
| Client Services | 5-10% per client | 10-50 MB per client |
| Setting | Default | Range | Impact |
|---|---|---|---|
| Min Threads | 4 | 2-16 | Startup performance |
| Max Threads | 100 | 10-1000 | Peak capacity |
| Queue Size | 1000 | 100-10000 | Buffer capacity |
| Parameter | Default | Recommended |
|---|---|---|
| Initial Heap | 256 MB | 512 MB for large systems |
| Max Heap | 2 GB | 4-8 GB for enterprise |
| Tag Cache | 100 MB | Scale with tag count |
Monitor these metrics:
| Category | Content | Verbosity |
|---|---|---|
| System | Core operations | Error/Warning |
| Modules | Module events | Info |
| Communication | Client traffic | Debug |
| Performance | Metrics | Trace |
| Feature | Implementation | Switchover Time |
|---|---|---|
| Hot Standby | Synchronized backup | <1 second |
| Data Replication | Real-time sync | Continuous |
| Client Redirect | Automatic failover | 2-5 seconds |
Between primary and backup: