microsoft / microsoft/WSL

wslc container cp completely fills RAM

Open
#41,100 5 comments 0 reactions 1 assignee Claimed by @kvega005 View on GitHub
bug needs-investigation wslc
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version

10.0.19044.7548

### WSL Version

2.9.4.0

### Are you using WSL 1 or WSL 2?

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

_No response_

### Distro Version

Debian

### Other Software

_No response_

### Repro Steps

Create a container
Copy a large directory (50 GB+) from a high-speed SSD to a slower SSD using wslc container cp:
`wslc container cp D:/Gauthier/Downloads/ComfyUI/models comfy_ui:/ComfyUI/` (in my case)

### Expected Behavior

The copy operation should complete without consuming all available RAM.
The copy operation should not create temporary files, as this wastes time and doubles the required disk space during the copy.

### Actual Behavior

Vmmem uses up to 16 GB of RAM during the copy operation and does not release the memory after the copy has finished.

### Diagnostic Logs

Before RAM usage increases :

Image

After the temporary files have been written:

Image

Image

Image

After CP is finished :

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.