Disable write-ahead log

Since it's a cache, we do not need to retain the data from one
MaxScale invocation to the next. Consequently, we can turn off
write ahead logging completely if we simply wipe the RocksDB
database at each startup. In addition, the location of the
cache directory can now be specified explicitly, so it can be
placed, for instance, on a RAM disk.
This commit is contained in:
Johan Wikman
2016-11-21 21:16:27 +02:00
parent 9e4ee0323d
commit 97b039689f
5 changed files with 280 additions and 109 deletions

View File

@ -381,4 +381,26 @@ regardless of what host the `admin` user comes from.
# Storage
## Storage RocksDB
## `storage_rocksdb`
This storage module uses RocksDB database for storing the cached data. The
directory where the RocksDB database will be created is by default created
into the _MaxScale cache_ directory, which usually is not on a RAM disk. For
maximum performance, you may want to explicitly place the RocksDB database
on a RAM disk.
### Parameters
#### `cache_directory`
Specifies the directory under which the filter instance specific RocksDB
databases will be placed. Note that at startup, each RocksDB database will
be deleted and recreated. That is, cache content will not be retained across
MaxScale restarts.
```
storage_options=cache_directory=/mnt/maxscale-cache
```
With the above setting a directory `/mnt/macscale-cache/storage_rocksdb` will
created, under which the actual instance specific cache directories are created.