mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Improve tweaking for high throughput (#610)
* Option "--disable-ext-msg-broadcast" * "Get shard out queue size" query * Move disabling ext msg broadcasts from command-line arguments to config * Fix compilation error * Asynchronous store_cell and gc in celldb * Make GC in celldb work evenly over time * Increase timeouts for downloading blocks * Reuse blocks from previous rounds in validator session * Use Rldp2 in FullNode for downloading persistent states and archives * Improve logs in download-archive-slice and download-state * Decrease delay between serializing shards * Make CellDbIn::load_cell synchronous to avoid interfering with store_cell --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
30c742aedd
commit
47311d6e0e
33 changed files with 712 additions and 163 deletions
|
@ -25,6 +25,7 @@
|
|||
#include "ton/ton-types.h"
|
||||
#include "interfaces/block-handle.h"
|
||||
#include "auto/tl/ton_api.h"
|
||||
#include <queue>
|
||||
|
||||
namespace ton {
|
||||
|
||||
|
@ -84,11 +85,14 @@ class CellDbIn : public CellDbBase {
|
|||
static BlockIdExt get_empty_key();
|
||||
KeyHash get_empty_key_hash();
|
||||
|
||||
void gc();
|
||||
void gc(BlockIdExt block_id);
|
||||
void gc_cont(BlockHandle handle);
|
||||
void gc_cont2(BlockHandle handle);
|
||||
void gc_cont3(BlockIdExt block_id, td::Promise<td::Unit> promise);
|
||||
void skip_gc();
|
||||
|
||||
void store_cell_cont(BlockIdExt block_id, td::Ref<vm::Cell> cell, td::Promise<td::Ref<vm::DataCell>> promise);
|
||||
|
||||
td::actor::ActorId<RootDb> root_db_;
|
||||
td::actor::ActorId<CellDb> parent_;
|
||||
|
||||
|
@ -97,7 +101,12 @@ class CellDbIn : public CellDbBase {
|
|||
std::unique_ptr<vm::DynamicBagOfCellsDb> boc_;
|
||||
std::shared_ptr<vm::KeyValue> cell_db_;
|
||||
|
||||
KeyHash last_gc_;
|
||||
std::queue<td::Promise<td::Unit>> db_queue_;
|
||||
bool db_busy_ = false;
|
||||
|
||||
void enqueue(td::Promise<td::Unit> promise);
|
||||
void release_db();
|
||||
void process_event();
|
||||
};
|
||||
|
||||
class CellDb : public CellDbBase {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue