diff --git a/dysnix/bsc/Chart.yaml b/dysnix/bsc/Chart.yaml index 0ae08f95..20d44ce9 100644 --- a/dysnix/bsc/Chart.yaml +++ b/dysnix/bsc/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: bsc description: Binance Smart Chain chart for Kubernetes -version: 0.6.44 -appVersion: 1.4.10 +version: 0.6.45 +appVersion: 1.4.11 keywords: - geth diff --git a/dysnix/bsc/templates/scripts/_init_from_gcs.tpl b/dysnix/bsc/templates/scripts/_init_from_gcs.tpl index 1532e103..090d1522 100644 --- a/dysnix/bsc/templates/scripts/_init_from_gcs.tpl +++ b/dysnix/bsc/templates/scripts/_init_from_gcs.tpl @@ -24,6 +24,13 @@ S_STATE_URL="/state_url" S_ANCIENT_URL="/ancient_url" S_STATS="/stats" MAX_USED_SPACE_PERCENT={{ .Values.bsc.initFromGCS.maxUsedSpacePercent }} +S5CMD_STATE_OPTS="" +S5CMD_ANCIENT_OPTS="--part-size 200 --concurrency 2" +{{- if .Values.bsc.pruneancient }} +# we expect the source snapshot to be pruned, thus we may increase workers from default 256 to speed things up +# as ancient dir has less than 100 files with the size less than 10GB, we want to run full speed on state dir instead +S5CMD_STATE_OPTS="--numworkers {{ .Values.bsc.initFromGCS.boostStateCopyWorkers }}" +{{- end }} # allow container interrupt trap "{ exit 1; }" INT TERM @@ -124,9 +131,9 @@ while [ "${SYNC}" -gt 0 ] ; do # sync from cloud to local disk, with removing existing [missing in the cloud] files # run multiple syncs in background - time ${S5CMD} sync --delete s3://${STATE_SRC}/* ${STATE_TMP_DIR}/ > cplist_state.txt & + time ${S5CMD} sync --delete ${S5CMD_STATE_OPTS} s3://${STATE_SRC}/* ${STATE_TMP_DIR}/ > cplist_state.txt & STATE_CP_PID=$! - time nice ${S5CMD} sync --delete --part-size 200 --concurrency 2 s3://${ANCIENT_SRC}/* ${ANCIENT_TMP_DIR}/ > cplist_ancient.txt & + time nice ${S5CMD} sync --delete ${S5CMD_ANCIENT_OPTS} s3://${ANCIENT_SRC}/* ${ANCIENT_TMP_DIR}/ > cplist_ancient.txt & ANCIENT_CP_PID=$! # wait for all syncs to complete diff --git a/dysnix/bsc/values.yaml b/dysnix/bsc/values.yaml index a82f9197..fd35cff6 100644 --- a/dysnix/bsc/values.yaml +++ b/dysnix/bsc/values.yaml @@ -153,6 +153,7 @@ bsc: baseUrlOverride: "" # "bucket/path/to/dir" fullResyncOnSrcUpdate: false maxUsedSpacePercent: 93 # percents + boostStateCopyWorkers: 800 syncToGCS: enabled: false image: peakcom/s5cmd:v2.2.2