IIS 6.0 and memory

IIS 6.0 and memory

am 01.12.2007 08:07:51 von hassan

Would there be memory issues if say the w3wp service is using around 1.2GB
even if the server which has 2GB in total may have some memory left ?

This is an x64 bit windows 2003 server as well. Do 64 bits use more
memory,etc. ?

I am just trying to examine if we may have a memory leak... as our Web
application becomes very sluggish and unresponsive after a while even though
we see some memory available.We fix it for now by resetting IIS.

Dont know if the OS tries to reserve some memory to itself and hence does
not allow IIS to use more..

Re: IIS 6.0 and memory

am 01.12.2007 09:01:18 von David Wang

On Nov 30, 11:07 pm, "Hassan" wrote:
> Would there be memory issues if say the w3wp service is using around 1.2GB
> even if the server which has 2GB in total may have some memory left ?
>
> This is an x64 bit windows 2003 server as well. Do 64 bits use more
> memory,etc. ?
>
> I am just trying to examine if we may have a memory leak... as our Web
> application becomes very sluggish and unresponsive after a while even though
> we see some memory available.We fix it for now by resetting IIS.
>
> Dont know if the OS tries to reserve some memory to itself and hence does
> not allow IIS to use more..


64bit Windows uses a dynamic memory architecture, so what you suspect
is not happening.

In a nutshell, Many things can cause sluggish/unresponsive web
applications -- I broadly categorize them into software and hardware
bottlenecks.

Hardware bottlenecks include:
- CPU utilization
- Network bandwidth saturation
- Hard disk latency/queuing
- Memory utilization and paging to disk

Software bottlenecks include:
- Inefficient algorithms
- Contention over locks, mutexes, semaphores
- Synchronous vs Asynchronous IO

It is not clear to me how you conclude that Memory utilization is the
issue when resetting IIS basically resets the status of all the
bottlenecks I named. All you've concluded is that your application has
one or more of the bottlenecks I named, but no further idea on what
bottleneck is actually the root cause of your issue.

The easiest solution for you would be to configure IIS6 to recycle
your Application Pool every # hours (i.e. something like every 8
hours), which would likely "resolve" your issue and prevent you from
having to reset IIS (which should never be done).


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Re: IIS 6.0 and memory

am 01.12.2007 09:01:38 von Kristofer Gafvert

1.2GB may be perfectly fine.

If you have a memory leak, the application would crash with out-of-memory
exceptions. Have you run DebugDiag as suggested by David earlier? It is
better to get some proof of the problem instead of guessing and trying to
fix something that is not a problem.

--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info


"Hassan" skrev i meddelandet
news:OJuvxj%23MIHA.5040@TK2MSFTNGP04.phx.gbl...
> Would there be memory issues if say the w3wp service is using around 1.2GB
> even if the server which has 2GB in total may have some memory left ?
>
> This is an x64 bit windows 2003 server as well. Do 64 bits use more
> memory,etc. ?
>
> I am just trying to examine if we may have a memory leak... as our Web
> application becomes very sluggish and unresponsive after a while even
> though we see some memory available.We fix it for now by resetting IIS.
>
> Dont know if the OS tries to reserve some memory to itself and hence does
> not allow IIS to use more..
>

Re: IIS 6.0 and memory

am 01.12.2007 20:09:57 von hassan

Have you run debugdiag on x64 machines ? It somehow gave me some messages..
I do not have them captured at this time.

I will continue to investigate..

"Kristofer Gafvert" wrote in message
news:e8cKoB$MIHA.4272@TK2MSFTNGP06.phx.gbl...
> 1.2GB may be perfectly fine.
>
> If you have a memory leak, the application would crash with out-of-memory
> exceptions. Have you run DebugDiag as suggested by David earlier? It is
> better to get some proof of the problem instead of guessing and trying to
> fix something that is not a problem.
>
> --
> Regards,
> Kristofer Gafvert
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> "Hassan" skrev i meddelandet
> news:OJuvxj%23MIHA.5040@TK2MSFTNGP04.phx.gbl...
>> Would there be memory issues if say the w3wp service is using around
>> 1.2GB even if the server which has 2GB in total may have some memory left
>> ?
>>
>> This is an x64 bit windows 2003 server as well. Do 64 bits use more
>> memory,etc. ?
>>
>> I am just trying to examine if we may have a memory leak... as our Web
>> application becomes very sluggish and unresponsive after a while even
>> though we see some memory available.We fix it for now by resetting IIS.
>>
>> Dont know if the OS tries to reserve some memory to itself and hence does
>> not allow IIS to use more..
>>
>

Re: IIS 6.0 and memory

am 01.12.2007 20:15:10 von hassan

David,

I was looking at the properties of the App pool and it has a check on
"recycle worker processes(in minutes)" set to 1740. Does that mean we bounce
the pool every 1740 mins causing the application to be unavailable on this
web server ? I guess i need to know what recycle means ?

Also what is the difference between recyle vs IISreset ?

"David Wang" wrote in message
news:735551aa-60ab-4c79-9698-12b7db14ffbd@i29g2000prf.google groups.com...
> On Nov 30, 11:07 pm, "Hassan" wrote:
>> Would there be memory issues if say the w3wp service is using around
>> 1.2GB
>> even if the server which has 2GB in total may have some memory left ?
>>
>> This is an x64 bit windows 2003 server as well. Do 64 bits use more
>> memory,etc. ?
>>
>> I am just trying to examine if we may have a memory leak... as our Web
>> application becomes very sluggish and unresponsive after a while even
>> though
>> we see some memory available.We fix it for now by resetting IIS.
>>
>> Dont know if the OS tries to reserve some memory to itself and hence does
>> not allow IIS to use more..
>
>
> 64bit Windows uses a dynamic memory architecture, so what you suspect
> is not happening.
>
> In a nutshell, Many things can cause sluggish/unresponsive web
> applications -- I broadly categorize them into software and hardware
> bottlenecks.
>
> Hardware bottlenecks include:
> - CPU utilization
> - Network bandwidth saturation
> - Hard disk latency/queuing
> - Memory utilization and paging to disk
>
> Software bottlenecks include:
> - Inefficient algorithms
> - Contention over locks, mutexes, semaphores
> - Synchronous vs Asynchronous IO
>
> It is not clear to me how you conclude that Memory utilization is the
> issue when resetting IIS basically resets the status of all the
> bottlenecks I named. All you've concluded is that your application has
> one or more of the bottlenecks I named, but no further idea on what
> bottleneck is actually the root cause of your issue.
>
> The easiest solution for you would be to configure IIS6 to recycle
> your Application Pool every # hours (i.e. something like every 8
> hours), which would likely "resolve" your issue and prevent you from
> having to reset IIS (which should never be done).
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //

Re: IIS 6.0 and memory

am 01.12.2007 20:50:59 von Tiago Halm

Hassan,

Recycling an AppPool in IIS6 is starting a new w3wp.exe to handle all new
http requests to the webapps handled by that AppPool. The old w3wp.exe will
no longer accept new requests and will for a time limit continue to process
the http requests already in progress. Its basically harmless to a webapp
client except for the webapps that are cache intensive resulting in a slow
startup and in-proc session dependent.

David has given a quite detailed explanation once on this subject:
http://blogs.msdn.com/david.wang/archive/2006/01/26/Thoughts -on-Application-Pool-Recycling-and-Application-Availability. aspx

Tiago Halm

"Hassan" wrote in message
news:uZMZM6ENIHA.4832@TK2MSFTNGP04.phx.gbl...
> David,
>
> I was looking at the properties of the App pool and it has a check on
> "recycle worker processes(in minutes)" set to 1740. Does that mean we
> bounce the pool every 1740 mins causing the application to be unavailable
> on this web server ? I guess i need to know what recycle means ?
>
> Also what is the difference between recyle vs IISreset ?
>
> "David Wang" wrote in message
> news:735551aa-60ab-4c79-9698-12b7db14ffbd@i29g2000prf.google groups.com...
>> On Nov 30, 11:07 pm, "Hassan" wrote:
>>> Would there be memory issues if say the w3wp service is using around
>>> 1.2GB
>>> even if the server which has 2GB in total may have some memory left ?
>>>
>>> This is an x64 bit windows 2003 server as well. Do 64 bits use more
>>> memory,etc. ?
>>>
>>> I am just trying to examine if we may have a memory leak... as our Web
>>> application becomes very sluggish and unresponsive after a while even
>>> though
>>> we see some memory available.We fix it for now by resetting IIS.
>>>
>>> Dont know if the OS tries to reserve some memory to itself and hence
>>> does
>>> not allow IIS to use more..
>>
>>
>> 64bit Windows uses a dynamic memory architecture, so what you suspect
>> is not happening.
>>
>> In a nutshell, Many things can cause sluggish/unresponsive web
>> applications -- I broadly categorize them into software and hardware
>> bottlenecks.
>>
>> Hardware bottlenecks include:
>> - CPU utilization
>> - Network bandwidth saturation
>> - Hard disk latency/queuing
>> - Memory utilization and paging to disk
>>
>> Software bottlenecks include:
>> - Inefficient algorithms
>> - Contention over locks, mutexes, semaphores
>> - Synchronous vs Asynchronous IO
>>
>> It is not clear to me how you conclude that Memory utilization is the
>> issue when resetting IIS basically resets the status of all the
>> bottlenecks I named. All you've concluded is that your application has
>> one or more of the bottlenecks I named, but no further idea on what
>> bottleneck is actually the root cause of your issue.
>>
>> The easiest solution for you would be to configure IIS6 to recycle
>> your Application Pool every # hours (i.e. something like every 8
>> hours), which would likely "resolve" your issue and prevent you from
>> having to reset IIS (which should never be done).
>>
>>
>> //David
>> http://w3-4u.blogspot.com
>> http://blogs.msdn.com/David.Wang
>> //
>
>

check for contention...

am 03.12.2007 07:14:27 von hassan

David,

How do you check for contention over locks,mutexes,semaphores ?

"David Wang" wrote in message
news:735551aa-60ab-4c79-9698-12b7db14ffbd@i29g2000prf.google groups.com...
> On Nov 30, 11:07 pm, "Hassan" wrote:
>> Would there be memory issues if say the w3wp service is using around
>> 1.2GB
>> even if the server which has 2GB in total may have some memory left ?
>>
>> This is an x64 bit windows 2003 server as well. Do 64 bits use more
>> memory,etc. ?
>>
>> I am just trying to examine if we may have a memory leak... as our Web
>> application becomes very sluggish and unresponsive after a while even
>> though
>> we see some memory available.We fix it for now by resetting IIS.
>>
>> Dont know if the OS tries to reserve some memory to itself and hence does
>> not allow IIS to use more..
>
>
> 64bit Windows uses a dynamic memory architecture, so what you suspect
> is not happening.
>
> In a nutshell, Many things can cause sluggish/unresponsive web
> applications -- I broadly categorize them into software and hardware
> bottlenecks.
>
> Hardware bottlenecks include:
> - CPU utilization
> - Network bandwidth saturation
> - Hard disk latency/queuing
> - Memory utilization and paging to disk
>
> Software bottlenecks include:
> - Inefficient algorithms
> - Contention over locks, mutexes, semaphores
> - Synchronous vs Asynchronous IO
>
> It is not clear to me how you conclude that Memory utilization is the
> issue when resetting IIS basically resets the status of all the
> bottlenecks I named. All you've concluded is that your application has
> one or more of the bottlenecks I named, but no further idea on what
> bottleneck is actually the root cause of your issue.
>
> The easiest solution for you would be to configure IIS6 to recycle
> your Application Pool every # hours (i.e. something like every 8
> hours), which would likely "resolve" your issue and prevent you from
> having to reset IIS (which should never be done).
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //

Re: check for contention...

am 04.12.2007 01:10:38 von David Wang

If you are coming from a sys-admin role, then you should be looking at
queuing in perfmon. The counter depends on the application framework
(ASP, ASP.Net, etc) that you are using.

If you are coming from a developer role, then you should be looking at
stack backtraces during "hangs" or software profiler traces.

How to do either of them is beyond the scope of this newsgroup.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//





On Dec 2, 10:14 pm, "Hassan" wrote:
> David,
>
> How do you check for contention over locks,mutexes,semaphores ?
>
> "David Wang" wrote in message
>
> news:735551aa-60ab-4c79-9698-12b7db14ffbd@i29g2000prf.google groups.com...
>
>
>
> > On Nov 30, 11:07 pm, "Hassan" wrote:
> >> Would there be memory issues if say the w3wp service is using around
> >> 1.2GB
> >> even if the server which has 2GB in total may have some memory left ?
>
> >> This is an x64 bit windows 2003 server as well. Do 64 bits use more
> >> memory,etc. ?
>
> >> I am just trying to examine if we may have a memory leak... as our Web
> >> application becomes very sluggish and unresponsive after a while even
> >> though
> >> we see some memory available.We fix it for now by resetting IIS.
>
> >> Dont know if the OS tries to reserve some memory to itself and hence does
> >> not allow IIS to use more..
>
> > 64bit Windows uses a dynamic memory architecture, so what you suspect
> > is not happening.
>
> > In a nutshell, Many things can cause sluggish/unresponsive web
> > applications -- I broadly categorize them into software and hardware
> > bottlenecks.
>
> > Hardware bottlenecks include:
> > - CPU utilization
> > - Network bandwidth saturation
> > - Hard disk latency/queuing
> > - Memory utilization and paging to disk
>
> > Software bottlenecks include:
> > - Inefficient algorithms
> > - Contention over locks, mutexes, semaphores
> > - Synchronous vs Asynchronous IO
>
> > It is not clear to me how you conclude that Memory utilization is the
> > issue when resetting IIS basically resets the status of all the
> > bottlenecks I named. All you've concluded is that your application has
> > one or more of the bottlenecks I named, but no further idea on what
> > bottleneck is actually the root cause of your issue.
>
> > The easiest solution for you would be to configure IIS6 to recycle
> > your Application Pool every # hours (i.e. something like every 8
> > hours), which would likely "resolve" your issue and prevent you from
> > having to reset IIS (which should never be done).
>
> > //David
> >http://w3-4u.blogspot.com
> >http://blogs.msdn.com/David.Wang
> > //- Hide quoted text -
>
> - Show quoted text -