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


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

Struct Memory Usage - clarification

Posted By:      Posted Date: October 06, 2010    Points: 0   Category :ASP.Net
 


class Program

    {
        static void Main(string[] args)
        {
            var prg = new Program();
            prg.ValueTest();
            prg.


View Complete Post


More Related Resource Links

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


Design: Inspect and Optimize Your Program's Memory Usage with the .NET Profiler API

  

Developers using .NET often make memory leak tracking a low priority because the common language runtime takes care of garbage collection. What few developers realize, however, is that their objects' lifespans, along with their size and what other objects have been instantiated, all affect how they are cleaned up. Depending on the particular circumstances, these combinations can negatively affect performance, especially over the lifetime of an application. This article presents a way for developers to see memory usage and understand garbage collection using the .NET Profiler API. Along the way, a sample application to demonstrate these principles is built.

Jay Hilyard

MSDN Magazine January 2003


Form background images and memory usage

  
Hello everyone, please forgive me if this is the wrong forum for this post. I have written a Windows App in C#. It's a real small application (something like a widget) that stays on your desktop and shows pictures of a folder in a random sequence. Before showing another picture i use : this.BackgroundImage.Dispose(); so that i keep memory usage low. If i won't do that i can see memory rising (depends on the image size). Now the code i use to change the picture is : this.BackgroundImage = Image.FromFile(path, true); So my question is about this last line of code. Is this a good approach of changing the picture after a while? (this code runs in a loop) Should i care about memory usage? The form is a small one for this kind of app, so loading big and large pictures can have some issues i guess. I have been monitoring my app for some time , memory and cpu usage were really low but i would like to know another and better approach on this one if somoeone knows.  de_Stan

SQL 2005 (32-bit) cluster memory usage

  
We recently did an in-place upgrade of our cluster from SQL 2000 Enterprise to 2005 Enterprise.  We are seeing memory utilization on the server that is not expected and wanted to get an idea from others if this is normal.  Here is our setup:

32-bit Windows Server 2003 SP1
SQL 2005 SP2, 2-node cluster
16 GB memory on each node
/3GB /PAE switches in the boot.ini file
AWE Enabled, min memory=0, max memory=14000

The strange bit is that in the Task Manager the SQL service is showing as only using 205 MB of memory and the pagefile usage is at 13 GB.  This is troublesome since it looks like SQL is using virtual memory instead of physical memory.  We recently upgraded the memory from 4 GB to 16 GB, the sql cluster service account was added to the Lock Pages in Memory policy, the boot.ini switches were set and the AWE enabled/max_server_memory script was run before upgrading to 2005.  Can anyone confirm either 1) this is normal or 2) how to correct the memory usage?

I have also questioned using the /3GB switch; would it be better to remove that and set the max memory for SQL to 12000?

Any help would be greatly appreciated.  If I left off any information that would be helpful, please let me know.

Chris

SQL Server 2008 Memory Usage

  

We are using SQL Server 2008 x64 SP1 CU8 EE, and we have 32 GB of RAM on the server. We currently have the instance restricted to 14 GB of RAM, the "Lock Pages in Memory" security setting on the service account, and AWE enabled in SQL Server. This server is part of a 3 node active/active/passive cluster. My question is:

 

How do I know how much memory sql server is actually using, or if the server is under memory pressure? 


John M. Couch

sql server high memory usage

  

Hello Guys

just wondering how do you handle similar situation, we had a call from angry client saying they are unable to do anything and things take too long to complete. when i logged in i noticed that sql server taking all memory (6GB) for some reason. interestingly CPU usage is normal.

I know i can run profiler to see what queries are taking such huge memory before it happens but what if it already happened and you want to see whats currently eating all that memory ? thanks for the advise.

sql server is 2008 and our desktop app is C# 2008.


prk

Memory usage per message.

  

I have a WCF web service and I want to find out a memory profile of the service per message. In other words I want to issue a message service request from a client and after the message is serviced and a response is received I want to find out (preferably from the client) how that message affected the memory footprint of the service. What tools are readily available? I am aware of several profiling tools from third parties but I want to know how I can integrate the information available through the Performance Monitor and Task Manager (for example) with the message processed to yield a profile of what each message does to the memory footprint. This could be used as a leak detection (if the memory after is more than the memory before then that message more than likely has a leak). If the memory statistic was available during the message processing it could be seen that message A consumes alot of peak memory whereas message B consumes relatively little. Ideas?

Thank you.

Kevin


Configuring AWE and memory usage in SQL Server 2005

  
Dear Sirs,
I installed SQL Server 2005 Enterprise Edition (with SP3) on a server running Windows Server 2003 Enterprise Editon SP2 with 8GB RAM and with "Physical Address Extension".
I want the SQL Server 2005 makes use of memory that is in excess of 4 GB and will perform the following steps to accomplish this:

1) I'll add the SQL service account to the
policy "lock his pages in memory"

2) I'll include the /PAE switch in Boot.ini

3) I'll change the "awe enabled" with the following commands:

sp_configure 'show advanced options', 1
RECONFIGURE
GO
sp_configure 'awe enabled', 1
RECONFIGURE
GO

4) I'll change "min server memory" and "max server memory" with the following commands:

sp_configure 'min server memory', 1024
RECONFIGURE
GO
sp_configure 'max server memory', 8192
RECONFIGURE

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


SQL Server 2008 - High Memory Usage

  

Hi ,

  We are facing problem with the high memory usage with SQL Server 2008. 64 bit , standard edition sp2 . 8 GB RAM , 8 processors .

Memory usage keep on growing ..sometimes it will reach to 7.5 GB also .... and its not coming down ..untill we restart the service...

These are the details of DBCC MEMORYSTATUS :: Please suggest how to overcome this problem

Memory Manager                           KB
---------------------------------------- -----------
VM Reserved                              8484792
VM Committed                             4220368
Locked Pages Allocated                   0
Reserved Memory                          1024
Reserved Memory In Use      &n

SQL Server 2008 R2 on Windows Server 2008 R2 Memory Usage issues and not giving memory back

  

Okay so i have a physical server i am trying to replace with a virtual server. Its doing a large load process every night, about 190GB on one disk.

The VM is:

On vSphere 4.1 ESXi

O/S is Windows Server 2008 R2 Enterprise

SQL version is SQL Server 2008 R2 Enterprise.

4 vCpus

Now 20GB of memory

Disks assigned to this virtual are all seperate LUNs except for the O/S which is on a shared LUN which is not busy. So 1 LUN/Datastore per 'disk drive on this SQL virtual. Data/Log/TempDB/Backup are on their own LUNs.

All the recommended exclusions are in place for McAfee on a SQL Server.

ESXi 4.1 Enterprise host is not overcommitted. Has 4 x 6core 2.6Ghz AMD processors. BL685c G6 and 128GB of memory. Almost nothing else is running at the time i am testing this load and host is not overcommited or stressed or anywhere near it.

SQLServer process shows 127,236K Working Set and 130,040K Peak working set and memory Private working set 88,828k and Commit Size of 302,792k.

It seems when i check the memory usage in task manager it doesn't show much. In Windows 2003 X64 in would show the GB being used, like 8GB right in task manager. But i don't see that in Windows 2008 R2 task manager. I downloaded SysInternals and it shows the memory on the Windows 2008 r2 box as 15Gb of AWE memory. How can this be? The case is th

High memory usage by the SSMS.exe and no Running Query

  

Hi i am editing a stored procedure using the SSMS (I have SQL Server 2008 SP1 - Windows 2003 Server Standard). At the begining everything is ok, but around of 3 or 4 minutes of work the ssms is becoming to slow, I open the Task Manager and I see that the process SSMS.exe is using 1.2GB of RAM Memory. I have open just one script (The stored procedure that I'm editing) but the script isnt running only editing. I dont understand that high memory because i'm not retreiving data of any query and im not running any thing on my ssms. Take a look of my task manager http://i875.photobucket.com/albums/ab319/jacarmonaro/highMemory.jpg

Other thing: When I minimize the ssms window the smss.exe process come back to a normal RAM memory usage.

Please any help??

 


JAC

ASP.NET Server Memory usage

  

Hello.

My name is Johnathan and I work as an asp.net web devoloper.

My company is starting to transfer from classic asp to asp.net 4.0 in our websites. During the transition I have encountred a few issues:

  1. It seems that asp.net uses a lot more memory then classic asp on the server that hosts the websites. Is that true, and if so how can I minimize the memory usage?
  2. Does asp.net 4 transitiond out of the beta phase? I have a website that is built in the asp.net 4.0 technology that is running smooth on the localhost, but on the server sometimes it doesn't connect to the database. Does this mean it is the host provider's fault or is it something in the code? (here is the website: http://www.sospets2.co.cc/)

Thanks alot and have a nice day!

Johnathan


High memory usage by the SSMS.exe and no Running Query

  

Hi i am editing a stored procedure using the SSMS (I have SQL Server 2008 SP1 - Windows 2003 Server Standard). At the begining everything is ok, but around of 3 or 4 minutes of work the ssms is becoming to slow, I open the Task Manager and I see that the process SSMS.exe is using 1.2GB of RAM Memory. I have open just one script (The stored procedure that I'm editing) but the script isnt running only editing. I dont understand that high memory because i'm not retreiving data of any query and im not running any thing on my ssms. Take a look of my task manager http://i875.photobucket.com/albums/ab319/jacarmonaro/highMemory.jpg

Other thing: When I minimize the ssms window the smss.exe process come back to a normal RAM memory usage.

Please any help??

 


JAC

Central Admin Memory usage?

  

I have a farm where the Cwentral Admin Appool is using a tremendous amount of memory 1GB plus.

Once started it just seems to keep growing even if no activity is on it.

Any thoughts?


SQL Server 2000 is getting very slow, memory usage also very high but restarted db service it comes

  

Hi,

I am facing slow down problem in SQL Server 2000. SQL Server is very very slow during that time memory also very high usage but when I restart SQL Service it comes to normal. Please advice, if anyone who has experienced in this type of situation. Appreciate if you help to resolve this problem. Thanks

 

S.Jay

 


Mikha

Clarification on usage of HttpModule

  

I am looking to use httpmodule and achieve the following. Please let me know if I can use httpmodule for the below,

a) One of the windows authentaicated (ie. AD) site I always want the current login to be as "myserver\superadmin". Can I do that with spsecurity by passing SPToken? If I implement the same, will the entire session be on that same login?

b) On another site, I would like only "myserver\superadmin" to access all site but for normal users I would like to block any url that has "_layouts" by redirecting to home page? Is that okay to do with httpmodule considering the performance etc?

please suggest with any examples.


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