mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
The "sweep interval" is the amount of time between successive sweeps of
of various in-memory data structures to remove stale items.
Prior to this commit, the interval was automatically adjusted, based on
the value of the `[node_size]` option in a server's configuration file.
If merged, this commit introduces a new configuration option that makes
it possible for a server operator to adjust the sweep interval and make
a CPU/memory tradeoff:
[sweep_interval]
<integer>
The specified value represents the number of seconds between successive
sweeps. The range of valid values is between 10 and 600.
Important operator notes:
This is an advanced configuration option that should not be used unless
there is empirical data which suggests that the default sweep frequency
is either resulting in performance problems or is causing undue load to
the server.
Note that adjusting the sweep interval may not have the intended effect
on the server. Lower values will not always translate to a reduction of
memory usage and higher values will not always translate to a reduction
of CPU usage and/or load.
106 lines
4.0 KiB
C++
106 lines
4.0 KiB
C++
//------------------------------------------------------------------------------
|
|
/*
|
|
This file is part of rippled: https://github.com/ripple/rippled
|
|
Copyright (c) 2012, 2013 Ripple Labs Inc.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
//==============================================================================
|
|
|
|
#ifndef RIPPLE_CORE_CONFIGSECTIONS_H_INCLUDED
|
|
#define RIPPLE_CORE_CONFIGSECTIONS_H_INCLUDED
|
|
|
|
#include <string>
|
|
|
|
namespace ripple {
|
|
|
|
// VFALCO DEPRECATED in favor of the BasicConfig interface
|
|
struct ConfigSection
|
|
{
|
|
explicit ConfigSection() = default;
|
|
|
|
static std::string
|
|
nodeDatabase()
|
|
{
|
|
return "node_db";
|
|
}
|
|
static std::string
|
|
shardDatabase()
|
|
{
|
|
return "shard_db";
|
|
}
|
|
static std::string
|
|
importNodeDatabase()
|
|
{
|
|
return "import_db";
|
|
}
|
|
};
|
|
|
|
// VFALCO TODO Rename and replace these macros with variables.
|
|
#define SECTION_AMENDMENTS "amendments"
|
|
#define SECTION_AMENDMENT_MAJORITY_TIME "amendment_majority_time"
|
|
#define SECTION_CLUSTER_NODES "cluster_nodes"
|
|
#define SECTION_COMPRESSION "compression"
|
|
#define SECTION_DEBUG_LOGFILE "debug_logfile"
|
|
#define SECTION_ELB_SUPPORT "elb_support"
|
|
#define SECTION_FEE_DEFAULT "fee_default"
|
|
#define SECTION_FEE_ACCOUNT_RESERVE "fee_account_reserve"
|
|
#define SECTION_FEE_OWNER_RESERVE "fee_owner_reserve"
|
|
#define SECTION_FETCH_DEPTH "fetch_depth"
|
|
#define SECTION_HISTORICAL_SHARD_PATHS "historical_shard_paths"
|
|
#define SECTION_INSIGHT "insight"
|
|
#define SECTION_IPS "ips"
|
|
#define SECTION_IPS_FIXED "ips_fixed"
|
|
#define SECTION_LEDGER_HISTORY "ledger_history"
|
|
#define SECTION_MAX_TRANSACTIONS "max_transactions"
|
|
#define SECTION_NETWORK_QUORUM "network_quorum"
|
|
#define SECTION_NODE_SEED "node_seed"
|
|
#define SECTION_NODE_SIZE "node_size"
|
|
#define SECTION_OVERLAY "overlay"
|
|
#define SECTION_PATH_SEARCH_OLD "path_search_old"
|
|
#define SECTION_PATH_SEARCH "path_search"
|
|
#define SECTION_PATH_SEARCH_FAST "path_search_fast"
|
|
#define SECTION_PATH_SEARCH_MAX "path_search_max"
|
|
#define SECTION_PEER_PRIVATE "peer_private"
|
|
#define SECTION_PEERS_MAX "peers_max"
|
|
#define SECTION_PEERS_IN_MAX "peers_in_max"
|
|
#define SECTION_PEERS_OUT_MAX "peers_out_max"
|
|
#define SECTION_REDUCE_RELAY "reduce_relay"
|
|
#define SECTION_RELATIONAL_DB "relational_db"
|
|
#define SECTION_RELAY_PROPOSALS "relay_proposals"
|
|
#define SECTION_RELAY_VALIDATIONS "relay_validations"
|
|
#define SECTION_RPC_STARTUP "rpc_startup"
|
|
#define SECTION_SIGNING_SUPPORT "signing_support"
|
|
#define SECTION_SNTP "sntp_servers"
|
|
#define SECTION_SSL_VERIFY "ssl_verify"
|
|
#define SECTION_SSL_VERIFY_FILE "ssl_verify_file"
|
|
#define SECTION_SSL_VERIFY_DIR "ssl_verify_dir"
|
|
#define SECTION_SERVER_DOMAIN "server_domain"
|
|
#define SECTION_VALIDATORS_FILE "validators_file"
|
|
#define SECTION_VALIDATION_SEED "validation_seed"
|
|
#define SECTION_VALIDATOR_KEYS "validator_keys"
|
|
#define SECTION_VALIDATOR_KEY_REVOCATION "validator_key_revocation"
|
|
#define SECTION_VALIDATOR_LIST_KEYS "validator_list_keys"
|
|
#define SECTION_VALIDATOR_LIST_SITES "validator_list_sites"
|
|
#define SECTION_VALIDATORS "validators"
|
|
#define SECTION_VALIDATOR_TOKEN "validator_token"
|
|
#define SECTION_VETO_AMENDMENTS "veto_amendments"
|
|
#define SECTION_WORKERS "workers"
|
|
#define SECTION_LEDGER_REPLAY "ledger_replay"
|
|
#define SECTION_BETA_RPC_API "beta_rpc_api"
|
|
#define SECTION_SWEEP_INTERVAL "sweep_interval"
|
|
|
|
} // namespace ripple
|
|
|
|
#endif
|