473,395 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Problem: w3wp is memory bound

Machine: 32 bit Intel Xeon 2.93 GHz, 16 CPUs, 32 GB RAM
OS: Windows Server 2003 R2 Ent Edition, SP2
Web Server: IIS 6
ASP.NET ver: 2.0

I made a simple ASP.NET application, with only this code in the
Page_Load, to
simulate a condition where huge memory is utilized by the app:

int i = 0;
int j = 0;
StringBuilder[] sb = new StringBuilder[3000];

while (i < 3000)
{
sb[i] = new StringBuilder(9999999);

j = 0;
while (j < (9999999))
{
sb[i].Append('a');
j++;
}
Console.WriteLine(i.ToString());
i++;
}
When I invoke Default.aspx from IE, the w3wp process memory use
increases, goes
till around 1.3 GB, and then the app crashes out with
OutOfMemoryException, w3wp
recycles.

In IIS, the 'Max Used memory' value is set at 4 GB, so is the 'Max
Virtual memory',
both for the App Pool. In Machine.Config, memoryLimit is set at 100%.

I am unable to find out why the app is not going beyond 1.3 GB of
memory usage.

Any pointers will be helpful.

Thanks,
Anand
--
Sep 22 '08 #1
6 4768
AFAIK unless an application is explicitly written to take advantage of it, a
single process can use 2 Gb at best plus you likely need some more memory
during the GC (when it moves something it needs at least the source object
and the copy).

Note that it doesn't mean *all* requests won't use more, it means that
*each* request won't be able to use more memory.

Someone more knowledgable will likely popup but this is my understanding for
now. Also knowing if you are trying to solve something or if this is just to
see how it behaves could perhaps help...

My first thought would be to see if you can go beyond this when issuing
multiple queries at the same time (not sure thought what you are trying to
find out)...

--
Patrice

"Anand Saha" <an*******@gmail.coma écrit dans le message de groupe de
discussion :
c0**********************************...oglegroups.com...
Machine: 32 bit Intel Xeon 2.93 GHz, 16 CPUs, 32 GB RAM
OS: Windows Server 2003 R2 Ent Edition, SP2
Web Server: IIS 6
ASP.NET ver: 2.0

I made a simple ASP.NET application, with only this code in the
Page_Load, to
simulate a condition where huge memory is utilized by the app:

int i = 0;
int j = 0;
StringBuilder[] sb = new StringBuilder[3000];

while (i < 3000)
{
sb[i] = new StringBuilder(9999999);

j = 0;
while (j < (9999999))
{
sb[i].Append('a');
j++;
}
Console.WriteLine(i.ToString());
i++;
}
When I invoke Default.aspx from IE, the w3wp process memory use
increases, goes
till around 1.3 GB, and then the app crashes out with
OutOfMemoryException, w3wp
recycles.

In IIS, the 'Max Used memory' value is set at 4 GB, so is the 'Max
Virtual memory',
both for the App Pool. In Machine.Config, memoryLimit is set at 100%.

I am unable to find out why the app is not going beyond 1.3 GB of
memory usage.

Any pointers will be helpful.

Thanks,
Anand
--

Sep 22 '08 #2
Patrice,

This small experiment is to solve a bigger problem - that with Report
Server 2005.

We have a report which sucks huge amount of data from the database.
And in the process of
producing the report, the Report Server crashes with
OutOfMemoryException. .

Its actually the w3wp which terminates when it reaches 1.3GB, and till
now the mystery is
still unsolved, as to why the number 1.3 ? An immediate reaction would
be that its 60% of the
2 GB that you mentioned, but I made sure that machine.config has 100
in the memoryLimit parameter.

And on further investigation, I found that this has nothing to do with
Report Server, as a small web app
like the one i posted shows the same behavior.

The OS boots with the /PAE flag, and we have 32 GB RAM in the machine.
So its frustrating that
the process uses just 1.3 GB

Anand
--

On Sep 22, 4:43*pm, "Patrice" <http://www.chez.com/scribe/wrote:
AFAIK unless an application is explicitly written to take advantage of it, a
single process can use 2 Gb at best plus you likely need some more memory
during the GC (when it moves something it needs at least the source object
and the copy).

Note that it doesn't mean *all* requests won't use more, it means that
*each* request won't be able to use more memory.

Someone more knowledgable will likely popup but this is my understanding for
now. Also knowing if you are trying to solve something or if this is justto
see how it behaves could perhaps help...

My first thought would be to see if you can go beyond this when issuing
multiple queries at the same time (not sure thought what you are trying to
find out)...

--
Patrice

"Anand Saha" <anands...@gmail.coma écrit dans le message de groupe de
discussion :
c048d8f7-12a3-415d-9928-04f89ac5c...@b30g2000prf.googlegroups.com...
Machine: 32 bit Intel Xeon 2.93 GHz, 16 CPUs, 32 GB RAM
OS: Windows Server 2003 R2 Ent Edition, SP2
Web Server: IIS 6
ASP.NET ver: 2.0
I made a simple ASP.NET application, with only this code in the
Page_Load, to
simulate a condition where huge memory is utilized by the app:
* * int i = 0;
* * * * * *int j = 0;
* * * * * *StringBuilder[] sb = new StringBuilder[3000];
* * * * * *while (i < 3000)
* * * * * *{
* * * * * * * *sb[i] = new StringBuilder(9999999);
* * * * * * * *j = 0;
* * * * * * * *while (j < (9999999))
* * * * * * * *{
* * * * * * * * * *sb[i].Append('a');
* * * * * * * * * *j++;
* * * * * * * *}
* * * * * * * *Console.WriteLine(i.ToString());
* * * * * * * *i++;
* * * * * *}
When I invoke Default.aspx from IE, the w3wp process memory use
increases, goes
till around 1.3 GB, and then the app crashes out with
OutOfMemoryException, w3wp
recycles.
In IIS, the 'Max Used memory' value is set at 4 GB, so is the 'Max
Virtual memory',
both for the App Pool. In Machine.Config, memoryLimit is set at 100%.
I am unable to find out why the app is not going beyond 1.3 GB of
memory usage.
Any pointers will be helpful.
Thanks,
Anand
-- *
Sep 22 '08 #3
Try perhaps http://support.microsoft.com/kb/909678/en-us.

Also a quick search seems to show that RS2008 has an improved architecture
to overcome this limit
(http://blogs.msdn.com/bwelcker/archi...eave-iis.aspx).

The microsoft.public.sqlserver.reportingsvcs could be better for this RS
related issue. Good luck.

--
Patrice
"Anand Saha" <an*******@gmail.coma écrit dans le message de groupe de
discussion :
29**********************************...oglegroups.com...
Patrice,

This small experiment is to solve a bigger problem - that with Report
Server 2005.

We have a report which sucks huge amount of data from the database.
And in the process of
producing the report, the Report Server crashes with
OutOfMemoryException. .

Its actually the w3wp which terminates when it reaches 1.3GB, and till
now the mystery is
still unsolved, as to why the number 1.3 ? An immediate reaction would
be that its 60% of the
2 GB that you mentioned, but I made sure that machine.config has 100
in the memoryLimit parameter.

And on further investigation, I found that this has nothing to do with
Report Server, as a small web app
like the one i posted shows the same behavior.

The OS boots with the /PAE flag, and we have 32 GB RAM in the machine.
So its frustrating that
the process uses just 1.3 GB

Anand
--

On Sep 22, 4:43 pm, "Patrice" <http://www.chez.com/scribe/wrote:
>AFAIK unless an application is explicitly written to take advantage of
it, a
single process can use 2 Gb at best plus you likely need some more memory
during the GC (when it moves something it needs at least the source
object
and the copy).

Note that it doesn't mean *all* requests won't use more, it means that
*each* request won't be able to use more memory.

Someone more knowledgable will likely popup but this is my understanding
for
now. Also knowing if you are trying to solve something or if this is just
to
see how it behaves could perhaps help...

My first thought would be to see if you can go beyond this when issuing
multiple queries at the same time (not sure thought what you are trying
to
find out)...

--
Patrice

"Anand Saha" <anands...@gmail.coma écrit dans le message de groupe de
discussion :
c048d8f7-12a3-415d-9928-04f89ac5c...@b30g2000prf.googlegroups.com...
Machine: 32 bit Intel Xeon 2.93 GHz, 16 CPUs, 32 GB RAM
OS: Windows Server 2003 R2 Ent Edition, SP2
Web Server: IIS 6
ASP.NET ver: 2.0
I made a simple ASP.NET application, with only this code in the
Page_Load, to
simulate a condition where huge memory is utilized by the app:
int i = 0;
int j = 0;
StringBuilder[] sb = new StringBuilder[3000];
while (i < 3000)
{
sb[i] = new StringBuilder(9999999);
j = 0;
while (j < (9999999))
{
sb[i].Append('a');
j++;
}
Console.WriteLine(i.ToString());
i++;
}
When I invoke Default.aspx from IE, the w3wp process memory use
increases, goes
till around 1.3 GB, and then the app crashes out with
OutOfMemoryException, w3wp
recycles.
In IIS, the 'Max Used memory' value is set at 4 GB, so is the 'Max
Virtual memory',
both for the App Pool. In Machine.Config, memoryLimit is set at 100%.
I am unable to find out why the app is not going beyond 1.3 GB of
memory usage.
Any pointers will be helpful.
Thanks,
Anand
--
Sep 22 '08 #4
you are confusing parameters. the max memory in the config, specifies the
runtime max (target for GC) and a forced recycle will happen if more memory
is used. you are getting a out-of-memory message, which is call to the o/s to
get more memory, which is failing.

asp.net does not support PAE (which is a memory swapping scheme requiring
application support and used mainly for caching), so the max memory it can be
allocated (on a 32bit o/s) is 2gb. as the process virtual page table (list
of all pages used by a process, with necessary mapping info) goes into user
space, a process can not actually access 2gb of memory. there is other
control stuff in user memory, whoich lead to the max working set size (which
can depend on which serive packs are installed). your test shows that on
your server configuartion, 1.3 is about the max working set size.

unless you have a lot of app pools (each which can grow to max working set
size), 38 gb is really a waste. you should switch to a 64bit o/s to get any
use of this memory.

-- bruce (sqlwork.com)
"Anand Saha" wrote:
Patrice,

This small experiment is to solve a bigger problem - that with Report
Server 2005.

We have a report which sucks huge amount of data from the database.
And in the process of
producing the report, the Report Server crashes with
OutOfMemoryException. .

Its actually the w3wp which terminates when it reaches 1.3GB, and till
now the mystery is
still unsolved, as to why the number 1.3 ? An immediate reaction would
be that its 60% of the
2 GB that you mentioned, but I made sure that machine.config has 100
in the memoryLimit parameter.

And on further investigation, I found that this has nothing to do with
Report Server, as a small web app
like the one i posted shows the same behavior.

The OS boots with the /PAE flag, and we have 32 GB RAM in the machine.
So its frustrating that
the process uses just 1.3 GB

Anand
--

On Sep 22, 4:43 pm, "Patrice" <http://www.chez.com/scribe/wrote:
AFAIK unless an application is explicitly written to take advantage of it, a
single process can use 2 Gb at best plus you likely need some more memory
during the GC (when it moves something it needs at least the source object
and the copy).

Note that it doesn't mean *all* requests won't use more, it means that
*each* request won't be able to use more memory.

Someone more knowledgable will likely popup but this is my understanding for
now. Also knowing if you are trying to solve something or if this is just to
see how it behaves could perhaps help...

My first thought would be to see if you can go beyond this when issuing
multiple queries at the same time (not sure thought what you are trying to
find out)...

--
Patrice

"Anand Saha" <anands...@gmail.coma écrit dans le message de groupe de
discussion :
c048d8f7-12a3-415d-9928-04f89ac5c...@b30g2000prf.googlegroups.com...
Machine: 32 bit Intel Xeon 2.93 GHz, 16 CPUs, 32 GB RAM
OS: Windows Server 2003 R2 Ent Edition, SP2
Web Server: IIS 6
ASP.NET ver: 2.0
I made a simple ASP.NET application, with only this code in the
Page_Load, to
simulate a condition where huge memory is utilized by the app:
int i = 0;
int j = 0;
StringBuilder[] sb = new StringBuilder[3000];
while (i < 3000)
{
sb[i] = new StringBuilder(9999999);
j = 0;
while (j < (9999999))
{
sb[i].Append('a');
j++;
}
Console.WriteLine(i.ToString());
i++;
}
When I invoke Default.aspx from IE, the w3wp process memory use
increases, goes
till around 1.3 GB, and then the app crashes out with
OutOfMemoryException, w3wp
recycles.
In IIS, the 'Max Used memory' value is set at 4 GB, so is the 'Max
Virtual memory',
both for the App Pool. In Machine.Config, memoryLimit is set at 100%.
I am unable to find out why the app is not going beyond 1.3 GB of
memory usage.
Any pointers will be helpful.
Thanks,
Anand
--

Sep 22 '08 #5
Thanks Patrice.
On Sep 22, 7:12*pm, "Patrice" <http://www.chez.com/scribe/wrote:
Try perhapshttp://support.microsoft.com/kb/909678/en-us.

Also a quick search seems to show that RS2008 has an improved architecture
to overcome this limit
(http://blogs.msdn.com/bwelcker/archi...-why-leave...).

The microsoft.public.sqlserver.reportingsvcs could be better for this RS
related issue. Good luck.

--
Patrice

"Anand Saha" <anands...@gmail.coma écrit dans le message de groupe de
discussion :
29995ed1-4b72-4dfd-a641-690d813e7...@q26g2000prq.googlegroups.com...
Patrice,
This small experiment is to solve a bigger problem - that with Report
Server 2005.
We have a report which sucks huge amount of data from the database.
And in the process of
producing the report, the Report Server crashes with
OutOfMemoryException. .
Its actually the w3wp which terminates when it reaches 1.3GB, and till
now the mystery is
still unsolved, as to why the number 1.3 ? An immediate reaction would
be that its 60% of the
2 GB that you mentioned, but I made sure that machine.config has 100
in the memoryLimit parameter.
And on further investigation, I found that this has nothing to do with
Report Server, as a small web app
like the one i posted shows the same behavior.
The OS boots with the /PAE flag, and we have 32 GB RAM in the machine.
So its frustrating that
the process uses just 1.3 GB
Anand
--
On Sep 22, 4:43 pm, "Patrice" <http://www.chez.com/scribe/wrote:
AFAIK unless an application is explicitly written to take advantage of
it, a
single process can use 2 Gb at best plus you likely need some more memory
during the GC (when it moves something it needs at least the source
object
and the copy).
Note that it doesn't mean *all* requests won't use more, it means that
*each* request won't be able to use more memory.
Someone more knowledgable will likely popup but this is my understanding
for
now. Also knowing if you are trying to solve something or if this is just
to
see how it behaves could perhaps help...
My first thought would be to see if you can go beyond this when issuing
multiple queries at the same time (not sure thought what you are trying
to
find out)...
--
Patrice
"Anand Saha" <anands...@gmail.coma écrit dans le message de groupede
discussion :
c048d8f7-12a3-415d-9928-04f89ac5c...@b30g2000prf.googlegroups.com...
Machine: 32 bit Intel Xeon 2.93 GHz, 16 CPUs, 32 GB RAM
OS: Windows Server 2003 R2 Ent Edition, SP2
Web Server: IIS 6
ASP.NET ver: 2.0
I made a simple ASP.NET application, with only this code in the
Page_Load, to
simulate a condition where huge memory is utilized by the app:
int i = 0;
int j = 0;
StringBuilder[] sb = new StringBuilder[3000];
while (i < 3000)
{
sb[i] = new StringBuilder(9999999);
j = 0;
while (j < (9999999))
{
sb[i].Append('a');
j++;
}
Console.WriteLine(i.ToString());
i++;
}
When I invoke Default.aspx from IE, the w3wp process memory use
increases, goes
till around 1.3 GB, and then the app crashes out with
OutOfMemoryException, w3wp
recycles.
In IIS, the 'Max Used memory' value is set at 4 GB, so is the 'Max
Virtual memory',
both for the App Pool. In Machine.Config, memoryLimit is set at 100%..
I am unable to find out why the app is not going beyond 1.3 GB of
memory usage.
Any pointers will be helpful.
Thanks,
Anand
--
Sep 23 '08 #6
Thanks Bruce for the insight. We are trying out the 64 bit option,
will report the results here.
On Sep 22, 8:58*pm, bruce barker
<brucebar...@discussions.microsoft.comwrote:
you are confusing parameters. the max memory in the config, specifies the
runtime max (target for GC) and a forced recycle will happen if more memory
is used. you are getting a out-of-memory message, which is call to the o/s to
get more memory, which is failing.

asp.net does not support PAE (which is a memory swapping scheme requiring
application support and used mainly for caching), so the max memory it can be
allocated (on a 32bit o/s) is 2gb. *as the process virtual page table (list
of all pages used by a process, with necessary mapping info) goes into user
space, a process can not actually access 2gb of memory. there is other
control stuff in user memory, whoich lead to the max working set size (which
can depend on which serive packs are installed). *your test shows that on
your server configuartion, 1.3 is about the max working set size.

unless you have a lot of app pools (each which can grow to max working set
size), 38 gb is really a waste. you should switch to a 64bit o/s to get any
use of this memory.

-- bruce (sqlwork.com)

"Anand Saha" wrote:
Patrice,
This small experiment is to solve a bigger problem - that with Report
Server 2005.
We have a report which sucks huge amount of data from the database.
And in the process of
producing the report, the Report Server crashes with
OutOfMemoryException. .
Its actually the w3wp which terminates when it reaches 1.3GB, and till
now the mystery is
still unsolved, as to why the number 1.3 ? An immediate reaction would
be that its 60% of the
2 GB that you mentioned, but I made sure that machine.config has 100
in the memoryLimit parameter.
And on further investigation, I found that this has nothing to do with
Report Server, as a small web app
like the one i posted shows the same behavior.
The OS boots with the /PAE flag, and we have 32 GB RAM in the machine.
So its frustrating that
the process uses just 1.3 GB
Anand
--
On Sep 22, 4:43 pm, "Patrice" <http://www.chez.com/scribe/wrote:
AFAIK unless an application is explicitly written to take advantage of it, a
single process can use 2 Gb at best plus you likely need some more memory
during the GC (when it moves something it needs at least the source object
and the copy).
Note that it doesn't mean *all* requests won't use more, it means that
*each* request won't be able to use more memory.
Someone more knowledgable will likely popup but this is my understanding for
now. Also knowing if you are trying to solve something or if this is just to
see how it behaves could perhaps help...
My first thought would be to see if you can go beyond this when issuing
multiple queries at the same time (not sure thought what you are trying to
find out)...
--
Patrice
"Anand Saha" <anands...@gmail.coma écrit dans le message de groupe de
discussion :
c048d8f7-12a3-415d-9928-04f89ac5c...@b30g2000prf.googlegroups.com...
Machine: 32 bit Intel Xeon 2.93 GHz, 16 CPUs, 32 GB RAM
OS: Windows Server 2003 R2 Ent Edition, SP2
Web Server: IIS 6
ASP.NET ver: 2.0
I made a simple ASP.NET application, with only this code in the
Page_Load, to
simulate a condition where huge memory is utilized by the app:
* * int i = 0;
* * * * * *int j = 0;
* * * * * *StringBuilder[] sb = new StringBuilder[3000];
* * * * * *while (i < 3000)
* * * * * *{
* * * * * * * *sb[i] = new StringBuilder(9999999);
* * * * * * * *j = 0;
* * * * * * * *while (j < (9999999))
* * * * * * * *{
* * * * * * * * * *sb[i].Append('a');
* * * * * * * * * *j++;
* * * * * * * *}
* * * * * * * *Console.WriteLine(i.ToString());
* * * * * * * *i++;
* * * * * *}
When I invoke Default.aspx from IE, the w3wp process memory use
increases, goes
till around 1.3 GB, and then the app crashes out with
OutOfMemoryException, w3wp
recycles.
In IIS, the 'Max Used memory' value is set at 4 GB, so is the 'Max
Virtual memory',
both for the App Pool. In Machine.Config, memoryLimit is set at 100%.
I am unable to find out why the app is not going beyond 1.3 GB of
memory usage.
Any pointers will be helpful.
Thanks,
Anand
-- *
Sep 23 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tod Birdsall | last post by:
Hi All, The organization I am working for has created a new corporate website that used Microsoft's Pet Shop website as their coding model, and dynamically served up content, but cached each...
3
by: MattC | last post by:
I have an ASP.NET app that is running at around 60MB for the w3wp.exe. This often jumps very quickly to 100/120 MB before shrinking again. It is also using around 250MB of virtual memory. Is...
3
by: Ricky Chan | last post by:
I am using windows 2003. I have unchecked all options in IIS6 application pool, so I assume no worker process recycling will be performed whether any event occured. what will be happened when...
3
by: James Hunter Ross | last post by:
Friends, We are preparing for Beta release of a new ASP.NET project, but our initial in-house tests are not going well. We have had W3WP.exe (and aspnet_wp.exe) die, and we feel we can monitor...
0
by: Mark A. Ziesemer | last post by:
I've seen a few other postings that looked similar to this, but most appear to have died without any working solutions, and lacked any helpful level of information to see if they might be related. ...
5
by: LRK | last post by:
Earlier this week we set up a second application pool to be able to implement trusted connections between ASP.NET apps and a SQL Server database on a different server. The trusted connection is...
0
by: Rabbit | last post by:
Dear All, I have recently using ASP.net 2.0 to build web application with Crystal Report for .net, one of my typical coding to generate report on web page as follows: Dim rpt As New...
5
by: hihai | last post by:
My site recently became not responsive. When I check the task manager, I saw the file w3wp.exe use a lot of memory. Then I reset the IIS, it runs ok but only for a while then it stops. At first, I...
10
by: =?Utf-8?B?U2Vhbg==?= | last post by:
I have two win2003 sp1 servers running iis 6.0 running the same application. When I connected to the first server a W3WP process (application pool is created) whoose size is approax 14MB When I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.