Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RNTupleWriteOptions Class Reference

Common user-tunable settings for storing ntuples.

All page sink classes need to support the common options.

Definition at line 37 of file RNTupleWriteOptions.hxx.

Public Types

enum class  EImplicitMT { kOff , kDefault }
 

Public Member Functions

virtual ~RNTupleWriteOptions ()=default
 
virtual std::unique_ptr< RNTupleWriteOptionsClone () const
 
std::size_t GetApproxUnzippedPageSize () const
 
std::size_t GetApproxZippedClusterSize () const
 
int GetCompression () const
 
bool GetHasSmallClusters () const
 
std::size_t GetMaxUnzippedClusterSize () const
 
bool GetUseBufferedWrite () const
 
EImplicitMT GetUseImplicitMT () const
 
bool GetUseTailPageOptimization () const
 
void SetApproxUnzippedPageSize (std::size_t val)
 
void SetApproxZippedClusterSize (std::size_t val)
 
void SetCompression (int val)
 
void SetCompression (RCompressionSetting::EAlgorithm::EValues algorithm, int compressionLevel)
 
void SetHasSmallClusters (bool val)
 
void SetMaxUnzippedClusterSize (std::size_t val)
 
void SetUseBufferedWrite (bool val)
 
void SetUseImplicitMT (EImplicitMT val)
 
void SetUseTailPageOptimization (bool val)
 

Static Public Attributes

static constexpr std::uint64_t kMaxSmallClusterSize = 512 * 1024 * 1024
 A maximum size of 512MB still allows for a vector of bool to be stored in a small cluster.
 

Protected Attributes

std::size_t fApproxUnzippedPageSize = 64 * 1024
 Should be just large enough so that the compression ratio does not benefit much more from larger pages.
 
std::size_t fApproxZippedClusterSize = 50 * 1000 * 1000
 Approximation of the target compressed cluster size.
 
int fCompression {RCompressionSetting::EDefaults::kUseGeneralPurpose}
 
bool fHasSmallClusters = false
 If set, 64bit index columns are replaced by 32bit index columns.
 
std::size_t fMaxUnzippedClusterSize = 512 * 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.
 
bool fUseBufferedWrite = true
 Whether to use buffered writing (with RPageSinkBuf).
 
EImplicitMT fUseImplicitMT = EImplicitMT::kDefault
 Whether to use implicit multi-threading to compress pages. Only has an effect if buffered writing is turned on.
 
bool fUseTailPageOptimization = true
 Whether to optimize tail pages to avoid an undersized last page per cluster (see above).
 

#include <ROOT/RNTupleWriteOptions.hxx>

Inheritance diagram for ROOT::Experimental::RNTupleWriteOptions:
[legend]

Member Enumeration Documentation

◆ EImplicitMT

Enumerator
kOff 
kDefault 

Definition at line 39 of file RNTupleWriteOptions.hxx.

Constructor & Destructor Documentation

◆ ~RNTupleWriteOptions()

virtual ROOT::Experimental::RNTupleWriteOptions::~RNTupleWriteOptions ( )
virtualdefault

Member Function Documentation

◆ Clone()

std::unique_ptr< ROOT::Experimental::RNTupleWriteOptions > ROOT::Experimental::RNTupleWriteOptions::Clone ( ) const
virtual

Reimplemented in ROOT::Experimental::RNTupleWriteOptionsDaos.

Definition at line 44 of file RNTupleWriteOptions.cxx.

◆ GetApproxUnzippedPageSize()

std::size_t ROOT::Experimental::RNTupleWriteOptions::GetApproxUnzippedPageSize ( ) const
inline

Definition at line 90 of file RNTupleWriteOptions.hxx.

◆ GetApproxZippedClusterSize()

std::size_t ROOT::Experimental::RNTupleWriteOptions::GetApproxZippedClusterSize ( ) const
inline

Definition at line 84 of file RNTupleWriteOptions.hxx.

◆ GetCompression()

int ROOT::Experimental::RNTupleWriteOptions::GetCompression ( ) const
inline

Definition at line 77 of file RNTupleWriteOptions.hxx.

◆ GetHasSmallClusters()

bool ROOT::Experimental::RNTupleWriteOptions::GetHasSmallClusters ( ) const
inline

Definition at line 102 of file RNTupleWriteOptions.hxx.

◆ GetMaxUnzippedClusterSize()

std::size_t ROOT::Experimental::RNTupleWriteOptions::GetMaxUnzippedClusterSize ( ) const
inline

Definition at line 87 of file RNTupleWriteOptions.hxx.

◆ GetUseBufferedWrite()

bool ROOT::Experimental::RNTupleWriteOptions::GetUseBufferedWrite ( ) const
inline

Definition at line 96 of file RNTupleWriteOptions.hxx.

◆ GetUseImplicitMT()

EImplicitMT ROOT::Experimental::RNTupleWriteOptions::GetUseImplicitMT ( ) const
inline

Definition at line 99 of file RNTupleWriteOptions.hxx.

◆ GetUseTailPageOptimization()

bool ROOT::Experimental::RNTupleWriteOptions::GetUseTailPageOptimization ( ) const
inline

Definition at line 93 of file RNTupleWriteOptions.hxx.

◆ SetApproxUnzippedPageSize()

void ROOT::Experimental::RNTupleWriteOptions::SetApproxUnzippedPageSize ( std::size_t  val)

Definition at line 61 of file RNTupleWriteOptions.cxx.

◆ SetApproxZippedClusterSize()

void ROOT::Experimental::RNTupleWriteOptions::SetApproxZippedClusterSize ( std::size_t  val)

Definition at line 49 of file RNTupleWriteOptions.cxx.

◆ SetCompression() [1/2]

void ROOT::Experimental::RNTupleWriteOptions::SetCompression ( int  val)
inline

Definition at line 78 of file RNTupleWriteOptions.hxx.

◆ SetCompression() [2/2]

void ROOT::Experimental::RNTupleWriteOptions::SetCompression ( RCompressionSetting::EAlgorithm::EValues  algorithm,
int  compressionLevel 
)
inline

Definition at line 79 of file RNTupleWriteOptions.hxx.

◆ SetHasSmallClusters()

void ROOT::Experimental::RNTupleWriteOptions::SetHasSmallClusters ( bool  val)
inline

Definition at line 103 of file RNTupleWriteOptions.hxx.

◆ SetMaxUnzippedClusterSize()

void ROOT::Experimental::RNTupleWriteOptions::SetMaxUnzippedClusterSize ( std::size_t  val)

Definition at line 55 of file RNTupleWriteOptions.cxx.

◆ SetUseBufferedWrite()

void ROOT::Experimental::RNTupleWriteOptions::SetUseBufferedWrite ( bool  val)
inline

Definition at line 97 of file RNTupleWriteOptions.hxx.

◆ SetUseImplicitMT()

void ROOT::Experimental::RNTupleWriteOptions::SetUseImplicitMT ( EImplicitMT  val)
inline

Definition at line 100 of file RNTupleWriteOptions.hxx.

◆ SetUseTailPageOptimization()

void ROOT::Experimental::RNTupleWriteOptions::SetUseTailPageOptimization ( bool  val)
inline

Definition at line 94 of file RNTupleWriteOptions.hxx.

Member Data Documentation

◆ fApproxUnzippedPageSize

std::size_t ROOT::Experimental::RNTupleWriteOptions::fApproxUnzippedPageSize = 64 * 1024
protected

Should be just large enough so that the compression ratio does not benefit much more from larger pages.

Unless the cluster is too small to contain a sufficiently large page, pages are fApproxUnzippedPageSize in size. If tail page optimization is enabled, the last page in a cluster is between fApproxUnzippedPageSize/2 and fApproxUnzippedPageSize * 1.5 in size.

Definition at line 55 of file RNTupleWriteOptions.hxx.

◆ fApproxZippedClusterSize

std::size_t ROOT::Experimental::RNTupleWriteOptions::fApproxZippedClusterSize = 50 * 1000 * 1000
protected

Approximation of the target compressed cluster size.

Definition at line 47 of file RNTupleWriteOptions.hxx.

◆ fCompression

int ROOT::Experimental::RNTupleWriteOptions::fCompression {RCompressionSetting::EDefaults::kUseGeneralPurpose}
protected

Definition at line 45 of file RNTupleWriteOptions.hxx.

◆ fHasSmallClusters

bool ROOT::Experimental::RNTupleWriteOptions::fHasSmallClusters = false
protected

If set, 64bit index columns are replaced by 32bit index columns.

This limits the cluster size to 512MB but it can result in smaller file sizes for data sets with many collections and lz4 or no compression.

Definition at line 66 of file RNTupleWriteOptions.hxx.

◆ fMaxUnzippedClusterSize

std::size_t ROOT::Experimental::RNTupleWriteOptions::fMaxUnzippedClusterSize = 512 * 1024 * 1024
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 50 of file RNTupleWriteOptions.hxx.

◆ fUseBufferedWrite

bool ROOT::Experimental::RNTupleWriteOptions::fUseBufferedWrite = true
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 61 of file RNTupleWriteOptions.hxx.

◆ fUseImplicitMT

EImplicitMT ROOT::Experimental::RNTupleWriteOptions::fUseImplicitMT = EImplicitMT::kDefault
protected

Whether to use implicit multi-threading to compress pages. Only has an effect if buffered writing is turned on.

Definition at line 63 of file RNTupleWriteOptions.hxx.

◆ fUseTailPageOptimization

bool ROOT::Experimental::RNTupleWriteOptions::fUseTailPageOptimization = true
protected

Whether to optimize tail pages to avoid an undersized last page per cluster (see above).

Increases the required memory by a factor 3x.

Definition at line 58 of file RNTupleWriteOptions.hxx.

◆ kMaxSmallClusterSize

constexpr std::uint64_t ROOT::Experimental::RNTupleWriteOptions::kMaxSmallClusterSize = 512 * 1024 * 1024
staticconstexpr

A maximum size of 512MB still allows for a vector of bool to be stored in a small cluster.

This is the worst case wrt. the maximum required size of the index column. A 32bit index column can address 512MB of 1-bit (on disk size) bools.

Definition at line 72 of file RNTupleWriteOptions.hxx.

Libraries for ROOT::Experimental::RNTupleWriteOptions:

The documentation for this class was generated from the following files: