Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compress-Archive uses excessive amount of memory for large archives #108

Open
martinmine opened this issue Oct 25, 2021 · 2 comments
Open

Comments

@martinmine
Copy link

Steps to reproduce

Simply try and zip a large folder, for example:

$compress = @{
  Path = "C:\bigdirectory\"
  DestinationPath = "C:\archive.zip"
}
Compress-Archive @compress

Expected behavior

I expect to be able to backup my servers without excessive memory usage. There are alternative APIs through PowerShell, but they are very inconvenient to use compared to Compress-Archive

Actual behavior

Executing the commands results in excessive memory usage for large archives. In my case I have a ~1.2GB on disk ZIP file which PowerShell uses around 18GB of ram to compress.

Environment data

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.14393
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
@yodasad
Copy link

yodasad commented May 19, 2023

Hello! Any updates on this?

@djgus
Copy link

djgus commented Jan 12, 2024

hi, this is still happening on 7.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants