---
title: "Configuration: Storage Options"
description: "Configure RavenDB storage settings including Voron temp paths, sync options, encryption buffer sizes, and disk space thresholds."
url: "https://docs.ravendb.net/7.2/server/configuration/storage-configuration"
version: "7.2"
---

# Configuration: Storage Options

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## Configuration: Storage Options

> **Note**
>
> - Use the configuration keys listed below to configure [the storage engine](https://docs.ravendb.net/7.2/server/storage/storage-engine.md).
>
> - Learn how to apply these keys in the [Configuration Overview](https://docs.ravendb.net/7.2/server/configuration/configuration-options.md) article.
>
> - On this page:
>   - [Storage.TempPath](#storagetemppath)
>   - [Storage.MaxConcurrentFlushes](#storagemaxconcurrentflushes)
>   - [Storage.TimeToSyncAfterFlushInSec](#storagetimetosyncafterflushinsec)
>   - [Storage.NumberOfConcurrentSyncsPerPhysicalDrive](#storagenumberofconcurrentsyncsperphysicaldrive)
>   - [Storage.CompressTxAboveSizeInKb](#storagecompresstxabovesizeinkb)
>   - [Storage.ForceUsing32BitsPager](#storageforceusing32bitspager)
>   - [Storage.MaxScratchBufferSizeInMb](#storagemaxscratchbuffersizeinmb)
>   - [Storage.PrefetchBatchSizeInKb](#storageprefetchbatchsizeinkb)
>   - [Storage.PrefetchResetThresholdInGb](#storageprefetchresetthresholdingb)
>   - [Storage.OnDirectoryInitialize.Exec](#storageondirectoryinitializeexec)
>   - [Storage.OnDirectoryInitialize.Exec.Arguments](#storageondirectoryinitializeexecarguments)
>   - [Storage.OnDirectoryInitialize.Exec.TimeoutInSec](#storageondirectoryinitializeexectimeoutinsec)
>   - [Storage.EnablePrefetching](#storageenableprefetching)
>   - [Storage.ReadAheadKbAlertThresholdInKb](#storagereadaheadkbalertthresholdinkb)
>   - [Storage.UseSequentialReadAheadHintForJournalRecovery](#storageusesequentialreadaheadhintforjournalrecovery)
>   - [Storage.IO.Metrics.Enabled](#storageiometricsenabled)
>   - [Storage.IoMetricsCleanupIntervalInHrs](#storageiometricscleanupintervalinhrs)
>   - [Storage.SyncJournalsCountThreshold](#storagesyncjournalscountthreshold)

## Configuration keys {#configuration-keys}

### Storage.TempPath

- Use this configuration option to customize the path for the temporary files of the following [directories](https://docs.ravendb.net/7.2/server/storage/directory-structure.md):
  - `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](https://docs.ravendb.net/7.2/server/configuration/indexing-configuration.md#indexingtemppath).

- Learn more about RavenDB directory structure [here](https://docs.ravendb.net/7.2/server/storage/directory-structure.md).

* **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:

```text
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](https://docs.ravendb.net/7.2/start/installation/system-configuration-recommendations.md) 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](https://docs.ravendb.net/7.2/monitoring/performance-views/io-stats.md) 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
