Struct mdbx::env::reclaiming_options
ClassList > mdbx > env > reclaiming_options
Garbage reclaiming options.
#include <mdbx.h++>
Public Attributes
| Type | Name |
|---|---|
| bool | lifo = {false} |
Public Functions
| Type | Name |
|---|---|
| bool | operator!= (const reclaiming_options & other) noexcept const |
| reclaiming_options & | operator= (const reclaiming_options &) noexcept Copy assignment operator. |
| bool | operator== (const reclaiming_options & other) noexcept const |
| constexpr | reclaiming_options () noexcept Constructs the default reclaiming options. |
| constexpr | reclaiming_options (const reclaiming_options &) noexcept Copy constructor. |
| reclaiming_options (MDBX_env_flags_t flags) noexcept Constructs from the environment flags, extracting the reclaiming bits. |
Public Attributes Documentation
variable lifo
bool mdbx::env::reclaiming_options::lifo;
LIFO policy for recycling a Garbage Collection items.
MDBX_LIFORECLAIM flag turns on LIFO policy for recycling a Garbage Collection items, instead of FIFO by default. On systems with a disk write-back cache, this can significantly increase write performance, up to several times in a best case scenario.
LIFO recycling policy means that for reuse pages will be taken which became unused the lastest (i.e. just now or most recently). Therefore the loop of database pages circulation becomes as short as possible. In other words, the number of pages, that are overwritten in memory and on disk during a series of write transactions, will be as small as possible. Thus creates ideal conditions for the efficient operation of the disk write-back cache.
MDBX_LIFORECLAIM is compatible with all no-sync flags, but gives NO noticeable impact in combination with MDBX_SAFE_NOSYNC or MDBX_UTTERLY_NOSYNC. Because MDBX will reused pages only before the last "steady" MVCC-snapshot, i.e. the loop length of database pages circulation will be mostly defined by frequency of calling mdbx_env_sync() rather than LIFO and FIFO difference.
This flag may be changed at any time using mdbx_env_set_flags().
Public Functions Documentation
function operator!=
inline bool mdbx::env::reclaiming_options::operator!= (
const reclaiming_options & other
) noexcept const
function operator=
Copy assignment operator.
reclaiming_options & mdbx::env::reclaiming_options::operator= (
const reclaiming_options &
) noexcept
Returns:
A reference to this instance.
function operator==
inline bool mdbx::env::reclaiming_options::operator== (
const reclaiming_options & other
) noexcept const
function reclaiming_options [1/3]
Constructs the default reclaiming options.
inline constexpr mdbx::env::reclaiming_options::reclaiming_options () noexcept
function reclaiming_options [2/3]
Copy constructor.
constexpr mdbx::env::reclaiming_options::reclaiming_options (
const reclaiming_options &
) noexcept
function reclaiming_options [3/3]
Constructs from the environment flags, extracting the reclaiming bits.
mdbx::env::reclaiming_options::reclaiming_options (
MDBX_env_flags_t flags
) noexcept
Parameters:
flagsThe MDBX_env_flags_t combination.
The documentation for this class was generated from the following file mdbx.h++