.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

Memory consumption comparison between WCF x Remoting on Host

Posted By:      Posted Date: October 10, 2010    Points: 0   Category :WCF
 

Dear sirs,

 

I did a small winform host application to register a simple service (Hello Word) 500 times on Remoting and on WCF.

I noticed that WCF consumes much more memory than Remoting just to host the services. About 150 times over .

 

I´m just talking the necessary memory to run the following commands:

- [WCF] ServiceHost.Open   versus  [Remoting] RemotingConfiguration.RegisterWellKnownServiceType

I´m not talking about message, client x server communication...

 

Here is my sample application results summary:

-WCF Service - GC Memory (gcMemoryEnd - gcMemoryStart) : 9691 KBytes

-Remoting Service - GC Memory (gcMemoryEnd - gcMemoryStart) :61 KBytes

 

I can send to you my sample application. Just ask me. (mrctito@hotmail.com)

You can download from [http://cid-063f615d2720e2bf.office.live.com/self.aspx/P%c3%bablico/MemoryConsumptionComparisonWCFversusRemoting.zip] too.

I would be very glad for any help.

Thank you.




View Complete Post


More Related Resource Links

Remoting from WebService throws: An existing connection was forcibly closed by the remote host

  
Hello everyone, I have a problem with using .NET remoting from webservice. When using remoting from console application, there is no problem. I suppose problem is somewhere in IIS. My system is Windows Vista. Thank you for any help. Best regards, Jozef

Reduce memory consumption

  
Hi, I'm trying to reduce the memory consumption of a large scale system. The system is based on thousands of DLLs. I'm trying to understand what actions can I take regarding the large amount of DLLs in order to reduce the memory consumption. One thought I had in mind is merging DLLs in order to minimize the meta-data stored in memory. What do you think? any other ideas? Thanks.Lior

How to derive actual physical memory consumption by a process?

  

Hello,

I am doing performance analysis of SSRS reports (2008).

Before doing anything, I check in Task Manager(Performance tab) and see that my overall physical memory which is 8GB, is already divided between available memory and system cache. I have also setup perfmon counters and logging data for available memory counter.

Now when I launch a huge report with 2 million records, it starts consuming the available memory and I notice in Task Manager(Performance tab) the available memory is reducing BUT I also notice that the system cache is also reducing (I assume that perhaps OS is borrowing memory from system cache to put it in available memory?) If my assumption is correct, then I would not be able to calculate how much physical memory my report used because it also includes a portion of system cache(?)

OR is the system cache reducing due to disk I/O?

This is getting confusing for me, please help me out experts.

Regards.

 

 


How to derive actual physical memory consumption by a process?

  

Hello,

I am doing performance analysis of SSRS reports (2008).

Before doing anything, I check in Task Manager(Performance tab) and see that my overall physical memory which is 8GB, is already divided between available memory and system cache. I have also setup perfmon counters and logging data for available memory counter.

Now when I launch a huge report with 2 million records, it starts consuming the available memory and I notice in Task Manager(Performance tab) the available memory is reducing BUT I also notice that the system cache is also reducing (I assume that perhaps OS is borrowing memory from system cache to put it in available memory?) If my assumption is correct, then I would not be able to calculate how much physical memory my report used because it also includes a portion of system cache(?)

OR is the system cache reducing due to disk I/O?

This is getting confusing for me, please help me out experts.

Regards.

 

 


memory usage (consumption) of individual controls on a web form shown in a browser

  

Hi

Is there a way to check the memory usage (consumption) of individual controls on a web form shown in a browser. Like Repeater Control, Multiline Text box etc. The reason is I am putting the repeater control in session and checking the status of controls, based on which I am doing further actions.

Thanks

gsalunkhe


WPF Memory consumption on scroll

  

Hi,

I have a listview in the UI, to which each item is loaded on Page Up and Page Down events.

I use Listview1.items.Clear before I add a new item or the next item in the ListView using listview1.items.Add(obj1)

Although, I am clearing the listviewitems before adding a new one, the memory keeps increasing on Page Up and Page Down actions. I have also set Isvirtualizing = true on the Listview and there is no much process involved in fetching the next listviewitem except it contains around 10 RichTexboxes and TextBoxes.

Please let me know as what to do to fix the problem.

Thanks.


How to detect and avoid memory and resources leaks in .NET application

  
Despite what a lot of people believe, it's easy to introduce memory and resources leaks in .NET applications. The Garbage Collector, or GC for close friends, is not a magician who would completely relieve you from taking care of your memory and resources consumption.

I'll explain in this article why memory leaks exist in .NET and how to avoid them. Don't worry, I won't focus here on the inner workings of the garbage collector and other advanced characteristics of memory and resources management in .NET.

file upload in chunks or not buffering in memory before writing to disk?

  

What are the options for handling file uploads to reduce the memory footprint?  Is there a way to upload in chunks?  Is there a way to stream upload directly to disk instead of loading entire file in server memory?


Thanks


Visual Studio 2008 Memory problems

  

My memory in task manager reaches about 900,000K  and I don't know why it does this. Definately slows everything down, especially when I rebuild my tableAdapters, takes about 30 seconds sometimes to rebuild the project.


Required permissions cannot be acquired when host asp.net 3.5 application in godaddy

  

I got the following error when click print report button.

Application : asp.net 3.5

Crystal report : 10.5

Host: godaddy

Please help me.

Thanks

Required permissions cannot be acquired.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Crystal Report gives System.AccessViolationException: Attempted to read or write protected memory. T

  

when a crystal report for same id is opened again at same time or refreshed then it gives the

"System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."


Stack Trace is :-


Stack Trace:

[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetConnectionInfos(ConnectionInfos ConnectionInfos) +0
CrystalDecisions.CrystalReports.Engine.Table.ApplyLogOnInfo(TableLogOnInfo logonInfo) +362
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetTableLogon(Tables tables, String user, String password, String server, String database, Boolean ignoreCase) +258
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database, Boolean ignoreCase) +204
CrystalDecisions.

Maximum memory for string ? . System.MemoryOutOfException Occurs when reading the Content of the fil

  

Hi,

I have a C++ code which reads a file [vtk file - its similar to text file only]. and try to store it in string.

here's the code:

String^ ParallelProjectionRenderer::GetVolumeDataAsString(String^ FileName)

{
    vtkSmartPointer<vtkDataSetWriter> sWriter = vtkSmartPointer<vtkDataSetWriter>::New();

    String^ FileName = "D:\\Users\\...";

    char * sptName = static_cast<char *>(Marshal::StringToHGlobalAnsi(FileName).ToPointer());

    sWriter->SetFileName(sptName);

    sWriter->Register(nullptr);

    sWriter->SetInput(this->dataSource);

    sWriter->SetFileTypeToASCII();

    sWriter->Write();

    sWriter->Delete();

    String^ result= File::ReadAllText(FileName);   [it breaks here with system.memoryoutofexception when the file size is huge]

    return result;

}

this code executes fine when the file size is less than 8mb.

I wanted to know whats the maximum memory allocated to the string.


As a workaround i skipped reading out in C++ code. and i tried to read the file contents in asp.net C# code and stor

Tools for memory error check in VS2005

  

Dear all,

I am going to write vs2005 program with ASP.NET and C++.

As you know that C++ will involve a lot of memory error handling.

Do you know is there any tools for checking memory error in Code Behind C++??


CLR Inside Out: Memory Usage Auditing For .NET Applications

  

Memory usage can have a direct impact on how fast an application executes and thus is important to optimize. In this article we discuss the basics of memory optimization for .NET programs.

Subramanian Ramaswamy and Vance Morrison

MSDN Magazine June 2009


Toolbox: Updated grid controls, open-source comparison tools, and more

  

This time: Windows Forms grids, professional-looking date textboxes, file merging, and more.

Scott Mitchell

MSDN Magazine November 2007


Debug Leaky Apps: Identify And Prevent Memory Leaks In Managed Code

  

When is the .NET Garbage Collector unable to reclaim memory? The answer might surprise you. Stay tuned.

James Kovacs

MSDN Magazine January 2007


CLR Inside Out: Investigating Memory Issues

  

Memory issues can manifest in a wide variety of ways. This column shows you how to collect the data you need to determine what types of mem¬ory issues you are experiencing.

Claudio Caldato and Maoni Stephens

MSDN Magazine November 2006


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend