The memory usage for SoapServer and StreamService keeps increasing slowly in the PVS server

The memory usage for SoapServer and StreamService keeps increasing slowly in the PVS server

book

Article ID: CTX296239

calendar_today

Updated On:

Description

According to our observation, the *memory usage for SoapServer and StreamService keeps increasing slowly in the PVS server. The whole memory usage of that server is low.

*memory usage means Private Working Set + Shared Working Set
 

Resolution

It is normal situation for SoapServer and StreamService that the memory usage is keeping increasing slowly. But if the situation becomes serious and meets all of the following conditions, we need to take care of it and keep monitoring it.
--SoapServer's memory usage or StreamService's memory usage is 500 MB or more
--System memory usage is over 80%
 

Problem Cause

Both SoapServer and StreamService running on the PVS server are based on the .NET Framework, so
the memory release is controlled by .NET Framework itself. Per the published .NET documentation, garbage collection is used for releasing memory. But it has some conditions.

Based on these conditions, When the memory usage for the the entire system is still low, the .NET garbage collection will not be activated. So the memory usage for the SoapServer and StreamService can keep increasing.

<Reference information>
-------------------------------------------------- -
https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/fundamentals

Conditions for a garbage collection

Garbage collection occurs when one of the following conditions is true:

  • The system has low physical memory. This is detected by either the low memory notification from the OS or low memory as indicated by the host.

  • The memory that's used by allocated objects on the managed heap surpasses an acceptable threshold. This threshold is continuously adjusted as the process runs.

  • The GC.Collect method is called. In almost all cases, you don't have to call this method, because the garbage collector runs continuously. This method is primarily used for unique situations and testing.

-------------------------------------------------- -

In addition, when we investigate the issue in our case center, we find that the memory usage for SoapServer and StreamService in large environments can be as high as 1GB. PVS server can running well under such situation.

Additional Information

https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/fundamentals