Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants