Docker for Windows (using WSL 2) to change the maximum memory used and the number of CPU cores Author: Chuwen Time: 2021-10-30 Classification: Windows , Docker comment ##Preamble Under macOS, you can directly modify the memory and CPU used on Docker Desktop, but there is no memory and CPU used on Windows. Instead, you will be prompted for this ! []( https://cdn.nowtime.cc/2021/10/30/2651558981.png ) So we visit https://docs.microsoft.com/en-us/windows/wsl/wsl-config See how to configure ##Configuration 1. Press the Windows+R key, enter '% UserProfile%' and run to enter the user folder 2. Create a new file '. wslconfig' and edit it in Notepad ```conf [wsl2] memory=2GB processors=2 swap=0 localhostForwarding=true ``` >'memory ': indicates the maximum use of * * 2GB * * memory >'swap ': indicates that swap is not set >'localhostForwarding': 'The default value is true'. If the ports bound to wildcards or localhost in the WSL 2 VM can be connected from the host through 'localhost: port'. >'processors': the number of cores used, which is the same as the number of cores used by your Windows system by default So my configuration above is that the maximum memory used is' 2GB ', 2 cores, and swap is not set ##Rear After setting, run 'wsl -- shutdown' As I wish: ! []( https://cdn.nowtime.cc/2021/10/30/3785919230.png )
Solve the problem of high memory usage of Vmmem when installing Docker for Windows Author: Chuwen Time: 2021-10-30 Classification: Windows , Docker comment ! [The Vmmem memory usage is too high]( https://cdn.nowtime.cc/2021/10/30/241227457.png ) ##Step 1. Press the Windows+R key, enter '% UserProfile%' and run to enter the user folder 2. Create a new file '. wslconfig' and edit it in Notepad 3. Fill in the following content and save it. 'memory' is the maximum system memory. Here, I limit it to 2GB, which can be set according to your computer configuration ```conf [wsl2] memory=2GB swap=0 localhostForwarding=true ``` 4. Then start the cmd command prompt and enter 'wsl -- shutdown' to shut down the current subsystem 5. Then the Docker will send a stop notice, and you can click the restart button to restart 6. Now the memory usage is much more normal. This memory usage is exactly the maximum memory usage we set ! []( https://cdn.nowtime.cc/2021/10/30/999574981.png ) After looking at the pagoda panel built locally with Docker, the memory also shows 2GB: ! []( https://cdn.nowtime.cc/2021/10/30/616799405.png ) Ubuntu for WSL (view with ` htop 'command): ! []( https://cdn.nowtime.cc/2021/10/30/3449071115.png ) ##Related references - https://www.cnblogs.com/coding8832/p/14445835.html - https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure -global-options-with-wslconfig > You are using the WSL 2 backend, so resource limits are managed by Windows. > > You can configure limits on the memory, CPU, and swap size allocated to WSL 2 in a [.wslconfig file.]( https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure -global-options-with-wslconfig ".wslconfig file.") ! []( https://cdn.nowtime.cc/2021/10/30/4024169058.png )
Windows disables the DiagTrack service (Connected User Experiences and Telemetry) Author: Chuwen Time: 2021-01-04 Classification: Windows comment #Turn off Microsoft Collection Privacy Service - to reduce disks by 100% 1. 'Win+R' Enter 'services.msc` 2. Find the service named "* * Connected User Experiences and Telemetry * *", double-click it, and then follow the following configuration ! [Snipaste_2021-01-04_20-16-18.jpg][1] [1]: https://cdn.nowtime.cc/2021/01/04/370513648.jpg
[Tutorial] How to play Dolby Vision on the computer (Win10) (reprinted) Author: Chuwen Time: 2020-11-02 Classification: Windows comment From: https://tieba.baidu.com/p/6673493559 Method: Theoretically, non HDR displays can also play with correct colors. Of course, the display will be better if it supports HDR, but it must be the operating system of Windows 10. There is a DolbyVision+HDR in the link attachment The file of AppxBundle. After decompression, right click to open it with the application installer, and then open the win10 app store to find updates. Then use the movie and TV application to open the Dolby View video (there is a small video clip in the attachment) to find that the color plays correctly. enclosure: https://nowtime.lanzous.com/iBvHVhyvehi
Windows FFmpeg batch flac to mp3 music format Author: Chuwen Time: 2020-06-25 Classification: Windows comment #Please use CMD to execute the following command >This is the creation folder ``` md result ``` >Batch convert format to result folder ``` for /R %v IN (*.flac) do ( ffmpeg -i %v -ab 320k -ar 44100 -id3v2_version 3 "result\%~nv.mp3") ```