config: reduce zero-copy space reserve default
This commit is contained in:
@@ -19,7 +19,7 @@ reconnect_jitter = true
|
|||||||
stall_after = "30m" # Status warning only; it does not fail the job.
|
stall_after = "30m" # Status warning only; it does not fail the job.
|
||||||
verification_timeout = "30m"
|
verification_timeout = "30m"
|
||||||
poll_interval = "1s"
|
poll_interval = "1s"
|
||||||
free_space_reserve_bytes = 1073741824 # Rechecked immediately before work.
|
free_space_reserve_bytes = 33554432 # 32 MiB; payload bytes are added for copy paths.
|
||||||
|
|
||||||
[backup]
|
[backup]
|
||||||
interval = "6h"
|
interval = "6h"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: archive-control-archive
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
archive-client:
|
archive-client:
|
||||||
image: sodium/archive-clients:v0.1.4
|
image: sodium/archive-clients:v0.1.5
|
||||||
user: "1000:1000"
|
user: "1000:1000"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ["--config", "/etc/archive-control/client.toml"]
|
command: ["--config", "/etc/archive-control/client.toml"]
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ reconnect_jitter = true
|
|||||||
stall_after = "30m" # Status warning only; it does not fail the job.
|
stall_after = "30m" # Status warning only; it does not fail the job.
|
||||||
verification_timeout = "30m"
|
verification_timeout = "30m"
|
||||||
poll_interval = "1s"
|
poll_interval = "1s"
|
||||||
free_space_reserve_bytes = 1073741824 # Rechecked immediately before work.
|
free_space_reserve_bytes = 33554432 # 32 MiB; payload bytes are added for copy paths.
|
||||||
|
|
||||||
[backup]
|
[backup]
|
||||||
interval = "6h"
|
interval = "6h"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: archive-control-cache
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
archive-client:
|
archive-client:
|
||||||
image: sodium/archive-clients:v0.1.4
|
image: sodium/archive-clients:v0.1.5
|
||||||
user: "1001:1001"
|
user: "1001:1001"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ reconnect_jitter = true
|
|||||||
stall_after = "30m" # Status warning only; it does not fail the job.
|
stall_after = "30m" # Status warning only; it does not fail the job.
|
||||||
verification_timeout = "30m"
|
verification_timeout = "30m"
|
||||||
poll_interval = "1s"
|
poll_interval = "1s"
|
||||||
free_space_reserve_bytes = 1073741824 # Rechecked immediately before work.
|
free_space_reserve_bytes = 33554432 # 32 MiB; payload bytes are added for copy paths.
|
||||||
|
|
||||||
[backup]
|
[backup]
|
||||||
interval = "6h"
|
interval = "6h"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: archive-control-cache
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
archive-client:
|
archive-client:
|
||||||
image: sodium/archive-clients:v0.1.4
|
image: sodium/archive-clients:v0.1.5
|
||||||
user: "1001:1001"
|
user: "1001:1001"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ stall_after = "30m" # Warning only; no automatic job failure.
|
|||||||
verification_timeout = "30m" # Stopped qB full-recheck deadline.
|
verification_timeout = "30m" # Stopped qB full-recheck deadline.
|
||||||
poll_interval = "1s" # Active qB/Syncthing observation interval.
|
poll_interval = "1s" # Active qB/Syncthing observation interval.
|
||||||
# Worst-case copy fallback must leave this many bytes free.
|
# Worst-case copy fallback must leave this many bytes free.
|
||||||
free_space_reserve_bytes = 1073741824
|
free_space_reserve_bytes = 33554432 # 32 MiB; payload bytes are added for copy paths.
|
||||||
|
|
||||||
[backup]
|
[backup]
|
||||||
interval = "6h"
|
interval = "6h"
|
||||||
@@ -213,7 +213,7 @@ cache/archive routes according to policy.
|
|||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
archive-client:
|
archive-client:
|
||||||
image: sodium/archive-clients:v0.1.4
|
image: sodium/archive-clients:v0.1.5
|
||||||
user: "1001:1001"
|
user: "1001:1001"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ["archive-client", "--config", "/etc/archive-control/client.toml"]
|
command: ["archive-client", "--config", "/etc/archive-control/client.toml"]
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ verification_timeout = "30m"
|
|||||||
# Poll qBittorrent and Syncthing at this interval while a step is active.
|
# Poll qBittorrent and Syncthing at this interval while a step is active.
|
||||||
poll_interval = "1s"
|
poll_interval = "1s"
|
||||||
# Space that must remain free after a worst-case copy fallback.
|
# Space that must remain free after a worst-case copy fallback.
|
||||||
free_space_reserve_bytes = 1073741824
|
free_space_reserve_bytes = 33554432
|
||||||
|
|
||||||
[backup]
|
[backup]
|
||||||
interval = "6h"
|
interval = "6h"
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "archive-clients"
|
name = "archive-clients"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
dependencies = ["protobuf==7.35.1", "websockets==16.0"]
|
dependencies = ["protobuf==7.35.1", "websockets==16.0"]
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class JobsConfig:
|
|||||||
stall_after: float = 30 * 60
|
stall_after: float = 30 * 60
|
||||||
verification_timeout: float = 30 * 60
|
verification_timeout: float = 30 * 60
|
||||||
poll_interval: float = 1
|
poll_interval: float = 1
|
||||||
free_space_reserve_bytes: int = 1024 * 1024 * 1024
|
free_space_reserve_bytes: int = 32 * 1024 * 1024
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
@@ -239,7 +239,7 @@ def _jobs(value: Any) -> JobsConfig:
|
|||||||
),
|
),
|
||||||
poll_interval=_duration(value.get("poll_interval", "1s")),
|
poll_interval=_duration(value.get("poll_interval", "1s")),
|
||||||
free_space_reserve_bytes=_positive_int(
|
free_space_reserve_bytes=_positive_int(
|
||||||
value.get("free_space_reserve_bytes", 1024 * 1024 * 1024),
|
value.get("free_space_reserve_bytes", 32 * 1024 * 1024),
|
||||||
"jobs.free_space_reserve_bytes",
|
"jobs.free_space_reserve_bytes",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class ClientJobExecutor:
|
|||||||
sparse_supported: bool,
|
sparse_supported: bool,
|
||||||
poll_interval: float = 1,
|
poll_interval: float = 1,
|
||||||
verification_timeout: float = 30 * 60,
|
verification_timeout: float = 30 * 60,
|
||||||
free_space_reserve_bytes: int = 1024 * 1024 * 1024,
|
free_space_reserve_bytes: int = 32 * 1024 * 1024,
|
||||||
):
|
):
|
||||||
self.client_id = client_id
|
self.client_id = client_id
|
||||||
self.qbittorrent = qbittorrent
|
self.qbittorrent = qbittorrent
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class ConfigTests(unittest.TestCase):
|
|||||||
root / "qb/a/b",
|
root / "qb/a/b",
|
||||||
)
|
)
|
||||||
self.assertEqual(config.jobs.stall_after, 30 * 60)
|
self.assertEqual(config.jobs.stall_after, 30 * 60)
|
||||||
|
self.assertEqual(config.jobs.free_space_reserve_bytes, 32 * 1024 * 1024)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
config.syncthing.advertised_addresses, ("dynamic",)
|
config.syncthing.advertised_addresses, ("dynamic",)
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ class ClientJobHappyPathTests(unittest.TestCase):
|
|||||||
self._run_transfer(
|
self._run_transfer(
|
||||||
Path(directory),
|
Path(directory),
|
||||||
job_pb2.JOB_OPERATION_ARCHIVE,
|
job_pb2.JOB_OPERATION_ARCHIVE,
|
||||||
source_stage_free_bytes=1024 * 1024 * 1024 + 1024,
|
source_stage_free_bytes=32 * 1024 * 1024 + 1024,
|
||||||
content=b"x" * 4096,
|
content=b"x" * 4096,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user