Common user-tunable settings for storing ntuples.
All page sink classes need to support the common options.
Definition at line 48 of file RNTupleWriteOptions.hxx.
Public Types | |
enum class | EImplicitMT { kOff , kDefault } |
Public Member Functions | |
virtual | ~RNTupleWriteOptions ()=default |
virtual std::unique_ptr< RNTupleWriteOptions > | Clone () const |
std::size_t | GetApproxZippedClusterSize () const |
int | GetCompression () const |
bool | GetEnablePageChecksums () const |
std::size_t | GetInitialNElementsPerPage () const |
std::uint64_t | GetMaxKeySize () const |
std::size_t | GetMaxUnzippedClusterSize () const |
std::size_t | GetMaxUnzippedPageSize () const |
std::size_t | GetPageBufferBudget () const |
bool | GetUseBufferedWrite () const |
bool | GetUseDirectIO () const |
EImplicitMT | GetUseImplicitMT () const |
std::size_t | GetWriteBufferSize () const |
void | SetApproxZippedClusterSize (std::size_t val) |
void | SetCompression (int val) |
void | SetCompression (RCompressionSetting::EAlgorithm::EValues algorithm, int compressionLevel) |
void | SetEnablePageChecksums (bool val) |
Note that turning off page checksums will also turn off the same page merging optimization (see tuning.md) | |
void | SetInitialNElementsPerPage (std::size_t val) |
void | SetMaxUnzippedClusterSize (std::size_t val) |
void | SetMaxUnzippedPageSize (std::size_t val) |
void | SetPageBufferBudget (std::size_t val) |
void | SetUseBufferedWrite (bool val) |
void | SetUseDirectIO (bool val) |
void | SetUseImplicitMT (EImplicitMT val) |
void | SetWriteBufferSize (std::size_t val) |
Static Public Attributes | |
static constexpr std::uint64_t | kDefaultMaxKeySize = 0x4000'0000 |
Protected Attributes | |
std::size_t | fApproxZippedClusterSize = 100 * 1000 * 1000 |
Approximation of the target compressed cluster size. | |
int | fCompression {RCompressionSetting::EDefaults::kUseGeneralPurpose} |
bool | fEnablePageChecksums = true |
If set, checksums will be calculated and written for every page. | |
std::size_t | fInitialNElementsPerPage = 64 |
Initially, columns start with a page large enough to hold the given number of elements. | |
std::uint64_t | fMaxKeySize = kDefaultMaxKeySize |
Specifies the max size of a payload storeable into a single TKey. | |
std::size_t | fMaxUnzippedClusterSize = 1024 * 1024 * 1024 |
Memory limit for committing a cluster: with very high compression ratio, we need a limit on how large the I/O buffer can grow during writing. | |
std::size_t | fMaxUnzippedPageSize = 1024 * 1024 |
Pages can grow only to the given limit in bytes. | |
std::size_t | fPageBufferBudget = 0 |
The maximum size that the sum of all page buffers used for writing into a persistent sink are allowed to use. | |
bool | fUseBufferedWrite = true |
Whether to use buffered writing (with RPageSinkBuf). | |
bool | fUseDirectIO = false |
Whether to use Direct I/O for writing. | |
EImplicitMT | fUseImplicitMT = EImplicitMT::kDefault |
Whether to use implicit multi-threading to compress pages. Only has an effect if buffered writing is turned on. | |
std::size_t | fWriteBufferSize = 4 * 1024 * 1024 |
Buffer size to use for writing to files, must be a multiple of 4096 bytes. | |
#include <ROOT/RNTupleWriteOptions.hxx>
|
strong |
Enumerator | |
---|---|
kOff | |
kDefault |
Definition at line 50 of file RNTupleWriteOptions.hxx.
|
virtualdefault |
|
virtual |
Reimplemented in ROOT::Experimental::RNTupleWriteOptionsDaos.
Definition at line 48 of file RNTupleWriteOptions.cxx.
|
inline |
Definition at line 112 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 105 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 139 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 118 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 143 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 115 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 121 of file RNTupleWriteOptions.hxx.
std::size_t ROOT::Experimental::RNTupleWriteOptions::GetPageBufferBudget | ( | ) | const |
Definition at line 77 of file RNTupleWriteOptions.cxx.
|
inline |
Definition at line 127 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 130 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 136 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 133 of file RNTupleWriteOptions.hxx.
void ROOT::Experimental::RNTupleWriteOptions::SetApproxZippedClusterSize | ( | std::size_t | val | ) |
Definition at line 53 of file RNTupleWriteOptions.cxx.
|
inline |
Definition at line 106 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 107 of file RNTupleWriteOptions.hxx.
|
inline |
Note that turning off page checksums will also turn off the same page merging optimization (see tuning.md)
Definition at line 141 of file RNTupleWriteOptions.hxx.
void ROOT::Experimental::RNTupleWriteOptions::SetInitialNElementsPerPage | ( | std::size_t | val | ) |
Definition at line 65 of file RNTupleWriteOptions.cxx.
void ROOT::Experimental::RNTupleWriteOptions::SetMaxUnzippedClusterSize | ( | std::size_t | val | ) |
Definition at line 59 of file RNTupleWriteOptions.cxx.
void ROOT::Experimental::RNTupleWriteOptions::SetMaxUnzippedPageSize | ( | std::size_t | val | ) |
Definition at line 71 of file RNTupleWriteOptions.cxx.
|
inline |
Definition at line 125 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 128 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 131 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 137 of file RNTupleWriteOptions.hxx.
|
inline |
Definition at line 134 of file RNTupleWriteOptions.hxx.
|
protected |
Approximation of the target compressed cluster size.
Definition at line 64 of file RNTupleWriteOptions.hxx.
|
protected |
Definition at line 62 of file RNTupleWriteOptions.hxx.
|
protected |
If set, checksums will be calculated and written for every page.
Definition at line 95 of file RNTupleWriteOptions.hxx.
|
protected |
Initially, columns start with a page large enough to hold the given number of elements.
The initial page size is the given number of elements multiplied by the column's element size. If more elements are needed, pages are increased up until the byte limit given by fMaxUnzippedPageSize or until the total page buffer limit is reached (as a sum of all page buffers). The total write buffer limit needs to be large enough to hold the initial pages of all columns.
Definition at line 73 of file RNTupleWriteOptions.hxx.
|
protected |
Specifies the max size of a payload storeable into a single TKey.
When writing an RNTuple to a ROOT file, any payload whose size exceeds this will be split into multiple keys.
Definition at line 98 of file RNTupleWriteOptions.hxx.
|
protected |
Memory limit for committing a cluster: with very high compression ratio, we need a limit on how large the I/O buffer can grow during writing.
Definition at line 67 of file RNTupleWriteOptions.hxx.
|
protected |
Pages can grow only to the given limit in bytes.
Definition at line 75 of file RNTupleWriteOptions.hxx.
|
protected |
The maximum size that the sum of all page buffers used for writing into a persistent sink are allowed to use.
If set to zero, RNTuple will auto-adjust the budget based on the value of fApproxZippedClusterSize. If set manually, the size needs to be large enough to hold all initial page buffers. The total amount of memory for writing is larger, e.g. for the additional compressed buffers etc. Use RNTupleModel::EstimateWriteMemoryUsage() for the total estimated memory use for writing. The default values are tuned for a total write memory of around 300 MB per fill context.
Definition at line 82 of file RNTupleWriteOptions.hxx.
|
protected |
Whether to use buffered writing (with RPageSinkBuf).
This buffers compressed pages in memory, reorders them to keep pages of the same column adjacent, and coalesces the writes when committing a cluster.
Definition at line 85 of file RNTupleWriteOptions.hxx.
|
protected |
Whether to use Direct I/O for writing.
Note that this introduces alignment requirements that may very between filesystems and platforms.
Definition at line 88 of file RNTupleWriteOptions.hxx.
|
protected |
Whether to use implicit multi-threading to compress pages. Only has an effect if buffered writing is turned on.
Definition at line 93 of file RNTupleWriteOptions.hxx.
|
protected |
Buffer size to use for writing to files, must be a multiple of 4096 bytes.
Testing suggests that 4MiB gives best performance (with Direct I/O) at a reasonable memory consumption.
Definition at line 91 of file RNTupleWriteOptions.hxx.
|
staticconstexpr |
Definition at line 56 of file RNTupleWriteOptions.hxx.