orbstack / orbstack

Fast, light, simple Docker containers & Linux machines
https://orbstack.dev
MIT License
5.6k stars 44 forks source link

Orbstack data sparse file is out of control #1405

Open jd-edp opened 2 months ago

jd-edp commented 2 months ago

Describe the bug

image

My disk space is getting used by the data sparse file while docker dont have so much disk space. I use postgresql and use it in a very strict wal mode where no i/o is happening and the wal files getting reduced every cycle (3min) but orbstacks sparse file is getting bigger and bigger until the whole mac crashes

To Reproduce

use postgresql doing every 1s inserts of and delete it every 2-3min to keep it small. One Table one pool of 5-10 connection for inserting and delete

Expected behavior

sparse file is reducing to not crash everything

Diagnostic report (REQUIRED)

OrbStack info: Version: 1.7.0 Commit: c5439c5612cdb5febbbc69169a4f3b11cdada6c2 (v1.7.0)

System info: macOS: 14.6.1 (23G93) CPU: arm64, 24 cores CPU model: Apple M2 Ultra Model: Mac14,14 Memory: 192 GiB

Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2024-08-27T16-56-27.658735Z.zip

Screenshots and additional context (optional)

No response

jd-edp commented 2 months ago

scammer above

jd-edp commented 2 months ago

@

image

sparse file real size, i cannot explain this i cant find this much space in any of my volume is used

jd-edp commented 2 months ago

OrbStack info: Version: 1.7.0 Commit: c5439c5612cdb5febbbc69169a4f3b11cdada6c2 (v1.7.0)

System info: macOS: 14.6.1 (23G93) CPU: arm64, 12 cores CPU model: Apple M2 Pro Model: Mac14,12 Memory: 32 GiB

Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2024-08-27T17-18-06.150990Z.zip

On another system i dont have the same problems

image

with the same setup

jd-edp commented 2 months ago

my docker compose: postgres_v2: image: postgres:latest container_name: my_postgres_v2 network_mode: host environment: POSTGRES_USER: myuser POSTGRES_PASSWORD: mypassword POSTGRES_DB: mydatabase

command: >
  postgres -c shared_buffers=256MB
           -c temp_buffers=32MB
           -c work_mem=64MB
           -c maintenance_work_mem=128MB
           -c fsync=off
           -c synchronous_commit=off
           -c full_page_writes=off
           -c wal_level=minimal
           -c wal_buffers=16MB
           -c archive_mode=off
           -c autovacuum=on
           -c log_min_duration_statement=-1
           -c log_checkpoints=off
           -c log_connections=off
           -c log_disconnections=off
           -c log_statement=none
           -c random_page_cost=1.0
           -c effective_io_concurrency=0
           -c max_wal_senders=0
           -c max_replication_slots=0
           -c max_wal_size=1GB
           -c min_wal_size=80MB
           -c bgwriter_delay=1000ms
           -c bgwriter_lru_maxpages=100
           -c bgwriter_lru_multiplier=2.0
           -c port=5433
           -c max_connections=500
jd-edp commented 2 months ago
image

i dont get it how do i prune this without getting doomed again?

jd-edp commented 2 months ago
image

i deleted all orbstack files and redeployed everything and will observe this file. I adjusted my postgresql instance maybe it could work now, it seems to shrink. Lets hope it is solved now