Pull to refresh

Comments 5

Не соглашусь с тем что серверные приложения сейчас все пишут в контейнерах (стоит учитывать хотя бы огромное количество легаси, написанного до бума Docker контейнеров). Однако очень хорошее замечание и действительно стоило упомянуть в статье что серверный режим работы GC:

  1. Предполагает что приложение, которое его использует, будет единственным использующим Server GC на машине

  2. Не поддерживает работу на машине с одним логическим процессором (в случае если вы выделите на ваш контейнер один логический процессор).

Приведу несколько цитат где это описано более детально:

Server garbage collection can be resource-intensive. For example, imagine that there are 12 processes that use server GC running on a computer that has four logical CPUs. If all the processes happen to collect garbage at the same time, they would interfere with each other, as there would be 12 threads scheduled on the same logical CPU. If the processes are active, it's not a good idea to have them all use server GC.

If you're running hundreds of instances of an application, consider using workstation garbage collection with concurrent garbage collection disabled. This will result in less context switching, which can improve performance.

https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/workstation-server-gc#server-gc

Server GC was designed with the assumption that the process using Server GC is the dominant process on the machine.

https://devblogs.microsoft.com/dotnet/running-with-server-gc-in-a-small-container-scenario-part-0/

Спасибо за хороший комментарий !

А вот раньше с .net frameform asp.net были контексты , в .net core их убрали или что произошли?

Sign up to leave a comment.

Articles