Skip to content

Commit fb131cc

Browse files
authored
Update gc allocation budget value from 16 MB to 24 MB. (#10953)
1 parent 96131b5 commit fb131cc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

release_notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
- Fixing invalid DateTimes in status blobs when invoking via portal (#10916)
1313
- Bug fix for platform release channel bundles resolution casing issue and additional logging (#10921)
1414
- Adding support for faas.invoke_duration metric and other spec related updates (#10929)
15+
- Increased the GC allocation budget value to improve cold start (#10953)
1516
- Fixed bug that could result in "Binding names must be unique" error (#10938)

src/WebJobs.Script.WebHost/Middleware/ClrOptimizationMiddleware.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ namespace Microsoft.Azure.WebJobs.Script.WebHost.Middleware
1212
/// <summary>
1313
/// A middleware responsible for Optimizing CLR settings like GC to help with cold start
1414
/// </summary>
15-
internal class ClrOptimizationMiddleware
15+
internal sealed class ClrOptimizationMiddleware
1616
{
17-
// This is double the amount of memory allocated during cold start specialization.
1817
// This value is calculated based on prod profiles across all languages observed for an extended period of time.
1918
// This value is just a best effort and if for any reason CLR needs to allocate more memory then it will ignore this value.
20-
private const long AllocationBudgetForGCDuringSpecialization = 16 * 1024 * 1024;
19+
private const long AllocationBudgetForGCDuringSpecialization = 24 * 1024 * 1024;
2120
private readonly ILogger _logger;
2221
private readonly RequestDelegate _next;
2322
private readonly IScriptWebHostEnvironment _webHostEnvironment;

0 commit comments

Comments
 (0)