Red Gate forums :: View topic - Virtual Bytes counter and IIS Virtual memory limit.
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Memory Profiler 7
ANTS Memory Profiler 7 forum

Virtual Bytes counter and IIS Virtual memory limit.

Search in ANTS Memory Profiler 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
vitema



Joined: 08 Jun 2011
Posts: 4

PostPosted: Wed Jun 08, 2011 2:41 pm    Post subject: Virtual Bytes counter and IIS Virtual memory limit. Reply with quote

Hello! Please help!
My provider set virtual memory limit in IIS 7 - 96 Mb.

Now I have big problem with lost session state immediately after the start application...

IIS logs:
was-20110608.log:Jun 8 12:50:13 192.168.2.36 WAS: 5077: A worker
process with process id of '2576' serving application pool
'arlekino74.ru(domain)(2.0)(pool)' has requested a recycle because it
reached its virtual memory limit.
was-20110608.log:Jun 8 12:55:13 192.168.2.36 WAS: 5186: A worker
process with process id of '9692' serving application pool
'arlekino74.ru(domain)(2.0)(pool)' was shutdown due to inactivity.
Application Pool timeout configuration was set to 5 minutes. A new
worker process will be started when needed.

I tested the site and have not seen any potencial problems with memory leaks.



But counter Virtual Bytes is very big - 236 Mb.
I also tested a simple empty page

aspx:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
1231231
</div>
</form>
</body>
</html>
------------
cs:
using System;


public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}
-----

But even here Virtual Bytes counter is 178 Mb.



-----

This counter actually shows the memory that IIS responds?


What advise do to solve this problem?


Thanks in advance
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Thu Jun 09, 2011 5:57 pm    Post subject: Reply with quote

The Virtual Bytes counter rises sharply at application load, but remains pretty steady, so I don't think you have a memory leak -- maybe your application is just that big.

If the memory usage continues to increase over time, that is the kind of problem Memory profiler is good at solving.

But If your application does use that much memory, you may want to look at the health monitoring settings in IIS and configure the app to recycle at a higher memory usage.

I am guessing someone is already aware of these problems, because they have gone out of their way to configure health monitoring to put events in your event log.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Thu Jun 09, 2011 6:10 pm    Post subject: Reply with quote

I've also noticed that most of the memory usage is unmanaged code as well. Unless you can directly correlate that with a managed .NET class, it will be difficult to find any overuse of memory with ANTS Memory Profiler.
Back to top
View user's profile Send private message
vitema



Joined: 08 Jun 2011
Posts: 4

PostPosted: Fri Jun 10, 2011 3:32 am    Post subject: Reply with quote

This is the problem.
I can`t configure the provider's IIS.
In Visual Studio and on two other providers I have no such problems.

And once again, that a blank site, which can not be big also occupies a large amount of virtual memory. And my application is not big - simple engine.

I can not find a starting point, the parameter on which to push off...
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Fri Jun 10, 2011 9:11 am    Post subject: Reply with quote

What class (other than system.string) has the most instances?

I never look at String classes because in ASP .NET just about everything is converted to string.
Back to top
View user's profile Send private message
vitema



Joined: 08 Jun 2011
Posts: 4

PostPosted: Fri Jun 10, 2011 9:41 am    Post subject: Re: Reply with quote

Brian Donahue wrote:
What class (other than system.string) has the most instances?

I never look at String classes because in ASP .NET just about everything is converted to string.





HashTable+ bucket Class is the second largest class

Root Instance for this class is UrlRewriting Section.
I using UrlRewritingNet.UrlRewriter.dll




Back to top
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Fri Jun 10, 2011 11:41 am    Post subject: Reply with quote

'Virtual Bytes' represents the total address space reserved by your application. This doesn't actually represent the amount of memory that your application is using! The amount of memory being used by a given application is best represented by the 'Private Bytes' counter.

'Private bytes' represents the memory that is allocated and in use exclusively by a particular application. It's the most direct representation of 'how much memory does my application need'.

There are two things that are a major contributor to the size of the 'virtual bytes' pool: one is the shared DLLs and operating system structures that are mapped into the memory of your application. You have no control over this.

The second is space that is reserved but not in use. .NET reserves some address space so it can expand its heaps quickly when it needs to. This is generally pretty unnoticeable on 32-bit systems, but on 64-bit systems, there is a lot more address space to play with, so it reserves a chunk of 200Mb by default. This appears to be about the amount of Virtual Bytes that you are seeing, so that might point that your application is running in a 64-bit app pool.

I don't think there's any way to get an application to fit in a 96Mb virtual bytes limit. Even notepad requires 80Mb of address space to run. .NET requires about 20Mb of private bytes, plus whatever extra virtual bytes are needed to load the (shared) DLLs, so a .NET app is probably going to need at least 100Mb or so in order to display 'Hello, World'. (Note that this isn't 'used memory' but 'used address space', most of that is either reserved or shared between many application)

I think your ISP probably meant to give your application pool a 96Mb private bytes limit instead.
_________________
Andrew Hunter
Software Developer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
vitema



Joined: 08 Jun 2011
Posts: 4

PostPosted: Sat Jun 11, 2011 4:30 am    Post subject: Reply with quote

Thank you.
I think so too
I wrote ISP, that if they want to limit the problematic sites, then it would be wise to set limits on private memory or phisical memory...

I'll try to give a link to your comment
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group