.NET Framework Bookmark and Share   
 index > Windows Communication Foundation > WCF RAM usage
 

WCF RAM usage

Hi guys,

i have a strange behaviour of my wcf host.
some background:

i'm hosting my wcf service in a windows service. this windows service has a ram usage of about 70 mb and there are 12 users working on it at a time. Great, isn't it? This is when i use the nettcpbinding.
As soon as is switch to the wsHttpBinding and use SSL my windows service gets a real overeater: 250 mb for only 4 users working at a time!!

I suggest this is because of encrypted http communication has much more data overhead and the serializer need much more ram to do his job. is this right??
do you have any idea?

thank you in advance and kind regards
laurin
Laurin St
Hi Laurin,

WsHttpBinding and nettcpbinding uses the different encoding: WsHttpBinding uses textMessageEncoding, NetTcpBinding uses binaryMessageEncoding. This will consume the different amount memory. At the same time, in buffer-mode WCF Runtime will save all message data into memory. I think that this will give huge impact on memory consumption.

At the same time, I also recommend that you use CLR profiler and Windbg to investigate memory for more information:

http://msdn.microsoft.com/en-us/library/ms979205.aspx
This How To shows you how to use the CLR Profiler tool to investigate your application's memory allocation profile. You can use CLR Profiler to identify code that causes memory problems, such as memory leaks and excessive or inefficient garbage collection. Download the version for .NET 2.0 application.

http://msdn.microsoft.com/en-us/magazine/cc163528.aspx
This column discusses the investigation process and shows you how to collect the data you need to determine what types of memory issues you are dealing with in your applications.

Best regards,
Riquel
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Riquel_Dong

You can use google to search for other answers

Custom Search

More Threads

• Bug? - Copying a SecurityAppliedMessage leads to the wsa:To header not being signed
• Initialisation of generic identity from application service using sqlmembership authentication in wcf
• how to make application using WCF?
• WCF Client - Quits Without Exception
• What port should be used for a WCF baseaddress when deployed to an app server?
• making Custom WCF Service
• Problem debugging the service
• WCF with Java
• WCF without SSL
• IIS hosts WCF Service never work