test 2
This commit is contained in:
parent
dffd66662d
commit
122203d140
|
@ -2585,6 +2585,7 @@ dependencies = [
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"hyper",
|
"hyper",
|
||||||
"itertools 0.10.5",
|
"itertools 0.10.5",
|
||||||
|
"jemalloc-ctl",
|
||||||
"jemallocator",
|
"jemallocator",
|
||||||
"jsonrpsee",
|
"jsonrpsee",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
|
|
|
@ -50,7 +50,8 @@ cap = { version = "0.1.2", features = ["stats"] }
|
||||||
tower = "0.4.13"
|
tower = "0.4.13"
|
||||||
hyper = { version = "0.14", features = ["server", "http1", "http2"] }
|
hyper = { version = "0.14", features = ["server", "http1", "http2"] }
|
||||||
tower-http = { version = "0.4.0", features = ["full"] }
|
tower-http = { version = "0.4.0", features = ["full"] }
|
||||||
jemallocator = { workspace = true }
|
jemallocator = { workspace = true, features = ["profiling"] }
|
||||||
|
jemalloc-ctl = "0.5.4"
|
||||||
|
|
||||||
solana-lite-rpc-core = { workspace = true }
|
solana-lite-rpc-core = { workspace = true }
|
||||||
solana-lite-rpc-util = { workspace = true }
|
solana-lite-rpc-util = { workspace = true }
|
||||||
|
|
|
@ -76,6 +76,12 @@ use tracing_subscriber::EnvFilter;
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
||||||
|
|
||||||
|
// export _RJEM_MALLOC_CONF=prof:true,lg_prof_interval:30,lg_prof_sample:21,prof_prefix:/tmp/jeprof
|
||||||
|
|
||||||
|
use jemalloc_ctl::{epoch, stats};
|
||||||
|
use std::{thread, time::{self}};
|
||||||
|
|
||||||
|
|
||||||
async fn get_latest_block_info(
|
async fn get_latest_block_info(
|
||||||
mut blockinfo_stream: BlockInfoStream,
|
mut blockinfo_stream: BlockInfoStream,
|
||||||
commitment_config: CommitmentConfig,
|
commitment_config: CommitmentConfig,
|
||||||
|
@ -395,6 +401,30 @@ pub async fn start_lite_rpc(args: Config, rpc_client: Arc<RpcClient>) -> anyhow:
|
||||||
));
|
));
|
||||||
drop(slot_notifier);
|
drop(slot_notifier);
|
||||||
|
|
||||||
|
// tokio::spawn(async move {
|
||||||
|
|
||||||
|
// let last_allocated = stats::allocated::read().unwrap();
|
||||||
|
// let last_resident = stats::resident::read().unwrap();
|
||||||
|
// let last_mapped = stats::mapped::read().unwrap();
|
||||||
|
// let last_active = stats::active::read().unwrap();
|
||||||
|
|
||||||
|
// loop {
|
||||||
|
// thread::sleep(time::Duration::from_secs(10));
|
||||||
|
// // Retrieve memory statistics
|
||||||
|
// // let stats = stats::active::mib().unwrap().read().unwrap();
|
||||||
|
|
||||||
|
// let allocated = stats::allocated::read().unwrap();
|
||||||
|
// let resident = stats::resident::read().unwrap();
|
||||||
|
// let mapped = stats::mapped::read().unwrap();
|
||||||
|
// let active = stats::active::read().unwrap();
|
||||||
|
|
||||||
|
// info!("Current allocated memory: {} bytes -- diff {}", allocated, last_allocated as i64 - allocated as i64);
|
||||||
|
// info!("Current resident memory: {} bytes -- diff {}", resident, last_resident as i64 - resident as i64);
|
||||||
|
// info!("Current mapped memory: {} bytes -- diff {}", mapped, last_mapped as i64 - mapped as i64);
|
||||||
|
// info!("Current active memory: {} bytes -- diff {}\n", active, last_active as i64 - active as i64);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
res = tx_service_jh => {
|
res = tx_service_jh => {
|
||||||
anyhow::bail!("Tx Services {res:?}")
|
anyhow::bail!("Tx Services {res:?}")
|
||||||
|
|
|
@ -11,7 +11,6 @@ use tokio::time::Instant;
|
||||||
|
|
||||||
use crate::setup::setup_tx_service;
|
use crate::setup::setup_tx_service;
|
||||||
|
|
||||||
use jemalloc_ctl::{epoch, stats};
|
|
||||||
|
|
||||||
mod setup;
|
mod setup;
|
||||||
|
|
||||||
|
@ -27,29 +26,7 @@ pub async fn txn_broadcast() -> anyhow::Result<()> {
|
||||||
tracing_subscriber::fmt::init();
|
tracing_subscriber::fmt::init();
|
||||||
info!("START BENCHMARK: txn_broadcast");
|
info!("START BENCHMARK: txn_broadcast");
|
||||||
|
|
||||||
tokio::spawn(async move {
|
|
||||||
|
|
||||||
let mut last_allocated = stats::allocated::read().unwrap();
|
|
||||||
let mut last_resident = stats::resident::read().unwrap();
|
|
||||||
let mut last_mapped = stats::mapped::read().unwrap();
|
|
||||||
let mut last_active = stats::active::read().unwrap();
|
|
||||||
|
|
||||||
loop {
|
|
||||||
thread::sleep(time::Duration::from_secs(10));
|
|
||||||
// Retrieve memory statistics
|
|
||||||
// let stats = stats::active::mib().unwrap().read().unwrap();
|
|
||||||
|
|
||||||
let allocated = stats::allocated::read().unwrap();
|
|
||||||
let resident = stats::resident::read().unwrap();
|
|
||||||
let mapped = stats::mapped::read().unwrap();
|
|
||||||
let active = stats::active::read().unwrap();
|
|
||||||
|
|
||||||
info!("Current allocated memory: {} bytes -- diff {}", allocated, last_allocated as i64 - allocated as i64);
|
|
||||||
info!("Current resident memory: {} bytes -- diff {}", resident, last_resident as i64 - resident as i64);
|
|
||||||
info!("Current mapped memory: {} bytes -- diff {}", mapped, last_mapped as i64 - mapped as i64);
|
|
||||||
info!("Current active memory: {} bytes -- diff {}", active, last_active as i64 - active as i64);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
debug!("spawning tx_service");
|
debug!("spawning tx_service");
|
||||||
let (transaction_service, data_cache, _tx_jh) = setup_tx_service().await?;
|
let (transaction_service, data_cache, _tx_jh) = setup_tx_service().await?;
|
||||||
|
|
Loading…
Reference in New Issue