subspace_farmer

Module utils

source
Expand description

Various utilities used by farmer or with farmer

Modules§

  • Modified version of SS58 parser extracted from Substrate in order to not pull the whole sp-core into farmer application

Structs§

Functions§

  • Get all cpu cores, grouped into sets according to NUMA nodes or L3 cache groups on large CPUs.
  • Create thread pools manager.
  • Parse space-separated set of groups of CPU cores (individual cores are coma-separated) into vector of CPU core sets that can be used for creation of plotting/replotting thread pools.
  • This function is supposed to be used with [rayon::ThreadPoolBuilder::spawn_handler()] to spawn handler with a custom logic defined by spawn_hook_builder.
  • Recommended number of thread pool size for farming, equal to number of CPU cores in the first NUMA node
  • Runs future on a dedicated thread with the specified name, will block on drop until background thread with future is stopped too, ensuring nothing is left in memory
  • Thread indices for each thread pool
  • This function is supposed to be used with [rayon::ThreadPoolBuilder::spawn_handler()] to inherit current tokio runtime.