Compress a list of ~300 text files(~20M for each, in folder Data2020), using following command with pipeline in powershell core 7:
tar cvf - Data2020 | zstd - -o Data2020.tar.zst
Compression stream won't consume too much memory, and the command should be fast.
After the failed try in ps core 7, I ran it again in cmd in cmder terminal or windows terminal. It actually ran well:

Memory usage kept around 50 MB.
WhenI ran the command in windows terminal. After over 3 minutes, only about 60 files were compressed and memory usage
surged to over 5GB and still increased quickly. I close all the other apps but the command eat up even more memory and
didn't seem to finish, so I killed the process with ctrl + c. But memory usage didn't decline:

PSVersion 7.0.2
PSEdition Core
GitCommitId 7.0.2
OS Microsoft Windows 10.0.19041
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Hmm. Possibly related to https://github.com/PowerShell/PowerShell/issues/1908 I think?
You should use Start-Process to run this in native shell.
This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes.
Most helpful comment
Hmm. Possibly related to https://github.com/PowerShell/PowerShell/issues/1908 I think?