diff --git a/dev/compose.million.yaml b/dev/compose.million.yaml index 1d06533..885ed81 100644 --- a/dev/compose.million.yaml +++ b/dev/compose.million.yaml @@ -19,6 +19,7 @@ services: environment: FILES: ${FILES:-1000000} RUN_LABEL: ${RUN_LABEL:-main} + WORKERS: ${WORKERS:-8} networks: [lab] depends_on: source: {condition: service_healthy} diff --git a/dev/million.py b/dev/million.py index 30a85ec..179cd16 100644 --- a/dev/million.py +++ b/dev/million.py @@ -190,10 +190,9 @@ def prepare(): roots = {c: volume(c, 'getpath', 'cephfs', name) for c in ('source', 'target')} state['roots'] = roots config = json.loads(Path('/lab/migration.example.json').read_text()) - config.update(backend='native', workers=8, bandwidth_kib=0) + config.update(backend='native', workers=int(os.environ.get('WORKERS', '8')), bandwidth_kib=0) for c in ('source', 'target'): config[c]['subvolume'] = name - config[c].pop('mount', None) atomic_json(WORK / 'config.json', config) with FS('source') as fs: root = roots['source']