From 74c2083544c369b4c3f3b3affec4aaac95c48af2 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Wed, 17 Aug 2022 08:40:23 -0700 Subject: [PATCH] Standardize thread names Tenets: 1. Limit thread names to 15 characters 2. Prefix all Solana-controlled threads with "sol" 3. Use Camel case. It's more character dense than Snake or Kebab case --- client/src/rpc_client.rs | 2 +- core/src/accounts_hash_verifier.rs | 2 +- core/src/ancestor_hashes_service.rs | 4 ++-- core/src/banking_stage.rs | 2 +- core/src/broadcast_stage.rs | 8 ++++---- core/src/cluster_info_vote_listener.rs | 6 +++--- core/src/cluster_slots_service.rs | 2 +- core/src/commitment_service.rs | 2 +- core/src/completed_data_sets_service.rs | 2 +- core/src/cost_update_service.rs | 2 +- core/src/drop_bank_service.rs | 2 +- core/src/fetch_stage.rs | 4 ++-- core/src/find_packet_sender_stake_stage.rs | 2 +- core/src/ledger_cleanup_service.rs | 4 ++-- core/src/ledger_metric_report_service.rs | 2 +- core/src/qos_service.rs | 2 +- core/src/repair_service.rs | 2 +- core/src/replay_stage.rs | 4 ++-- core/src/retransmit_stage.rs | 4 ++-- core/src/serve_repair.rs | 2 +- core/src/serve_repair_service.rs | 2 +- core/src/shred_fetch_stage.rs | 2 +- core/src/sigverify_stage.rs | 2 +- core/src/snapshot_packager_service.rs | 2 +- core/src/staked_nodes_updater_service.rs | 2 +- core/src/stats_reporter_service.rs | 2 +- core/src/system_monitor_service.rs | 2 +- core/src/tpu.rs | 4 ++-- core/src/voting_service.rs | 2 +- core/src/window_service.rs | 6 +++--- entry/src/entry.rs | 2 +- gossip/src/cluster_info.rs | 12 ++++++------ gossip/src/gossip_service.rs | 2 +- gossip/tests/crds_gossip.rs | 2 +- ledger/src/blockstore.rs | 4 ++-- ledger/src/blockstore_processor.rs | 2 +- ledger/src/shredder.rs | 2 +- ledger/src/sigverify_shreds.rs | 2 +- perf/src/sigverify.rs | 2 +- poh/src/poh_service.rs | 4 ++-- rpc/src/optimistically_confirmed_bank_tracker.rs | 2 +- rpc/src/rpc_completed_slots_service.rs | 2 +- rpc/src/rpc_pubsub_service.rs | 4 ++-- rpc/src/rpc_service.rs | 6 +++--- rpc/src/rpc_subscriptions.rs | 2 +- runtime/src/accounts_background_service.rs | 2 +- runtime/src/accounts_db.rs | 6 +++--- runtime/src/accounts_index_storage.rs | 2 +- runtime/src/shared_buffer_reader.rs | 2 +- .../src/send_transaction_service.rs | 4 ++-- streamer/src/streamer.rs | 6 +++--- validator/src/admin_rpc_service.rs | 4 ++-- 52 files changed, 81 insertions(+), 81 deletions(-) diff --git a/client/src/rpc_client.rs b/client/src/rpc_client.rs index b89b906e57ade4..c387fe6e749b25 100644 --- a/client/src/rpc_client.rs +++ b/client/src/rpc_client.rs @@ -178,7 +178,7 @@ impl RpcClient { )), runtime: Some( tokio::runtime::Builder::new_current_thread() - .thread_name("rpc-client") + .thread_name("solRpcClient") .enable_io() .enable_time() .build() diff --git a/core/src/accounts_hash_verifier.rs b/core/src/accounts_hash_verifier.rs index 118529dd983640..6dbdbaa9237087 100644 --- a/core/src/accounts_hash_verifier.rs +++ b/core/src/accounts_hash_verifier.rs @@ -50,7 +50,7 @@ impl AccountsHashVerifier { let exit = exit.clone(); let cluster_info = cluster_info.clone(); let t_accounts_hash_verifier = Builder::new() - .name("solana-hash-accounts".to_string()) + .name("solAcctHashVer".to_string()) .spawn(move || { let mut hashes = vec![]; loop { diff --git a/core/src/ancestor_hashes_service.rs b/core/src/ancestor_hashes_service.rs index 4813ed11685069..3f81d38e2a31b3 100644 --- a/core/src/ancestor_hashes_service.rs +++ b/core/src/ancestor_hashes_service.rs @@ -215,7 +215,7 @@ impl AncestorHashesService { ancestor_socket: Arc, ) -> JoinHandle<()> { Builder::new() - .name("solana-ancestor-hashes-responses-service".to_string()) + .name("solAncHashesSvc".to_string()) .spawn(move || { let mut last_stats_report = Instant::now(); let mut stats = AncestorHashesResponsesStats::default(); @@ -538,7 +538,7 @@ impl AncestorHashesService { // to MAX_ANCESTOR_HASHES_SLOT_REQUESTS_PER_SECOND/second let mut request_throttle = vec![]; Builder::new() - .name("solana-manage-ancestor-requests".to_string()) + .name("solManAncReqs".to_string()) .spawn(move || loop { if exit.load(Ordering::Relaxed) { return; diff --git a/core/src/banking_stage.rs b/core/src/banking_stage.rs index 1c3e95e2bd6c5d..070a9671734727 100644 --- a/core/src/banking_stage.rs +++ b/core/src/banking_stage.rs @@ -466,7 +466,7 @@ impl BankingStage { let connection_cache = connection_cache.clone(); let bank_forks = bank_forks.clone(); Builder::new() - .name(format!("solana-banking-stage-tx-{}", i)) + .name(format!("solBanknStgTx{}", i)) .spawn(move || { Self::process_loop( &verified_receiver, diff --git a/core/src/broadcast_stage.rs b/core/src/broadcast_stage.rs index ba4c33fa38cc46..68729600d1983e 100644 --- a/core/src/broadcast_stage.rs +++ b/core/src/broadcast_stage.rs @@ -255,7 +255,7 @@ impl BroadcastStage { let blockstore = blockstore.clone(); let cluster_info = cluster_info.clone(); Builder::new() - .name("solana-broadcaster".to_string()) + .name("solBroadcast".to_string()) .spawn(move || { let _finalizer = Finalizer::new(exit); Self::run( @@ -277,7 +277,7 @@ impl BroadcastStage { let cluster_info = cluster_info.clone(); let bank_forks = bank_forks.clone(); let t = Builder::new() - .name("solana-broadcaster-transmit".to_string()) + .name("solBroadcastTx".to_string()) .spawn(move || loop { let res = bs_transmit.transmit(&socket_receiver, &cluster_info, &sock, &bank_forks); @@ -295,7 +295,7 @@ impl BroadcastStage { let mut bs_record = broadcast_stage_run.clone(); let btree = blockstore.clone(); let t = Builder::new() - .name("solana-broadcaster-record".to_string()) + .name("solBroadcastRec".to_string()) .spawn(move || loop { let res = bs_record.record(&blockstore_receiver, &btree); let res = Self::handle_error(res, "solana-broadcaster-record"); @@ -308,7 +308,7 @@ impl BroadcastStage { } let retransmit_thread = Builder::new() - .name("solana-broadcaster-retransmit".to_string()) + .name("solBroadcastRtx".to_string()) .spawn(move || loop { if let Some(res) = Self::handle_error( Self::check_retransmit_signals( diff --git a/core/src/cluster_info_vote_listener.rs b/core/src/cluster_info_vote_listener.rs index ed94724824ff2d..bbe7c2b4a67e79 100644 --- a/core/src/cluster_info_vote_listener.rs +++ b/core/src/cluster_info_vote_listener.rs @@ -252,7 +252,7 @@ impl ClusterInfoVoteListener { let exit = exit.clone(); let bank_forks = bank_forks.clone(); Builder::new() - .name("solana-cluster_info_vote_listener".to_string()) + .name("solCiVoteLstnr".to_string()) .spawn(move || { let _ = Self::recv_loop( exit, @@ -266,7 +266,7 @@ impl ClusterInfoVoteListener { }; let exit_ = exit.clone(); let bank_send_thread = Builder::new() - .name("solana-cluster_info_bank_send".to_string()) + .name("solCiBankSend".to_string()) .spawn(move || { let _ = Self::bank_send_loop( exit_, @@ -278,7 +278,7 @@ impl ClusterInfoVoteListener { .unwrap(); let send_thread = Builder::new() - .name("solana-cluster_info_process_votes".to_string()) + .name("solCiProcVotes".to_string()) .spawn(move || { let _ = Self::process_votes_loop( exit, diff --git a/core/src/cluster_slots_service.rs b/core/src/cluster_slots_service.rs index 119f6081cff0e4..f867981f6afb9b 100644 --- a/core/src/cluster_slots_service.rs +++ b/core/src/cluster_slots_service.rs @@ -48,7 +48,7 @@ impl ClusterSlotsService { Self::initialize_lowest_slot(&blockstore, &cluster_info); Self::initialize_epoch_slots(&bank_forks, &cluster_info); let t_cluster_slots_service = Builder::new() - .name("solana-cluster-slots-service".to_string()) + .name("solClusterSlots".to_string()) .spawn(move || { Self::run( blockstore, diff --git a/core/src/commitment_service.rs b/core/src/commitment_service.rs index 0922345a096f2d..92bab89107545c 100644 --- a/core/src/commitment_service.rs +++ b/core/src/commitment_service.rs @@ -69,7 +69,7 @@ impl AggregateCommitmentService { sender, Self { t_commitment: Builder::new() - .name("solana-aggregate-stake-lockouts".to_string()) + .name("solAggCommitSvc".to_string()) .spawn(move || loop { if exit_.load(Ordering::Relaxed) { break; diff --git a/core/src/completed_data_sets_service.rs b/core/src/completed_data_sets_service.rs index 08b561b8aca12f..ff11dfa1fb454a 100644 --- a/core/src/completed_data_sets_service.rs +++ b/core/src/completed_data_sets_service.rs @@ -31,7 +31,7 @@ impl CompletedDataSetsService { ) -> Self { let exit = exit.clone(); let thread_hdl = Builder::new() - .name("completed-data-set-service".to_string()) + .name("solComplDataSet".to_string()) .spawn(move || loop { if exit.load(Ordering::Relaxed) { break; diff --git a/core/src/cost_update_service.rs b/core/src/cost_update_service.rs index cf1a55365f444e..8f5038c0c91633 100644 --- a/core/src/cost_update_service.rs +++ b/core/src/cost_update_service.rs @@ -75,7 +75,7 @@ impl CostUpdateService { cost_update_receiver: CostUpdateReceiver, ) -> Self { let thread_hdl = Builder::new() - .name("solana-cost-update-service".to_string()) + .name("solCostUpdtSvc".to_string()) .spawn(move || { Self::service_loop(blockstore, cost_model, cost_update_receiver); }) diff --git a/core/src/drop_bank_service.rs b/core/src/drop_bank_service.rs index aac1a02ee0344d..0321643d6aab68 100644 --- a/core/src/drop_bank_service.rs +++ b/core/src/drop_bank_service.rs @@ -15,7 +15,7 @@ pub struct DropBankService { impl DropBankService { pub fn new(bank_receiver: Receiver>>) -> Self { let thread_hdl = Builder::new() - .name("sol-drop-b-service".to_string()) + .name("solDropBankSrvc".to_string()) .spawn(move || { for banks in bank_receiver.iter() { let len = banks.len(); diff --git a/core/src/fetch_stage.rs b/core/src/fetch_stage.rs index c041739d7c8d4e..93d8ed28ac1bd1 100644 --- a/core/src/fetch_stage.rs +++ b/core/src/fetch_stage.rs @@ -208,7 +208,7 @@ impl FetchStage { let poh_recorder = poh_recorder.clone(); let fwd_thread_hdl = Builder::new() - .name("solana-fetch-stage-fwd-rcvr".to_string()) + .name("solFetchStgFwRx".to_string()) .spawn(move || loop { if let Err(e) = Self::handle_forwarded_packets(&forward_receiver, &sender, &poh_recorder) @@ -226,7 +226,7 @@ impl FetchStage { let exit = exit.clone(); let metrics_thread_hdl = Builder::new() - .name("solana-fetch-stage-metrics".to_string()) + .name("solFetchStgMetr".to_string()) .spawn(move || loop { sleep(Duration::from_secs(1)); diff --git a/core/src/find_packet_sender_stake_stage.rs b/core/src/find_packet_sender_stake_stage.rs index d62d6afe7c8dac..53f1d033669a34 100644 --- a/core/src/find_packet_sender_stake_stage.rs +++ b/core/src/find_packet_sender_stake_stage.rs @@ -84,7 +84,7 @@ impl FindPacketSenderStakeStage { ) -> Self { let mut stats = FindPacketSenderStakeStats::default(); let thread_hdl = Builder::new() - .name("find-packet-sender-stake".to_string()) + .name("solPktStake".to_string()) .spawn(move || loop { match streamer::recv_packet_batches(&packet_receiver) { Ok((mut batches, num_packets, recv_duration)) => { diff --git a/core/src/ledger_cleanup_service.rs b/core/src/ledger_cleanup_service.rs index 5c006c82613373..8c808609fdae82 100644 --- a/core/src/ledger_cleanup_service.rs +++ b/core/src/ledger_cleanup_service.rs @@ -76,7 +76,7 @@ impl LedgerCleanupService { let blockstore_compact = blockstore.clone(); let t_cleanup = Builder::new() - .name("sol-led-cleanup".to_string()) + .name("solLedgerClean".to_string()) .spawn(move || loop { if exit.load(Ordering::Relaxed) { break; @@ -98,7 +98,7 @@ impl LedgerCleanupService { .unwrap(); let t_compact = Builder::new() - .name("sol-led-compact".to_string()) + .name("solLedgerComp".to_string()) .spawn(move || loop { if exit_compact.load(Ordering::Relaxed) { break; diff --git a/core/src/ledger_metric_report_service.rs b/core/src/ledger_metric_report_service.rs index 8d0b96d28c3500..1f8636bff6a546 100644 --- a/core/src/ledger_metric_report_service.rs +++ b/core/src/ledger_metric_report_service.rs @@ -26,7 +26,7 @@ impl LedgerMetricReportService { pub fn new(blockstore: Arc, exit: &Arc) -> Self { let exit_signal = exit.clone(); let t_cf_metric = Builder::new() - .name("metric_report_rocksdb_cf_metrics".to_string()) + .name("solRocksCfMtrcs".to_string()) .spawn(move || loop { if exit_signal.load(Ordering::Relaxed) { break; diff --git a/core/src/qos_service.rs b/core/src/qos_service.rs index fb493f674343bb..9b54e2a302c46d 100644 --- a/core/src/qos_service.rs +++ b/core/src/qos_service.rs @@ -72,7 +72,7 @@ impl QosService { let metrics_clone = Arc::clone(&metrics); let reporting_thread = Some( Builder::new() - .name("solana-qos-service-metrics-repoting".to_string()) + .name("solQosSvcMetr".to_string()) .spawn(move || { Self::reporting_loop(running_flag_clone, metrics_clone, report_receiver); }) diff --git a/core/src/repair_service.rs b/core/src/repair_service.rs index 018824c7935e9e..2b8bda8705842c 100644 --- a/core/src/repair_service.rs +++ b/core/src/repair_service.rs @@ -212,7 +212,7 @@ impl RepairService { let exit = exit.clone(); let repair_info = repair_info.clone(); Builder::new() - .name("solana-repair-service".to_string()) + .name("solRepairSvc".to_string()) .spawn(move || { Self::run( &blockstore, diff --git a/core/src/replay_stage.rs b/core/src/replay_stage.rs index 8b611e96a0d19c..ee0c10a66091f0 100644 --- a/core/src/replay_stage.rs +++ b/core/src/replay_stage.rs @@ -97,7 +97,7 @@ const MAX_CONCURRENT_FORKS_TO_REPLAY: usize = 4; lazy_static! { static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new() .num_threads(MAX_CONCURRENT_FORKS_TO_REPLAY) - .thread_name(|ix| format!("replay_{}", ix)) + .thread_name(|ix| format!("solReplay{}", ix)) .build() .unwrap(); } @@ -436,7 +436,7 @@ impl ReplayStage { #[allow(clippy::cognitive_complexity)] let t_replay = Builder::new() - .name("solana-replay-stage".to_string()) + .name("solReplayStage".to_string()) .spawn(move || { let verify_recyclers = VerifyRecyclers::default(); let _exit = Finalizer::new(exit.clone()); diff --git a/core/src/retransmit_stage.rs b/core/src/retransmit_stage.rs index c6d3855f72b640..26f67f68053f2a 100644 --- a/core/src/retransmit_stage.rs +++ b/core/src/retransmit_stage.rs @@ -364,11 +364,11 @@ pub fn retransmitter( let num_threads = get_thread_count().min(8).max(sockets.len()); let thread_pool = ThreadPoolBuilder::new() .num_threads(num_threads) - .thread_name(|i| format!("retransmit-{}", i)) + .thread_name(|i| format!("solRetransmit{}", i)) .build() .unwrap(); Builder::new() - .name("solana-retransmitter".to_string()) + .name("solRetransmittr".to_string()) .spawn(move || loop { match retransmit( &thread_pool, diff --git a/core/src/serve_repair.rs b/core/src/serve_repair.rs index 47443bcd9acc2d..0b7d63a7ddc2f7 100644 --- a/core/src/serve_repair.rs +++ b/core/src/serve_repair.rs @@ -567,7 +567,7 @@ impl ServeRepair { let recycler = PacketBatchRecycler::default(); Builder::new() - .name("solana-repair-listen".to_string()) + .name("solRepairListen".to_string()) .spawn(move || { let mut last_print = Instant::now(); let mut stats = ServeRepairStats::default(); diff --git a/core/src/serve_repair_service.rs b/core/src/serve_repair_service.rs index 72dc7a49e66553..144de5c2a98d48 100644 --- a/core/src/serve_repair_service.rs +++ b/core/src/serve_repair_service.rs @@ -46,7 +46,7 @@ impl ServeRepairService { ); let (response_sender, response_receiver) = unbounded(); let t_responder = streamer::responder( - "serve-repairs", + "Repair", serve_repair_socket, response_receiver, socket_addr_space, diff --git a/core/src/shred_fetch_stage.rs b/core/src/shred_fetch_stage.rs index d9427e30f64da2..25c9b00cdf7c76 100644 --- a/core/src/shred_fetch_stage.rs +++ b/core/src/shred_fetch_stage.rs @@ -135,7 +135,7 @@ impl ShredFetchStage { }) .collect(); let modifier_hdl = Builder::new() - .name("solana-tvu-fetch-stage-packet-modifier".to_string()) + .name("solTvuFetchPMod".to_string()) .spawn(move || { let repair_context = repair_context .as_ref() diff --git a/core/src/sigverify_stage.rs b/core/src/sigverify_stage.rs index 75c863e9f16c9a..30174dc986888b 100644 --- a/core/src/sigverify_stage.rs +++ b/core/src/sigverify_stage.rs @@ -412,7 +412,7 @@ impl SigVerifyStage { const MAX_DEDUPER_AGE: Duration = Duration::from_secs(2); const MAX_DEDUPER_ITEMS: u32 = 1_000_000; Builder::new() - .name("solana-verifier".to_string()) + .name("solSigVerifier".to_string()) .spawn(move || { let mut deduper = Deduper::new(MAX_DEDUPER_ITEMS, MAX_DEDUPER_AGE); loop { diff --git a/core/src/snapshot_packager_service.rs b/core/src/snapshot_packager_service.rs index 7077362e4b8725..3234dcbeea2c15 100644 --- a/core/src/snapshot_packager_service.rs +++ b/core/src/snapshot_packager_service.rs @@ -49,7 +49,7 @@ impl SnapshotPackagerService { ); let t_snapshot_packager = Builder::new() - .name("snapshot-packager".to_string()) + .name("solSnapshotPkgr".to_string()) .spawn(move || { renice_this_thread(snapshot_config.packager_thread_niceness_adj).unwrap(); let mut snapshot_gossip_manager = if enable_gossip_push { diff --git a/core/src/staked_nodes_updater_service.rs b/core/src/staked_nodes_updater_service.rs index 97b9914ea1042f..73b3c6ec8c2323 100644 --- a/core/src/staked_nodes_updater_service.rs +++ b/core/src/staked_nodes_updater_service.rs @@ -30,7 +30,7 @@ impl StakedNodesUpdaterService { shared_staked_nodes_overrides: Arc>>, ) -> Self { let thread_hdl = Builder::new() - .name("sol-sn-updater".to_string()) + .name("solStakedNodeUd".to_string()) .spawn(move || { let mut last_stakes = Instant::now(); while !exit.load(Ordering::Relaxed) { diff --git a/core/src/stats_reporter_service.rs b/core/src/stats_reporter_service.rs index b6f23e4162e08e..90e72aaadb3e46 100644 --- a/core/src/stats_reporter_service.rs +++ b/core/src/stats_reporter_service.rs @@ -22,7 +22,7 @@ impl StatsReporterService { ) -> Self { let exit = exit.clone(); let thread_hdl = Builder::new() - .name("solana-stats-reporter".to_owned()) + .name("solStatsReport".to_owned()) .spawn(move || loop { if exit.load(Ordering::Relaxed) { return; diff --git a/core/src/system_monitor_service.rs b/core/src/system_monitor_service.rs index 3b11d4b6a1a424..dc6146ed1abc75 100644 --- a/core/src/system_monitor_service.rs +++ b/core/src/system_monitor_service.rs @@ -363,7 +363,7 @@ impl SystemMonitorService { ) -> Self { info!("Starting SystemMonitorService"); let thread_hdl = Builder::new() - .name("system-monitor".to_string()) + .name("solSystemMonitr".to_string()) .spawn(move || { Self::run( exit, diff --git a/core/src/tpu.rs b/core/src/tpu.rs index e969ba90eed03a..5b86610ff2a6ea 100644 --- a/core/src/tpu.rs +++ b/core/src/tpu.rs @@ -141,7 +141,7 @@ impl Tpu { packet_receiver, find_packet_sender_stake_sender, staked_nodes.clone(), - "tpu-find-packet-sender-stake", + "Tpu", ); let (vote_find_packet_sender_stake_sender, vote_find_packet_sender_stake_receiver) = @@ -151,7 +151,7 @@ impl Tpu { vote_packet_receiver, vote_find_packet_sender_stake_sender, staked_nodes.clone(), - "tpu-vote-find-packet-sender-stake", + "Vote", ); let (verified_sender, verified_receiver) = unbounded(); diff --git a/core/src/voting_service.rs b/core/src/voting_service.rs index 29cf4699dd575e..cbd53a1c3bc23b 100644 --- a/core/src/voting_service.rs +++ b/core/src/voting_service.rs @@ -46,7 +46,7 @@ impl VotingService { bank_forks: Arc>, ) -> Self { let thread_hdl = Builder::new() - .name("sol-vote-service".to_string()) + .name("solVoteService".to_string()) .spawn(move || { for vote_op in vote_receiver.iter() { let rooted_bank = bank_forks.read().unwrap().root_bank().clone(); diff --git a/core/src/window_service.rs b/core/src/window_service.rs index da4cbcb4452b11..138d2f8f201c38 100644 --- a/core/src/window_service.rs +++ b/core/src/window_service.rs @@ -375,7 +375,7 @@ impl WindowService { inc_new_counter_error!("solana-check-duplicate-error", 1, 1); }; Builder::new() - .name("solana-check-duplicate".to_string()) + .name("solWinCheckDup".to_string()) .spawn(move || { while !exit.load(Ordering::Relaxed) { if let Err(e) = run_check_duplicate( @@ -408,11 +408,11 @@ impl WindowService { }; let thread_pool = rayon::ThreadPoolBuilder::new() .num_threads(get_thread_count().min(8)) - .thread_name(|i| format!("window-insert-{}", i)) + .thread_name(|i| format!("solWinInsert{}", i)) .build() .unwrap(); Builder::new() - .name("solana-window-insert".to_string()) + .name("solWinInsert".to_string()) .spawn(move || { let handle_duplicate = |shred| { let _ = check_duplicate_sender.send(shred); diff --git a/entry/src/entry.rs b/entry/src/entry.rs index bfdba187d00743..9342c8c4d06884 100644 --- a/entry/src/entry.rs +++ b/entry/src/entry.rs @@ -46,7 +46,7 @@ use { lazy_static! { static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new() .num_threads(get_max_thread_count()) - .thread_name(|ix| format!("entry_{}", ix)) + .thread_name(|ix| format!("solEntry{}", ix)) .build() .unwrap(); } diff --git a/gossip/src/cluster_info.rs b/gossip/src/cluster_info.rs index 9d692b8a08aba6..16eacfe3227db7 100644 --- a/gossip/src/cluster_info.rs +++ b/gossip/src/cluster_info.rs @@ -1682,11 +1682,11 @@ impl ClusterInfo { ) -> JoinHandle<()> { let thread_pool = ThreadPoolBuilder::new() .num_threads(std::cmp::min(get_thread_count(), 8)) - .thread_name(|i| format!("ClusterInfo::gossip-{}", i)) + .thread_name(|i| format!("solRunGossip{}", i)) .build() .unwrap(); Builder::new() - .name("solana-gossip".to_string()) + .name("solGossip".to_string()) .spawn(move || { let mut last_push = timestamp(); let mut last_contact_info_trace = timestamp(); @@ -2560,7 +2560,7 @@ impl ClusterInfo { ) -> JoinHandle<()> { let thread_pool = ThreadPoolBuilder::new() .num_threads(get_thread_count().min(8)) - .thread_name(|i| format!("gossip-consume-{}", i)) + .thread_name(|i| format!("solGossipCons{}", i)) .build() .unwrap(); let run_consume = move || { @@ -2576,7 +2576,7 @@ impl ClusterInfo { } } }; - let thread_name = String::from("gossip-consume"); + let thread_name = String::from("solGossipConsum"); Builder::new().name(thread_name).spawn(run_consume).unwrap() } @@ -2592,11 +2592,11 @@ impl ClusterInfo { let recycler = PacketBatchRecycler::default(); let thread_pool = ThreadPoolBuilder::new() .num_threads(get_thread_count().min(8)) - .thread_name(|i| format!("sol-gossip-work-{}", i)) + .thread_name(|i| format!("solGossipWork{}", i)) .build() .unwrap(); Builder::new() - .name("solana-listen".to_string()) + .name("solGossipListen".to_string()) .spawn(move || { while !exit.load(Ordering::Relaxed) { if let Err(err) = self.run_listen( diff --git a/gossip/src/gossip_service.rs b/gossip/src/gossip_service.rs index 9bc911b405d49f..d487cf546ef7ca 100644 --- a/gossip/src/gossip_service.rs +++ b/gossip/src/gossip_service.rs @@ -80,7 +80,7 @@ impl GossipService { exit.clone(), ); let t_responder = streamer::responder( - "gossip", + "Gossip", gossip_socket, response_receiver, socket_addr_space, diff --git a/gossip/tests/crds_gossip.rs b/gossip/tests/crds_gossip.rs index 7095465c38fa54..f4e1b9a9ccee5f 100644 --- a/gossip/tests/crds_gossip.rs +++ b/gossip/tests/crds_gossip.rs @@ -608,7 +608,7 @@ fn network_run_pull( fn build_gossip_thread_pool() -> ThreadPool { ThreadPoolBuilder::new() .num_threads(get_thread_count().min(2)) - .thread_name(|i| format!("crds_gossip_test_{}", i)) + .thread_name(|i| format!("gossipTest{}", i)) .build() .unwrap() } diff --git a/ledger/src/blockstore.rs b/ledger/src/blockstore.rs index a4158a1778e2f1..1d81cc7e59b548 100644 --- a/ledger/src/blockstore.rs +++ b/ledger/src/blockstore.rs @@ -90,12 +90,12 @@ pub use { lazy_static! { static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new() .num_threads(get_max_thread_count()) - .thread_name(|ix| format!("blockstore_{}", ix)) + .thread_name(|ix| format!("solBstore{}", ix)) .build() .unwrap(); static ref PAR_THREAD_POOL_ALL_CPUS: ThreadPool = rayon::ThreadPoolBuilder::new() .num_threads(num_cpus::get()) - .thread_name(|ix| format!("blockstore_{}", ix)) + .thread_name(|ix| format!("solBstoreAll{}", ix)) .build() .unwrap(); } diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index 6b04212bd50f0b..1a5013df26f15c 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -105,7 +105,7 @@ struct ReplayEntry { lazy_static! { static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new() .num_threads(get_max_thread_count()) - .thread_name(|ix| format!("blockstore_processor_{}", ix)) + .thread_name(|ix| format!("solBstoreProc{}", ix)) .build() .unwrap(); } diff --git a/ledger/src/shredder.rs b/ledger/src/shredder.rs index d3a50cb82dc1ca..cb9ef87261e75c 100644 --- a/ledger/src/shredder.rs +++ b/ledger/src/shredder.rs @@ -19,7 +19,7 @@ use { lazy_static! { static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new() .num_threads(get_thread_count()) - .thread_name(|ix| format!("shredder_{}", ix)) + .thread_name(|ix| format!("solShredder{}", ix)) .build() .unwrap(); } diff --git a/ledger/src/sigverify_shreds.rs b/ledger/src/sigverify_shreds.rs index aecad26aa6c311..f13d2df50041a7 100644 --- a/ledger/src/sigverify_shreds.rs +++ b/ledger/src/sigverify_shreds.rs @@ -26,7 +26,7 @@ const SIGN_SHRED_GPU_MIN: usize = 256; lazy_static! { static ref SIGVERIFY_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new() .num_threads(get_thread_count()) - .thread_name(|ix| format!("sigverify_shreds_{}", ix)) + .thread_name(|ix| format!("solSvrfyShred{}", ix)) .build() .unwrap(); } diff --git a/perf/src/sigverify.rs b/perf/src/sigverify.rs index 1e40d29adcf13d..84e33d245c2160 100644 --- a/perf/src/sigverify.rs +++ b/perf/src/sigverify.rs @@ -45,7 +45,7 @@ pub const VERIFY_MIN_PACKETS_PER_THREAD: usize = 128; lazy_static! { static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new() .num_threads(get_thread_count()) - .thread_name(|ix| format!("sigverify_{}", ix)) + .thread_name(|ix| format!("solSigVerify{}", ix)) .build() .unwrap(); } diff --git a/poh/src/poh_service.rs b/poh/src/poh_service.rs index 70f4d2f1ed47ac..2b71c6ab6140f4 100644 --- a/poh/src/poh_service.rs +++ b/poh/src/poh_service.rs @@ -106,7 +106,7 @@ impl PohService { let poh_exit_ = poh_exit.clone(); let poh_config = poh_config.clone(); let tick_producer = Builder::new() - .name("solana-poh-service-tick_producer".to_string()) + .name("solPohTickProd".to_string()) .spawn(move || { solana_sys_tuner::request_realtime_poh(); if poh_config.hashes_per_tick.is_none() { @@ -452,7 +452,7 @@ mod tests { let exit = exit.clone(); Builder::new() - .name("solana-poh-service-entry_producer".to_string()) + .name("solPohEntryProd".to_string()) .spawn(move || { let now = Instant::now(); let mut total_us = 0; diff --git a/rpc/src/optimistically_confirmed_bank_tracker.rs b/rpc/src/optimistically_confirmed_bank_tracker.rs index 3dc5645e605dff..3dbc25473c1572 100644 --- a/rpc/src/optimistically_confirmed_bank_tracker.rs +++ b/rpc/src/optimistically_confirmed_bank_tracker.rs @@ -71,7 +71,7 @@ impl OptimisticallyConfirmedBankTracker { let mut last_notified_confirmed_slot: Slot = 0; let mut highest_confirmed_slot: Slot = 0; let thread_hdl = Builder::new() - .name("solana-optimistic-bank-tracker".to_string()) + .name("solOpConfBnkTrk".to_string()) .spawn(move || loop { if exit_.load(Ordering::Relaxed) { break; diff --git a/rpc/src/rpc_completed_slots_service.rs b/rpc/src/rpc_completed_slots_service.rs index 919f66a98d9fa4..fb1c20f3199b03 100644 --- a/rpc/src/rpc_completed_slots_service.rs +++ b/rpc/src/rpc_completed_slots_service.rs @@ -24,7 +24,7 @@ impl RpcCompletedSlotsService { exit: Arc, ) -> JoinHandle<()> { Builder::new() - .name("solana-rpc-completed-slots-service".to_string()) + .name("solRpcComplSlot".to_string()) .spawn(move || loop { // received exit signal, shutdown the service if exit.load(Ordering::Relaxed) { diff --git a/rpc/src/rpc_pubsub_service.rs b/rpc/src/rpc_pubsub_service.rs index 4efc2b0aa12683..9b5139a9efb3a6 100644 --- a/rpc/src/rpc_pubsub_service.rs +++ b/rpc/src/rpc_pubsub_service.rs @@ -85,7 +85,7 @@ impl PubSubService { let (trigger, tripwire) = Tripwire::new(); let thread_hdl = Builder::new() - .name("solana-pubsub".to_string()) + .name("solRpcPubSub".to_string()) .spawn(move || { let runtime = tokio::runtime::Builder::new_multi_thread() .worker_threads(pubsub_config.worker_threads) @@ -416,6 +416,6 @@ mod tests { let (_trigger, pubsub_service) = PubSubService::new(PubSubConfig::default(), &subscriptions, pubsub_addr); let thread = pubsub_service.thread_hdl.thread(); - assert_eq!(thread.name().unwrap(), "solana-pubsub"); + assert_eq!(thread.name().unwrap(), "solRpcPubSub"); } } diff --git a/rpc/src/rpc_service.rs b/rpc/src/rpc_service.rs index f7ad9622fbd0b7..a74b46e7eaec91 100644 --- a/rpc/src/rpc_service.rs +++ b/rpc/src/rpc_service.rs @@ -385,7 +385,7 @@ impl JsonRpcService { tokio::runtime::Builder::new_multi_thread() .worker_threads(rpc_threads) .on_thread_start(move || renice_this_thread(rpc_niceness_adj).unwrap()) - .thread_name("sol-rpc-el") + .thread_name("solRpcEl") .enable_all() .build() .expect("Runtime"), @@ -483,7 +483,7 @@ impl JsonRpcService { let (close_handle_sender, close_handle_receiver) = unbounded(); let thread_hdl = Builder::new() - .name("solana-jsonrpc".to_string()) + .name("solJsonRpcSvc".to_string()) .spawn(move || { renice_this_thread(rpc_niceness_adj).unwrap(); @@ -648,7 +648,7 @@ mod tests { ) .expect("assume successful JsonRpcService start"); let thread = rpc_service.thread_hdl.thread(); - assert_eq!(thread.name().unwrap(), "solana-jsonrpc"); + assert_eq!(thread.name().unwrap(), "solJsonRpcSvc"); assert_eq!( 10_000, diff --git a/rpc/src/rpc_subscriptions.rs b/rpc/src/rpc_subscriptions.rs index 896b6a9ad5f453..e854253de67595 100644 --- a/rpc/src/rpc_subscriptions.rs +++ b/rpc/src/rpc_subscriptions.rs @@ -636,7 +636,7 @@ impl RpcSubscriptions { .spawn(move || { let pool = rayon::ThreadPoolBuilder::new() .num_threads(notification_threads) - .thread_name(|i| format!("sol-sub-notif-{}", i)) + .thread_name(|i| format!("solRpcNotify{}", i)) .build() .unwrap(); pool.install(|| { diff --git a/runtime/src/accounts_background_service.rs b/runtime/src/accounts_background_service.rs index c38203ab821e96..9ba12f742dafe0 100644 --- a/runtime/src/accounts_background_service.rs +++ b/runtime/src/accounts_background_service.rs @@ -465,7 +465,7 @@ impl AccountsBackgroundService { let mut total_remove_slots_time = 0; let mut last_expiration_check_time = Instant::now(); let t_background = Builder::new() - .name("solana-bg-accounts".to_string()) + .name("solBgAccounts".to_string()) .spawn(move || { let mut stats = StatsManager::new(); let mut last_snapshot_end_time = None; diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 702f70456b68be..9b6da06a23f519 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -1707,7 +1707,7 @@ pub fn make_min_priority_thread_pool() -> ThreadPool { // Use lower thread count to reduce priority. let num_threads = quarter_thread_count(); rayon::ThreadPoolBuilder::new() - .thread_name(|i| format!("solana-cleanup-accounts-{}", i)) + .thread_name(|i| format!("solAccounts{}", i)) .num_threads(num_threads) .build() .unwrap() @@ -1953,7 +1953,7 @@ impl AccountsDb { file_size: DEFAULT_FILE_SIZE, thread_pool: rayon::ThreadPoolBuilder::new() .num_threads(num_threads) - .thread_name(|i| format!("solana-db-accounts-{}", i)) + .thread_name(|i| format!("solAccountsDb{}", i)) .stack_size(ACCOUNTS_STACK_SIZE) .build() .unwrap(), @@ -2306,7 +2306,7 @@ impl AccountsDb { fn start_background_hasher(&mut self) { let (sender, receiver) = unbounded(); Builder::new() - .name("solana-db-store-hasher-accounts".to_string()) + .name("solDbStoreHashr".to_string()) .spawn(move || { Self::background_hasher(receiver); }) diff --git a/runtime/src/accounts_index_storage.rs b/runtime/src/accounts_index_storage.rs index 16fe3b5c0c7038..c000bfdd041d64 100644 --- a/runtime/src/accounts_index_storage.rs +++ b/runtime/src/accounts_index_storage.rs @@ -72,7 +72,7 @@ impl BgThreads { // note that using rayon here causes us to exhaust # rayon threads and many tests running in parallel deadlock Builder::new() - .name("solana-idx-flusher".to_string()) + .name(format!("solIdxFlusher{}", idx)) .spawn(move || { storage_.background(exit_, in_mem_, can_advance_age); }) diff --git a/runtime/src/shared_buffer_reader.rs b/runtime/src/shared_buffer_reader.rs index 819b4bcb3f2a01..41c57b0d484ce3 100644 --- a/runtime/src/shared_buffer_reader.rs +++ b/runtime/src/shared_buffer_reader.rs @@ -75,7 +75,7 @@ impl SharedBuffer { let bg_reader_data = instance.bg_reader_data.clone(); let handle = Builder::new() - .name("solana-compressed_file_reader".to_string()) + .name("solCompFileRead".to_string()) .spawn(move || { // importantly, this thread does NOT hold a refcount on the arc of 'instance' bg_reader_data.read_entire_file_in_bg(reader, total_buffer_budget, chunk_size); diff --git a/send-transaction-service/src/send_transaction_service.rs b/send-transaction-service/src/send_transaction_service.rs index 9195aeb0a7b4b7..97b29ee82e542b 100644 --- a/send-transaction-service/src/send_transaction_service.rs +++ b/send-transaction-service/src/send_transaction_service.rs @@ -410,7 +410,7 @@ impl SendTransactionService { config ); Builder::new() - .name("send-tx-receive".to_string()) + .name("solStxReceive".to_string()) .spawn(move || loop { let recv_timeout_ms = config.batch_send_rate_ms; let stats = &stats_report.stats; @@ -510,7 +510,7 @@ impl SendTransactionService { config ); Builder::new() - .name("send-tx-retry".to_string()) + .name("solStxRetry".to_string()) .spawn(move || loop { let retry_interval_ms = config.retry_rate_ms; let stats = &stats_report.stats; diff --git a/streamer/src/streamer.rs b/streamer/src/streamer.rs index 1ef9b989304ebb..626985243369e8 100644 --- a/streamer/src/streamer.rs +++ b/streamer/src/streamer.rs @@ -168,7 +168,7 @@ pub fn receiver( let res = socket.set_read_timeout(Some(Duration::new(1, 0))); assert!(res.is_ok(), "streamer::receiver set_read_timeout error"); Builder::new() - .name("solana-receiver".to_string()) + .name("solReceiver".to_string()) .spawn(move || { let _ = recv_loop( &socket, @@ -372,7 +372,7 @@ pub fn responder( stats_reporter_sender: Option>>, ) -> JoinHandle<()> { Builder::new() - .name(format!("solana-responder-{}", name)) + .name(format!("solRspndr{}", name)) .spawn(move || { let mut errors = 0; let mut last_error = None; @@ -477,7 +477,7 @@ mod test { let t_responder = { let (s_responder, r_responder) = unbounded(); let t_responder = responder( - "streamer_send_test", + "SendTest", Arc::new(send), r_responder, SocketAddrSpace::Unspecified, diff --git a/validator/src/admin_rpc_service.rs b/validator/src/admin_rpc_service.rs index ab61c2ee675dbb..30c1b0ca9dd088 100644 --- a/validator/src/admin_rpc_service.rs +++ b/validator/src/admin_rpc_service.rs @@ -375,14 +375,14 @@ pub fn run(ledger_path: &Path, metadata: AdminRpcRequestMetadata) { let admin_rpc_path = admin_rpc_path(ledger_path); let event_loop = tokio::runtime::Builder::new_multi_thread() - .thread_name("sol-adminrpc-el") + .thread_name("solAdminRpcEl") .worker_threads(3) // Three still seems like a lot, and better than the default of available core count .enable_all() .build() .unwrap(); Builder::new() - .name("solana-adminrpc".to_string()) + .name("solAdminRpc".to_string()) .spawn(move || { let mut io = MetaIoHandler::default(); io.extend_with(AdminRpcImpl.to_delegate());