Skip to main content

Configuration: Storage Options

Configuration keys

Storage.TempPath

  • Use this configuration option to customize the path for the temporary files of the following directories:

    • System
    • Configuration
    • Databases/{database_name}
  • By default, the temporary files are created under the Temp folder in those directories.

  • When the Storage.TempPath is configured:

    • The System temporary files will be written to "<Storage.TempPath>/System".
    • The Databases temporary files will be written to "<Storage.TempPath>/Databases/{database-name}".
    • The Configuration temporary files will be written to "<Storage.TempPath>/Databases/{database-name}/Configuration".
  • To specify a different path for the indexes temporary files go to Indexing.TempPath.

  • Learn more about RavenDB directory structure here.

  • Type: string
  • Default: null
  • Scope: Server-wide or per database

Storage.MaxConcurrentFlushes

Maximum concurrent flushes.

  • Type: int
  • Default: 10
  • Scope: Server-wide or per database

Storage.TimeToSyncAfterFlushInSec

Time to sync after flush in seconds.

  • Type: int
  • Default: 30
  • Scope: Server-wide or per database

Storage.NumberOfConcurrentSyncsPerPhysicalDrive

Number of concurrent syncs per physical drive.

  • Type: int
  • Default: 3
  • Scope: Server-wide or per database

Storage.CompressTxAboveSizeInKb

Compress transactions above size (value in KB).

  • Type: int
  • Default: 512
  • Scope: Server-wide or per database

Storage.ForceUsing32BitsPager

Use the 32-bit memory-mapped pager even when running on 64 bits.

  • Type: bool
  • Default: false
  • Scope: Server-wide only

Storage.MaxScratchBufferSizeInMb

Maximum size of .buffers files.

  • Type: int
  • Default: 256 when running on 64 bits, 32 when running on 32 bits or Storage.ForceUsing32BitsPager is set to true
  • Scope: Server-wide or per database

Storage.PrefetchBatchSizeInKb

Experts only

Size of the batch in kilobytes that will be requested to the OS from disk when prefetching (value in powers of 2).
Some OSs may not honor certain values.

  • Type: int
  • Default: 1024
  • Scope: Server-wide or per database

Storage.PrefetchResetThresholdInGb

Experts only

How many gigabytes of memory should be prefetched before restarting the prefetch tracker table.

  • Type: int
  • Default: 8
  • Scope: Server-wide or per database

Storage.OnDirectoryInitialize.Exec

Experts only

A command or executable to run when creating/opening a directory (storage environment).

RavenDB will execute:

command [user-arg-1] ... [user-arg-n] <environment-type> <database-name> <data-dir-path> <temp-dir-path> <journal-dir-path>

  • Type: string
  • Default: null
  • Scope: Server-wide or per database

Storage.OnDirectoryInitialize.Exec.Arguments

Experts only

The optional user arguments for the 'Storage.OnDirectoryInitialize.Exec' command or executable.
The arguments must be escaped for the command line.

  • Type: string
  • Default: null
  • Scope: Server-wide or per database

Storage.OnDirectoryInitialize.Exec.TimeoutInSec

Experts only

The number of seconds to wait for the OnDirectoryInitialize executable to exit.
Default: 30 seconds.

  • Type: int
  • Default: 30
  • Scope: Server-wide or per database

Storage.EnablePrefetching

Enables memory prefetching mechanism if the OS supports it.

  • Type: bool
  • Default: true
  • Scope: Server-wide only

Storage.ReadAheadKbAlertThresholdInKb

On Linux, RavenDB raises a startup warning when any block device's read_ahead_kb is above this threshold.
A high read_ahead_kb amplifies I/O for the random-access database workload - see System Configuration Recommendations for guidance on tuning it.
Set to null to disable the check.
Has no effect on Windows or macOS.

  • Type: int?
  • Default: 128
  • Scope: Server-wide only

Storage.UseSequentialReadAheadHintForJournalRecovery

On Linux, hints the kernel (posix_fadvise with POSIX_FADV_SEQUENTIAL) to read journal files sequentially while a database loads, so a low read_ahead_kb tuned for the random-access workload causes a smaller startup slowdown.
Set to false to opt out.
Has no effect on Windows or macOS.

  • Type: bool
  • Default: true on Linux, false on other platforms
  • Scope: Server-wide or per database

Storage.IO.Metrics.Enabled

Enables the collection of metrics for each I/O operation RavenDB performs.
The IO Stats Studio views draw these metrics.
Set to false to collect nothing.

  • Type: bool
  • Default: true
  • Scope: Server-wide only

Storage.IoMetricsCleanupIntervalInHrs

The interval, in hours, at which RavenDB removes the collected I/O metrics from memory.
The cleanup runs as part of a database's idle operations.

  • Type: int
  • Default: 24
  • Scope: Server-wide or per database

Storage.SyncJournalsCountThreshold

The number of journal files a storage environment accumulates before RavenDB forces a sync of the data file and removes the journal files that are no longer in use.

  • Type: int
  • Default: 2
  • Scope: Server-wide or per database

In this article