Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ Tháng 9, 2020

Fix lỗi Vmmem ăn ram nhiều - vmmem high memory wsl2

 Dùng docker và sử dụng core linux của win thường rất hay bị lỗi vmmem ăn ram nhiều. Cách khắc phục cấu hình lại limit ram được sử dụng của core WSL đỡ bị ăn nhiều như sau Tạo file  %UserProfile%\.wslconfig [wsl2] kernel=<path> # An absolute Windows path to a custom Linux kernel. memory=<size> # How much memory to assign to the WSL2 VM. processors=<number> # How many processors to assign to the WSL2 VM. swap=<size> # How much swap space to add to the WSL2 VM. 0 for no swap file. swapFile=<path> # An absolute Windows path to the swap vhd. localhostForwarding=<bool> # Boolean specifying if ports bound to wildcard or localhost in the WSL2 VM should be connectable from the host via localhost:port (default true). # <path> entries must be absolute Windows paths with escaped backslashes, for example C:\\Users\\Ben\\kernel # <size> entries must be size followed by unit, for example 8GB o