Skip to content

Luet memory usage #367

Description

@laurivosandi

Luet version:

luet version 0.32.5-gd5d21653d7313ff396c0511af402834c89974ee3 2022-06-07

CPU architecture, OS, and Version:

Linux zzz 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Describe the bug

Luet gets OOM-killed with 4GB Docker image on a machine with 8GB of free memory.

To Reproduce

Issue docker build -t foobar for Dockerfile that grows large in size:

FROM busybox AS build
RUN dd if=/dev/zero of=foobar bs=65536 count=65536
FROM scratch AS final
COPY --from=build foobar foobar

Try to unpack it with luet

luet util unpack  --local foobar unpacked -d

Expected behavior

Luet's memory usage doesn't significantly depend on image size

Logs

  DEBUG   (config.go:#204:github.com/mudler/luet/cmd/util.initContext)  System rootfs: /
  DEBUG   (config.go:#205:github.com/mudler/luet/cmd/util.initContext)  Colors true
  DEBUG   (config.go:#206:github.com/mudler/luet/cmd/util.initContext)  Logging level info
  DEBUG   (config.go:#207:github.com/mudler/luet/cmd/util.initContext)  Debug mode true
 INFO   Downloading foobar to /home/lauri/unpacked
Killed

Additional context

Tried --concurrency=1 but still looks like 14 threads are spawned

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions