Open jpawlowski opened 10 months ago
We also have a size issue for Microsoft.Graph.Files
in that during startup the peak memory usage exceeds 1GB and causes an OOM error in Azure Automation.
We should investigate the feasibility of either providing a manifest to allow for selective importing of cmdlets or omitting the help XML files and only providing online help to see if these approaches reduce the memory impact.
@timayabi2020 @petrhollayms
Issue also mentioned in #2475
When using
Microsoft.Graph.Identity.Governance
module in Azure Automation runbooks running inside the Azure sandbox, the memory limitation of 400 MB becomes profoundly serious.I noticed that the actual size of the
Microsoft.Graph.Identity.Governance
module is already huge (Version 2.11.1 has 17,131.3 KB), and the beta module is even bigger using 24,481.4 KB of disk space. This gives quite a good indication about the memory consumption of this module.Importing that module inside a PowerShell 5.1 runbook using
Import-Module Microsoft.Graph.Beta.Identity.Governance
will often fail in Azure Automation, leading to out of memory exceptions:I know that I could use Azure Automation Hybrid Worker to run on a dedicated virtual machine. Obviously, this is not the idea of serverless infrastructure which is why I prefer to avoid this. I'm not sure if the memory limits of the Azure Automation sandbox will increase in the future or when (it likely will, after migration to Azure Container Instances was completed). However, this is not what I think would be a satisfactory solution as even today, memory consumption counts as it adds up on scale and Microsoft might expect lots of users running Microsoft Graph PowerShell on Azure Automation more and more.
I was wondering if there was anything wrong with the module as it is becoming simply bigger and bigger, and compared to other Graph modules, it is extremely large already. If it were by design today, is there anything you could do to improve size and memory consumption as such?
Thanks! 😄