Skip to content

Commit e317f6b

Browse files
GitHKAndrei Neagu
and
Andrei Neagu
authored
♻️ adjust rclone defaults ⚠️ (#6885)
Co-authored-by: Andrei Neagu <[email protected]>
1 parent 7b5cba8 commit e317f6b

File tree

7 files changed

+7
-10
lines changed

7 files changed

+7
-10
lines changed

.env-devel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ RESOURCE_USAGE_TRACKER_S3=null
211211
RESOURCE_USAGE_TRACKER_TRACING={}
212212

213213
# NOTE: 172.17.0.1 is the docker0 interface, which redirect from inside a container onto the host network interface.
214-
R_CLONE_OPTION_BUFFER_SIZE=0M
214+
R_CLONE_OPTION_BUFFER_SIZE=16M
215215
R_CLONE_OPTION_RETRIES=3
216216
R_CLONE_OPTION_TRANSFERS=5
217217
R_CLONE_PROVIDER=MINIO

packages/settings-library/src/settings_library/r_clone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ class RCloneSettings(BaseCustomSettings):
2626
)
2727
# SEE https://rclone.org/docs/#buffer-size-size
2828
R_CLONE_OPTION_BUFFER_SIZE: str = Field(
29-
default="0M",
29+
default="16M",
3030
description="`--buffer-size X`: sets the amount of RAM to use for each individual transfer",
3131
)

packages/simcore-sdk/src/simcore_sdk/node_ports_common/r_clone.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
from pathlib import Path
99
from typing import Final
1010

11-
from common_library.errors_classes import OsparcErrorMixin
12-
1311
from aiocache import cached # type: ignore[import-untyped]
1412
from aiofiles import tempfile
13+
from common_library.errors_classes import OsparcErrorMixin
1514
from models_library.basic_types import IDStr
1615
from pydantic import AnyUrl, BaseModel, ByteSize
1716
from servicelib.progress_bar import ProgressBarData
@@ -207,7 +206,6 @@ async def _sync_sources(
207206
f"{r_clone_settings.R_CLONE_OPTION_TRANSFERS}",
208207
# below two options reduce to a minimum the memory footprint
209208
# https://forum.rclone.org/t/how-to-set-a-memory-limit/10230/4
210-
"--use-mmap", # docs https://rclone.org/docs/#use-mmap
211209
"--buffer-size", # docs https://rclone.org/docs/#buffer-size-size
212210
r_clone_settings.R_CLONE_OPTION_BUFFER_SIZE,
213211
"--use-json-log",

packages/simcore-sdk/src/simcore_sdk/node_ports_common/r_clone_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ class SyncProgressLogParser(BaseLogParser):
5252
5353
5454
This command:
55-
rclone --use-mmap --buffer-size 0M --transfers 5 sync mys3:simcore/5cfdef88-013b-11ef-910e-0242ac14003e/2d544003-9eb8-47e4-bcf7-95a8c31845f7/workspace ./tests3 --progress
55+
rclone --buffer-size 0M --transfers 5 sync mys3:simcore/5cfdef88-013b-11ef-910e-0242ac14003e/2d544003-9eb8-47e4-bcf7-95a8c31845f7/workspace ./tests3 --progress
5656
generates this but the rclone modifies the terminal printed lines which python does not like so much
5757
Transferred: 4.666 GiB / 4.666 GiB, 100%, 530.870 MiB/s, ETA 0s
5858
Transferred: 4 / 4, 100%
5959
Elapsed time: 9.6s
6060
6161
This other command:
62-
rclone --use-mmap --buffer-size 0M --transfers 5 --use-json-log --stats-log-level INFO -v --stats 500ms sync mys3:simcore/5cfdef88-013b-11ef-910e-0242ac14003e/2d544003-9eb8-47e4-bcf7-95a8c31845f7/workspace ./tests3
62+
rclone --buffer-size 0M --transfers 5 --use-json-log --stats-log-level INFO -v --stats 500ms sync mys3:simcore/5cfdef88-013b-11ef-910e-0242ac14003e/2d544003-9eb8-47e4-bcf7-95a8c31845f7/workspace ./tests3
6363
prints stuff such as:
6464
{"level":"info","msg":"Copied (new)","object":"README.ipynb","objectType":"*s3.Object","size":5123,"source":"operations/copy.go:360","time":"2024-04-23T14:05:10.408277+00:00"}
6565
{"level":"info","msg":"Copied (new)","object":".hidden_do_not_remove","objectType":"*s3.Object","size":219,"source":"operations/copy.go:360","time":"2024-04-23T14:05:10.408246+00:00"}

services/agent/src/simcore_service_agent/services/backup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ async def _store_in_s3(
161161
f"{settings.AGENT_VOLUMES_CLEANUP_PARALLELISM}",
162162
# below two options reduce to a minimum the memory footprint
163163
# https://forum.rclone.org/t/how-to-set-a-memory-limit/10230/4
164-
"--use-mmap", # docs https://rclone.org/docs/#use-mmap
165164
"--buffer-size", # docs https://rclone.org/docs/#buffer-size-size
166165
"0M",
167166
"--stats",

services/director-v2/.env-devel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ S3_BUCKET_NAME=simcore
6363
R_CLONE_PROVIDER=MINIO
6464
R_CLONE_OPTION_TRANSFERS=5
6565
R_CLONE_OPTION_RETRIES=3
66-
R_CLONE_OPTION_BUFFER_SIZE=0M
66+
R_CLONE_OPTION_BUFFER_SIZE=16M
6767

6868
TRACING_OBSERVABILITY_BACKEND_ENDPOINT=http://jaeger:9411
6969
TRAEFIK_SIMCORE_ZONE=internal_simcore_stack

services/director-v2/tests/unit/with_dbs/test_modules_dynamic_sidecar_docker_service_specs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def expected_dynamic_sidecar_spec(
286286
"RABBIT_PORT": "5672",
287287
"RABBIT_USER": "admin",
288288
"RABBIT_SECURE": "False",
289-
"R_CLONE_OPTION_BUFFER_SIZE": "0M",
289+
"R_CLONE_OPTION_BUFFER_SIZE": "16M",
290290
"R_CLONE_OPTION_RETRIES": "3",
291291
"R_CLONE_OPTION_TRANSFERS": "5",
292292
"R_CLONE_PROVIDER": "MINIO",

0 commit comments

Comments
 (0)