Storage tuning

This guide covers strategies for optimizing storage I/O performance in your Deephaven deployment through proper storage architecture, hardware selection, and filesystem configuration.

Note

For data organization and partitioning strategies, see Table storage.

Understanding Deephaven's storage architecture

Storage access patterns

Data typeDefault LocationAccess patternCharacteristics
Intraday/db/Intraday/Sequential writes, random readsWrite-intensive, latency-sensitive
Historical/db/Systems/Large sequential reads, batch writesRead-intensive, tolerates higher latency

For detailed architecture, see Data Lifecycle.

Merge operations and I/O impact

Merge operations are the most I/O-intensive operations in Deephaven:

  • Read phase: Sequential read of intraday partitions
  • Processing: In-memory sorting and grouping
  • Write phase: Sequential write to historical partitions
  • I/O pattern: Sustained sequential reads + sustained sequential writes

See Merging data for complete details.

Tuning merge performance

The data buffer pool size and number of concurrent write threads drive merge performance more than raw I/O throughput.

Data buffer pool

The data buffer pool caches column data as it is read from disk. It is the most important driver of merge performance. In heap mode, Deephaven automatically clamps the pool between 10% and 60% of the merge process heap size. To size it explicitly:

Concurrent write threads

Increasing write threads allows merge to write multiple output partitions in parallel:

For best results, the number of writing threads should be a multiple of the number of output partitions.

Merge heap sizing

A reliable rule of thumb:

See Merge optimization for full details, including symbol table and ordering memory guidance.

Tuning DIS and tailer performance

Use the following levers when tailer lag increases or the DIS falls behind real-time data.

Scale horizontally with DIS sharding

A single DIS instance processes all intraday writes for its assigned tables. For high-throughput deployments, shard across multiple DIS instances by table or partition. Sharding is configured in the routing configuration. See Add a DIS server and dhconfig routing for details.

Tailer watch service

Controls how the tailer detects new binary log data. Use JavaWatchService for local disk (more efficient); use PollWatchService for NFS-mounted log directories:

Poll interval

Lower values reduce ingestion latency at the cost of higher CPU usage. Default is 100ms:

Concurrent table location pool

Controls how many table locations the tailer processes concurrently. Increase if many tables are lagging:

See Data tailer configuration for the full property reference.

Storage capacity planning

IOPS and throughput requirements

IOPS and throughput requirements vary based on data volume, column count, query patterns, and hardware. Measure baseline I/O with representative test data using tools like iostat or iotop, then scale estimates for production volumes.

Key factors affecting storage performance:

  • Intraday (DIS): Write-heavy during ingestion; read-heavy when serving queries
  • Historical: Read-heavy during queries; sustained read+write throughput during merge operations

Storage capacity sizing

Intraday retention:

Historical storage:

Note

Actual compression ratios vary significantly based on data characteristics (cardinality, repetition, data types). Test with representative data to determine accurate sizing.

Hardware optimization

Note

Hardware recommendations in this section are general guidelines. Validate sizing against your specific workload before purchasing.

Storage media comparison

MediaThroughputIOPSLatencyUse caseCost
NVMe SSD3-7 GB/s500k+< 100μsIntraday$$$
SATA SSD500-600 MB/s90k+~100μsHistorical (moderate)$$
HDD100-200 MB/s75-1505-10msCold archive only$

RAID configuration

RAIDRead perfWrite perfCapacityUse case
RAID 10ExcellentGood50%Intraday (recommended)
RAID 6GoodModerate(N-2) drivesHistorical storage

Local vs. network storage

Storage typeBest forAdvantages
Local NVMe/SSDIntradayLowest latency, highest IOPS
SANBoth (if configured)Shared, enterprise features
NFSHistoricalSimple, shared, flexible
S3Cold historicalUnlimited capacity, low cost

Filesystem selection and tuning

Filesystem comparison

FilesystemBest forMount optionsStrengths
XFSIntraday/Historicalnoatime,nodiratime,largeio,swallocLarge files, parallel I/O
ext4Alternativenoatime,data=ordered,commit=60Fast metadata
ZFSAdvancedTune ARC, recordsizeCompression, snapshots

Mount options for intraday (XFS)

Mount options for historical (XFS)

Block device tuning

NFS optimization

NFS mount options

OptionValuePurpose
rsize / wsize1048576 (1MB)Match jumbo frames
tcp-Reliability
hard-Retry indefinitely
timeo60060-second timeout
noatime-Reduce write I/O

See NFS configuration for complete details.

S3 optimization

For S3-based historical storage:

  • Regional placement: Deploy in same AWS region as S3 buckets.
  • VPC endpoints: Use S3 VPC endpoints to reduce latency and cost.
  • Performance: S3 performance is significantly slower than NFS. See the S3 performance section for benchmark details.

See S3 table storage for details.

Monitoring I/O performance

Key metrics

Appropriate storage performance targets are system-dependent.

How to establish your baseline:

  1. Run iostat -xz 5 during normal operations and note typical values for:
    • %util — device utilization
    • r_await / w_await — read/write latency in ms
    • rMB/s / wMB/s — throughput
  2. Set alerts when metrics consistently exceed your observed normal range

What to look for:

  • Throughput (rMB/s, wMB/s): Sustained drops indicate bottlenecks.
  • Queue depth (avgqu-sz): Rising values indicate saturation.
  • Latency (await): Increasing latency affects query responsiveness.
  • Utilization (%util): Sustained high utilization leaves no headroom for bursts.

Monitoring commands

Common storage issues

SymptomLikely causeSolution
Slow historical queriesThroughput bottleneckUpgrade storage, distribute load
Data ingestion lagWrite throughput insufficientUpgrade to NVMe
Long merge durationsLow sequential throughputOptimize for sequential I/O
High I/O waitStorage saturationCheck health, upgrade media