Troubleshooting performance

This guide helps administrators diagnose and resolve cluster-wide performance issues.

Note

For troubleshooting individual slow queries, see Why is my query slow?.

Diagnostic approach

  1. Identify the symptom: What is slow or failing?
  2. Isolate the component: Which process or server is affected?
  3. Gather metrics: Collect relevant data from logs and internal tables.
  4. Identify the bottleneck: CPU, memory, I/O, or network?
  5. Apply the fix: Tune the relevant component.

Common issues

Slow data ingestion

Symptoms:

  • Tailer lag increasing
  • DIS falling behind real-time data

Diagnostic steps:

Common causes:

CauseCheckSolution
Disk I/O bottleneckiostat shows high utilizationUpgrade to faster storage (NVMe)
Network congestionCheck network throughputIncrease bandwidth, check MTU
DIS heap exhaustedGC logs, heap usageIncrease DIS heap
High message rateTailer metricsAdd DIS instances, tune batching

Slow merges

Symptoms:

  • Merge jobs taking longer than expected
  • Intraday data accumulating beyond retention

Diagnostic steps:

Query merge events in internal tables:

Common causes:

CauseCheckSolution
Storage throughputiostat high utilizationUpgrade storage, optimize for sequential I/O
Insufficient parallelismMerge configIncrease iris.concurrentWriteThreads
Memory pressureGC logsIncrease merge heap
Large partition sizesData volumeAdjust partitioning strategy

Worker out of memory

Symptoms:

  • OutOfMemoryError in worker logs
  • Workers crashing unexpectedly
  • PQ status shows Failed/Error

Diagnostic steps:

Check dispatcher resource usage:

Common causes:

CauseCheckSolution
Heap too smallHeapUsageMB / HeapAvailableMB in ResourceUtilizationIncrease worker heap size
Memory leakHeap dump analysisIdentify and fix leak, restart worker
Large result setsQuery analysisOptimize queries, add filters
Too many open tablesTable countClose unused tables, optimize code

See Troubleshoot Java processes for heap dump analysis.

High query latency

Symptoms:

  • Queries timing out
  • Slow table operations
  • UI responsiveness issues

Diagnostic steps:

Find slow queries:

Check update cycle performance:

Common causes:

CauseCheckSolution
CPU bottlenecktop, htopAdd CPU, optimize queries
Memory pressureGC logsIncrease heap, reduce data size
I/O waitiostat awaitUpgrade storage
Network latencyping, mtrCheck network, TDCP placement
Inefficient queryQuery analysisRewrite query, add indexes

GC thrashing

Symptoms:

  • High CPU with little progress
  • Frequent long GC pauses
  • Unresponsive workers

Diagnostic steps:

Check GC metrics from internal tables:

Common causes:

CauseCheckSolution
Heap too smallFrequent full GCsIncrease heap
Memory leakHeap growing constantlyIdentify leak, restart
Large allocationsGC log analysisOptimize data structures

Diagnostic tools

System tools

ToolPurposeExample
top / htopCPU and memory overviewhtop
iostatDisk I/O statisticsiostat -xz 5
vmstatVirtual memory statsvmstat 5
netstatNetwork connectionsnetstat -an | grep ESTABLISHED
iftopNetwork bandwidth by connectionsudo iftop

Java tools

ToolPurposeExample
jstackThread dumpsudo jstack -F <pid>
jmapHeap dumpsudo jmap -dump:format=b,file=/tmp/heap.bin <pid>
jstatGC statisticsjstat -gc <pid> 1000
jinfoJVM configurationsudo jinfo <pid>

See Troubleshoot Java processes for detailed usage.

Deephaven internal tables

TableUse for
QueryPerformanceLogCoreV2Slow query identification
UpdatePerformanceLogCoreV2Slow update cycles
ProcessMetricsLogCoreV2JVM and system metrics
ProcessEventLogProcess lifecycle events
ResourceUtilizationDispatcher resource usage

Quick reference

Bottleneck identification

SymptomLikely bottleneckCheck with
High CPU, slow queriesCPU-boundtop, thread dump
Frequent GC, OOMMemory-boundGC logs, heap dump
High I/O waitStorage-boundiostat
Network timeoutsNetwork-boundping, iftop

First response checklist

  1. ✅ Check process status: dh_monit summary
  2. ✅ Check recent logs: tail -100 /var/log/deephaven/<process>/*.log.current
  3. ✅ Check system resources: top, iostat -xz 5
  4. ✅ Query internal tables for errors
  5. ✅ Capture thread dump if process is unresponsive