From 4571c5b422783e09af0dc4e68dbdafcc88efcb3b Mon Sep 17 00:00:00 2001 From: zkhcohen Date: Mon, 21 Sep 2026 10:17:20 -0700 Subject: [PATCH 1/4] Add Disk Wear Reduction Recommendations --- README.md | 10 ++++++++++ compose.yaml | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4ed4753..842a223 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,16 @@ Recently I've partnered with a _new in town_ proxy service - ProxyBase - to offe docker compose up -d ``` +> [!NOTE] +> Byparr performs a *lot* of R/W operations on your disk. Each Playwright request spins up a new instance with an associated cache and SQLite database. To reduce disk wear, we recommend eliminating unnecessary requests, such as health checks, and allocating temp storage in RAM by adding the following snippet to your Docker Compose configuration: +```yaml + mem_limit: 3g + shm_size: "1gb" + tmpfs: + - /tmp:exec,mode=1777,size=1G + - /cache:mode=1777,size=512M +``` + ### Docker install 1. Pull and run the image: diff --git a/compose.yaml b/compose.yaml index 1d5c141..de9f34d 100644 --- a/compose.yaml +++ b/compose.yaml @@ -7,6 +7,12 @@ services: build: context: . dockerfile: Dockerfile + # Uncomment below to offload disk operations to RAM and reduce disk wear: + # mem_limit: 3g + # shm_size: "1gb" + # tmpfs: + # - /tmp:exec,mode=1777,size=1G + # - /cache:mode=1777,size=512M # Uncomment below to use byparr outside of internal network # ports: - # - "8191:8191" + # - "8191:8191" \ No newline at end of file From 73535a0f7e5920515571923ffa26c391bd8ea74e Mon Sep 17 00:00:00 2001 From: zkhcohen Date: Mon, 21 Sep 2026 10:23:24 -0700 Subject: [PATCH 2/4] formatting --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 842a223..76e1fb5 100644 --- a/README.md +++ b/README.md @@ -49,15 +49,16 @@ Recently I've partnered with a _new in town_ proxy service - ProxyBase - to offe docker compose up -d ``` -> [!NOTE] +> [!WARNING] > Byparr performs a *lot* of R/W operations on your disk. Each Playwright request spins up a new instance with an associated cache and SQLite database. To reduce disk wear, we recommend eliminating unnecessary requests, such as health checks, and allocating temp storage in RAM by adding the following snippet to your Docker Compose configuration: -```yaml - mem_limit: 3g - shm_size: "1gb" - tmpfs: - - /tmp:exec,mode=1777,size=1G - - /cache:mode=1777,size=512M -``` +> +> ```yaml +> mem_limit: 3g +> shm_size: "1gb" +> tmpfs: +> - /tmp:exec,mode=1777,size=1G +> - /cache:mode=1777,size=512M +>``` ### Docker install From 633ae677f74dfaf8044a605d8b18bc440c501005 Mon Sep 17 00:00:00 2001 From: Jakub Orchowski Date: Wed, 7 Oct 2026 00:21:09 +0200 Subject: [PATCH 3/4] Enable shared memory and tmpfs in compose.yaml --- compose.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/compose.yaml b/compose.yaml index de9f34d..3b659bf 100644 --- a/compose.yaml +++ b/compose.yaml @@ -7,12 +7,11 @@ services: build: context: . dockerfile: Dockerfile - # Uncomment below to offload disk operations to RAM and reduce disk wear: - # mem_limit: 3g - # shm_size: "1gb" - # tmpfs: - # - /tmp:exec,mode=1777,size=1G - # - /cache:mode=1777,size=512M + shm_size: "1gb" + # Recommended to offload disk operations to RAM and reduce disk wear: + tmpfs: + - /tmp:exec,mode=1777,size=1G + - /cache:mode=1777,size=512M # Uncomment below to use byparr outside of internal network # ports: - # - "8191:8191" \ No newline at end of file + # - "8191:8191" From ee1cd6a2d96df620b400bfb16ca0b408b3f1804a Mon Sep 17 00:00:00 2001 From: Jakub Orchowski Date: Wed, 7 Oct 2026 00:22:39 +0200 Subject: [PATCH 4/4] Revise warning about disk operations and temp storage Updated warning message to simplify and clarify recommendations for reducing disk wear. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 76e1fb5..f374e7d 100644 --- a/README.md +++ b/README.md @@ -50,10 +50,9 @@ docker compose up -d ``` > [!WARNING] -> Byparr performs a *lot* of R/W operations on your disk. Each Playwright request spins up a new instance with an associated cache and SQLite database. To reduce disk wear, we recommend eliminating unnecessary requests, such as health checks, and allocating temp storage in RAM by adding the following snippet to your Docker Compose configuration: +> Byparr performs a *lot* of R/W operations on your disk. To reduce disk wear, it is recommended to allocate temp storage in RAM by adding the following snippet to your Docker Compose configuration: > > ```yaml -> mem_limit: 3g > shm_size: "1gb" > tmpfs: > - /tmp:exec,mode=1777,size=1G