46 + std::string(
"/snapshot_")
47 + std::to_string(snapshot_id)
49 + std::to_string(node);
73 "String pattern of path of snapshot folders in each NUMA node.\n"
74 "This specifies the path of the folders to contain snapshot files in each NUMA node.\n"
75 " A special placeholder $NODE$ will be replaced with the NUMA node number."
76 " For example, /data/node_$NODE$ becomes /data/node_1 on node-1.");
78 "When the main page pool runs under this percent (roughly calculated) of free pages,\n"
79 " snapshot manager starts snapshotting to drop volatile pages even before the interval.");
81 "Interval in milliseconds to take snapshots.");
83 "Size in KB of bucket (buffer for each partition) in mapper."
84 " The larger, the less freuquently each mapper communicates with reducers."
85 " 1024 (1MB) should be a good number.");
87 "Size in MB of IO buffer to read log files in mapper."
88 " This buffer is also the unit of batch processing in mapper.");
90 "Whether to sort logs in mapper side before sending it to reducer.");
92 "The size in MB of a buffer to store log entries in reducer (partition).");
94 "The size in MB of a buffer to write out sorted log entries in reducer to a temporary file.");
96 "The size in KB of a buffer in reducer to read one temporary file. Note that the total"
97 " memory consumption is this number times the number of temporary files. It's a merge-sort.");
99 "The size in MB of one snapshot writer, which holds data pages modified in the snapshot"
100 " and them sequentially dumps them to a file for each storage.");
102 "The size in MB of additional page pool for one snapshot writer just for holding"
103 " intermediate pages.");
105 "[Experiments-only] Settings to emulate slower data device",
emulation_));
#define EXTERNALIZE_LOAD_ELEMENT(element, attribute)
Reads a child xml element to load a member variable of this object.
static ErrorStack get_child_element(tinyxml2::XMLElement *parent, const std::string &tag, Externalizable *child, bool optional=false)
child Externalizable version
uint32_t snapshot_writer_page_pool_size_mb_
The size in MB of one snapshot writer, which holds data pages modified in the snapshot and them seque...
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
ErrorStack load(tinyxml2::XMLElement *element) override
Reads the content of this object from the given XML element.
static ErrorStack add_child_element(tinyxml2::XMLElement *parent, const std::string &tag, const std::string &comment, const Externalizable &child)
child Externalizable version
foedus::fs::DeviceEmulationOptions emulation_
Settings to emulate slower data device.
Brings error stacktrace information as return value of functions.
SnapshotOptions()
Constructs option values with default values.
uint32_t log_mapper_bucket_kb_
The size in KB of bucket (buffer for each partition) in mapper.
static ErrorStack insert_comment(tinyxml2::XMLElement *element, const std::string &comment)
bool log_mapper_sort_before_send_
Whether to sort logs in mapper side before sending it to reducer.
uint16_t log_mapper_io_buffer_mb_
The size in MB of IO buffer to read log files in mapper.
uint32_t snapshot_interval_milliseconds_
Interval in milliseconds to take snapshots.
uint32_t log_reducer_read_io_buffer_kb_
The size in KB of a buffer in reducer to read one temporary file.
std::string replace_all(const std::string &target, const std::string &search, const std::string &replacement)
target.replaceAll(search, replacement).
std::basic_string< CHAR > str() const
Convert to a std::string object.
std::string construct_snapshot_file_path(int snapshot_id, int node) const
'folder_path'/snapshot_'snapshot-id'node'node-id'.data.
ErrorStack save(tinyxml2::XMLElement *element) const override
Writes the content of this object to the given XML element.
uint32_t log_reducer_buffer_mb_
The size in MB of a buffer to store log entries in reducer (partition).
#define CHECK_ERROR(x)
This macro calls x and checks its returned value.
const ErrorStack kRetOk
Normal return value for no-error case.
fs::FixedPath folder_path_pattern_
String pattern of path of snapshot folders in each NUMA node.
#define EXTERNALIZE_SAVE_ELEMENT(element, attribute, comment)
Adds an xml element to represent a member variable of this object.
uint32_t log_reducer_dump_io_buffer_mb_
The size in MB of a buffer to write out sorted log entries in reducer to a temporary file...
uint32_t snapshot_writer_intermediate_pool_size_mb_
The size in MB of additional page pool for one snapshot writer just for holding intermediate pages...
std::string convert_folder_path_pattern(int node) const
converts folder_path_pattern_ into a string with the given node.
uint16_t snapshot_trigger_page_pool_percent_
When the main page pool runs under this percent (roughly calculated) of free pages, snapshot manager starts snapshotting to drop volatile pages even before the interval.