Ticket #20505: 0003-Tune-scanning-for-small-networks.patch

File 0003-Tune-scanning-for-small-networks.patch, 3.3 KB (added by teor, 3 years ago)

Workaround for small networks

  • NetworkScanners/BwAuthority/bwauthority_child.py

    From 7f8ce646e9d20c3fa60ed052f1873a95ebb544bf Mon Sep 17 00:00:00 2001
    From: teor <teor2345@gmail.com>
    Date: Mon, 31 Oct 2016 17:22:13 +1100
    Subject: [PATCH 3/5] Tune scanning for small networks
    
    Signed-off-by: teor <teor2345@gmail.com>
    ---
     NetworkScanners/BwAuthority/bwauthority_child.py           |  6 ++++--
     NetworkScanners/BwAuthority/data/scanner.1/bwauthority.cfg |  2 +-
     NetworkScanners/BwAuthority/data/scanner.2/bwauthority.cfg | 10 +++++-----
     NetworkScanners/BwAuthority/run_scan.sh                    |  4 ++--
     4 files changed, 12 insertions(+), 10 deletions(-)
    
    diff --git a/NetworkScanners/BwAuthority/bwauthority_child.py b/NetworkScanners/BwAuthority/bwauthority_child.py
    index 3ae484d..879f0ea 100755
    a b __selmgr = PathSupport.SelectionManager( 
    6161      order_exits=False,
    6262      percent_fast=100,
    6363      percent_skip=0,
    64       min_bw=1024,
     64      min_bw=0, # In a test network, scan every node, to avoid skipping
     65                # nodes that have low traffic by chance
    6566      use_all_exits=False,
    6667      uniform=True,
    6768      use_exit=None,
    6869      use_guards=False,
    6970      exit_ports=[443],
    7071      order_by_ratio=True, # XXX: may be a poor idea for PID control?
    71       min_exits=10)
     72      min_exits=3) # 1 means no exits (yes, this seems like a bug),
     73                   # so say 3 to get 2 exits for redundancy
    7274
    7375# exit code to indicate scan completion
    7476# make sure to update this in bwauthority.py as well
  • NetworkScanners/BwAuthority/data/scanner.1/bwauthority.cfg

    diff --git a/NetworkScanners/BwAuthority/data/scanner.1/bwauthority.cfg b/NetworkScanners/BwAuthority/data/scanner.1/bwauthority.cfg
    index f58a4e2..cf39566 100644
    a b db_url = 
    1818#db_url = postgresql://bwscanner:password@127.0.0.1/BwScan1
    1919tor_dir = ./data/tor.1
    2020start_pct = 0
    21 stop_pct = 12
     21stop_pct = 100
    2222save_every = 0
    2323nodes_per_slice = 50
    2424circs_per_node = 5
  • NetworkScanners/BwAuthority/data/scanner.2/bwauthority.cfg

    diff --git a/NetworkScanners/BwAuthority/data/scanner.2/bwauthority.cfg b/NetworkScanners/BwAuthority/data/scanner.2/bwauthority.cfg
    index 73190c9..4380e82 100644
    a b db_url = 
    1717#db_url = mysql+mysqldb://bwscanner:password@127.0.0.1/BwScan2
    1818#db_url = postgresql://bwscanner:password@127.0.0.1/BwScan2
    1919tor_dir = ./data/tor.1
    20 start_pct = 12
    21 stop_pct = 25
     20start_pct = 0
     21stop_pct = 100
    2222save_every = 0
    2323nodes_per_slice = 50
    2424circs_per_node = 5
    2525min_streams = 1
    26 max_fetch_time = 300
     26max_fetch_time = 360
    2727sleep_start = 01:30
    2828sleep_stop = 01:30
    29 only_unmeasured = 0
    30 min_unmeasured = 0
     29only_unmeasured = 1
     30min_unmeasured = 5
  • NetworkScanners/BwAuthority/run_scan.sh

    diff --git a/NetworkScanners/BwAuthority/run_scan.sh b/NetworkScanners/BwAuthority/run_scan.sh
    index 908b76e..58ae910 100755
    a b  
    11#!/bin/sh
    22
    33# Number of applications to run.
    4 SCANNERS_PER_TOR_COUNT=4
    5 TOR_COUNT=2
     4SCANNERS_PER_TOR_COUNT=1
     5TOR_COUNT=1
    66SCANNER_COUNT=$(($SCANNERS_PER_TOR_COUNT * $TOR_COUNT + 1))
    77
    88# This tor must have the w status line fix as well as the stream bw fix