Skip to content

Commit 8409602

Browse files
GC with small containers (#17606)
* GC with small containers * GC with small containers * GC with small containers * GC with small containers * GC with small containers * GC with small containers
1 parent c40276b commit 8409602

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

aspnetcore/host-and-deploy/docker/building-net-docker-images.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ ENTRYPOINT ["dotnet", "aspnetapp.dll"]
257257
* [ASP.NET Core Docker sample](https://github.com/dotnet/dotnet-docker) (The one used in this tutorial.)
258258
* [Configure ASP.NET Core to work with proxy servers and load balancers](/aspnet/core/host-and-deploy/proxy-load-balancer)
259259
* [Working with Visual Studio Docker Tools](https://docs.microsoft.com/aspnet/core/publishing/visual-studio-tools-for-docker)
260-
* [Debugging with Visual Studio Code](https://code.visualstudio.com/docs/nodejs/debugging-recipes#_debug-nodejs-in-docker-containers)
260+
* [Debugging with Visual Studio Code](https://code.visualstudio.com/docs/nodejs/debugging-recipes#_debug-nodejs-in-docker-containers)
261+
* [GC using Docker and small containers](xref:performance/memory#sc)
261262

262263
## Next steps
263264

aspnetcore/host-and-deploy/docker/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ Find out how to use the Visual Studio Container Tools extension to deploy an ASP
3434

3535
[Configure ASP.NET Core to work with proxy servers and load balancers](xref:host-and-deploy/proxy-load-balancer)
3636
Additional configuration might be required for apps hosted behind proxy servers and load balancers. Passing requests through a proxy often obscures information about the original request, such as the scheme and client IP. It might be necessary to forwarded some information about the request manually to the app.
37+
38+
[GC using Docker and small containers](xref:performance/memory#sc)
39+
Discusses GC selection with small containers.

aspnetcore/host-and-deploy/docker/visual-studio-tools-for-docker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,4 @@ There may be an expectation for the production or release image to be smaller in
232232
* [Deploy a .NET app in a Windows container to Azure Service Fabric](/azure/service-fabric/service-fabric-host-app-in-a-container)
233233
* [Troubleshoot Visual Studio development with Docker](/azure/vs-azure-tools-docker-troubleshooting-docker-errors)
234234
* [Visual Studio Container Tools GitHub repository](https://github.com/Microsoft/DockerTools)
235+
* [GC using Docker and small containers](xref:performance/memory#sc)

aspnetcore/performance/memory.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: rick-anderson
44
description: Learn how memory is managed in ASP.NET Core and how the garbage collector (GC) works.
55
ms.author: riande
66
ms.custom: mvc
7-
ms.date: 12/05/2019
7+
ms.date: 4/05/2019
88
uid: performance/memory
99
---
1010

@@ -148,6 +148,12 @@ The differences between this chart and the server version are significant:
148148

149149
On a typical web server environment, CPU usage is more important than memory, therefore the Server GC is better. If memory utilization is high and CPU usage is relatively low, the Workstation GC might be more performant. For example, high density hosting several web apps where memory is scarce.
150150

151+
<a name="sc"></a>
152+
153+
### GC using Docker and small containers
154+
155+
When multiple containerized apps are running on one machine, Workstation GC might be more preformant than Server GC. For more information, see [Running with Server GC in a Small Container](https://devblogs.microsoft.com/dotnet/running-with-server-gc-in-a-small-container-scenario-part-0/) and [Running with Server GC in a Small Container Scenario Part 1 – Hard Limit for the GC Heap](https://devblogs.microsoft.com/dotnet/running-with-server-gc-in-a-small-container-scenario-part-1-hard-limit-for-the-gc-heap/).
156+
151157
### Persistent object references
152158

153159
The GC cannot free objects that are referenced. Objects that are referenced but no longer needed result in a memory leak. If the app frequently allocates objects and fails to free them after they are no longer needed, memory usage will increase over time.

0 commit comments

Comments
 (0)