« Previous Next »

Thread: Each Application Pool has two W3WP processes...

Last post 09-19-2009 9:04 AM by Rovastar. 19 replies.

Average Rating Rate It (5)

RSS

Page 1 of 2 (20 items) 1 2 Next >

Sort Posts:

  • 09-14-2009, 1:05 PM

    • JohnnyW
    • Top 500 Contributor
    • Joined on 10-30-2008, 12:19 PM
    • Posts 21

    Each Application Pool has two W3WP processes...

    Hi there, I hope someone can help explain this. I don't know if it's a problem, but I think it might well be. Thanks for any advice.

    Basically the title of this thread says it all: Each Application Pool on our server (we have two being used) have TWO w3wp.exe processes each. My understanding is that there should only be one. I noticed this problem mainly because I'm trying to use IIS State to monitor one of our processes that is crashing, but now I don't know which one because there's two of them!

    If I run IISAPP I get the following:

    W3WP.exe PID: 2380   AppPoolId: DefaultAppPool
    W3WP.exe PID: 2488   AppPoolId: DefaultAppPool
    W3WP.exe PID: 4076   AppPoolId: Redirects
    W3WP.exe PID: 1912   AppPoolId: Redirects

    We have two App Pools configured in IIS: Redirects and DefaultAppPool.

    I understand that w3wp processes periodically respawn and that sometimes there should be two for each App Pool, but in this instance they don't go. I've been checking their PID while writing this message and they haven't changed either.

    Can anyone help me here?

    Thanks a lot,
    - Johnny

  • 09-14-2009, 1:26 PM In reply to

    Re: Each Application Pool has two W3WP processes...

    Hi,

    Are your application pools configured as a web garden, i.e. are they configured to spawn 2 worker processes ?

    Configuring Web Gardens with IIS 6.0 (IIS 6.0)

    Regards,

     

    Paul Lynch | www.iisadmin.co.uk
  • 09-14-2009, 2:44 PM In reply to

    • JohnnyW
    • Top 500 Contributor
    • Joined on 10-30-2008, 12:19 PM
    • Posts 21

    Re: Each Application Pool has two W3WP processes...

    Aaaaah! Yes, indeed. That's what it was. Thanks so much for pointing me in the right direction.

    Not quite sure how you're supposed to run IIS State to monitor a w3wp process in a web garden situation then... Can you monitor multiple processes? Does it even matter?

    I don't suppose you've got any ideas? :)

  • 09-14-2009, 3:28 PM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,160
    • IIS MVPs

    Re: Each Application Pool has two W3WP processes...

    Do you really need the web garden?

    My understanding is that they are only helpful in very limited and unusual circumstances and if they are not needed may have a negative impact on web site performance.

  • 09-15-2009, 5:14 AM In reply to

    • JohnnyW
    • Top 500 Contributor
    • Joined on 10-30-2008, 12:19 PM
    • Posts 21

    Re: Each Application Pool has two W3WP processes...

    Hmm. Well I've read that they're good for site robustness, which is an important thing for us. Is there a reason that might not necessarily be true? Thanks.

  • 09-15-2009, 7:11 AM In reply to

    • JohnnyW
    • Top 500 Contributor
    • Joined on 10-30-2008, 12:19 PM
    • Posts 21

    Re: Each Application Pool has two W3WP processes...

     Doing a bit more research, here's what William Stanek says in his book "IIS 6.0 Administrator's Pocket Assistant":

    "In worker processing mode, you can also create a Web garden where you con-figure multiple worker processes to handle the workload. Applications configured using this technique are more responsive, more scalable, and less prone to failure. Why? A Hypertext Transfer Protocol (HTTP) listener, called Http.sys, listens for incoming requests and places them in the appropriate application pool request queue. When a request is placed in the queue, an available worker process assigned to the application can take the request and begin processing it. Idle worker processes handle requests in first in, first out (FIFO) order.

    Worker processes can also be started on demand. If there are unallocated worker processes and no current idle worker processes, IIS can start a new worker process to handle the request. In this way, resources aren't allocated until they’re needed, and IIS can handle many more sites than it could if all processeswere allocated on startup."

    He doesn't mention any downsides...?

  • 09-15-2009, 7:41 AM In reply to

    • JohnnyW
    • Top 500 Contributor
    • Joined on 10-30-2008, 12:19 PM
    • Posts 21

    Re: Each Application Pool has two W3WP processes...

    More research indicates that Web Gardens may mess up user Sessions if your server is configured badly (or if you encounter very specific situations).

  • 09-15-2009, 1:33 PM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,160
    • IIS MVPs

    Re: Each Application Pool has two W3WP processes...

    Here's what I would consider to be the authoritative source on the subject (after all, these guys are the ones responsible for the code) ...

    http://blogs.iis.net/chrisad/archive/2006/07/14/1342059.aspx

  • 09-15-2009, 1:54 PM In reply to

    • JohnnyW
    • Top 500 Contributor
    • Joined on 10-30-2008, 12:19 PM
    • Posts 21

    Re: Each Application Pool has two W3WP processes...

    Wow, that's an awesome link, thanks for finding it! I guess the idea that sometimes our database queries might take longer than expected isn't really a good excuse to use a Web Garden is it! :)

    How negatively can they affect performance, do you know?

  • 09-15-2009, 4:48 PM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,160
    • IIS MVPs

    Re: Each Application Pool has two W3WP processes...

  • 09-15-2009, 5:51 PM In reply to

    Re: Each Application Pool has two W3WP processes...

    tomkmvp:

    Here's what I would consider to be the authoritative source on the subject (after all, these guys are the ones responsible for the code) ...

    http://blogs.iis.net/chrisad/archive/2006/07/14/1342059.aspx

     

     

    Although a vehement condemner of those that use web gardens I hadn't seen that link before Tom thanks for that.

    (web gardens rant = on)

    About the link personally I think that this is a problem all of Microsoft's/IIS teams making. The implications are there that make it sound like it will help, it is in the GUI, in the performance section even. Really this should have been a metabase only (none GUI) feature as there are so few times it is used legitimately and it is abused frequently.

    And this is further confused by the published authors on IIS that talk about web gardens. As much as I like Stanek's writing style and in fact the only IIS books I own are from him. I dislike the tone of which he (and others - not singling him out by any means) refer to web gardens as a useful and positive thing. Sounding technical but really not truly understanding the seldom benefits for it.

    I was not surprised the old IIS team of Wang and co had a lot of questions about it as the amount of articles/books/etc referring to gardens in a positive light. I can only think they did not know enough on the subject and had to write something on the subject and it was always going to be positive. Often many of these books don't give any useful performance tuning advice at all (and it doesn't help the more MS line/myth that IIS is tuned by default) and the ones they do like web gardens are just wrong.

    (/web gardens rant = off)

    To answer your question about the downsides of it. Well they are real world ones that most article/authors don't have the same experience of. Like has been stated the Inproc stuff is one.

    The main one is the administration and troubleshooting of the web gardens.

    It can be confusing following multiple wp's of  the same site. You do not know which wp is problematic when you have a problem. You are making life more difficult for no reason and what annoys me is some think it is improving the situation to have these gardens.

    Also there is a small memory (and CPU) overhead when you have an additional wp rather than keeping it in the same one. But these are very small.

    In theory you could overload stuff when you have multiple wp's as the before meaningful safeguards of memory consumption, etc are now not as meaningful as you have multiple processes and you could have a scenerio if you are not careful when you could overload stuff. Where as in normal usage it is not a problem.

    Occasionally it is useful in the real world for testing (but only testing) in the case of a runaway memory wp. When an app/wp fails you give the illusion that others are still working. But this just masks the real issue in hand that the app is problematic and  a poor mans band-aid fix.

    There are no benefits 99.9% of the time apart from certain cases which you are not likely to see.

  • 09-15-2009, 8:37 PM In reply to

    • Worker Bee
    • Not Ranked
    • Joined on 09-14-2009, 5:36 PM
    • DFW, TX - USA
    • Posts 13

    Re: Each Application Pool has two W3WP processes...


    I liked the web garden feature better when it stayed in the machine.config.  I've run into scenario's where it was too easy for an administrator to turn on a web garden during troubleshooting efforts with the GUI.  It become's a long day for that administrator to support that inProc web application after the web garden is turned on - without understanding the impacts in a production environment - when it wasn't developed around and tested for in non-prod.

    Like you said, no session state management. 

    There is also no cache management.  Each new worker process has to manage its own cache.  This could mean each worker process would have to create its own connection to the database to build this cache.  Then, after one gets over the hurdle of the initial cache, what if the cache needs to be cleared?  It's not fun figuring out which worker process had its cache cleared and which ones didn't.  Have fun using web garden's round-robin to hunt down the worker process.

    I've heard of others mention using out-of-process memory cache management systems as a viable alternative. 

    I digress.  [Passes baton to the next person in line]

    Jae "Mac" | MCTS - Windows 2003 Hosting, Configuration and Management
  • 09-16-2009, 10:52 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,160
    • IIS MVPs

    Re: Each Application Pool has two W3WP processes...

    Rovastar:
    And this is further confused by the published authors on IIS that talk about web gardens.

    ... which is a perfect example of why I mostly consider the book writers to be just that, hovering on the surface of the technology looking to make a quick buck.  (although there are some guys "in the trenches' with the rest of us - props to them, Jeff Cochran et al ...)

  • 09-16-2009, 5:14 PM In reply to

    Re: Each Application Pool has two W3WP processes...

    Glad you see that too Tom.

    I haven't check Pro IIS. Although I must admit I have not seen any decent explainations on the subject.

    Are they really going to say there is this feature but realistically you do not use it as it is next to useless?

    Most books I see have little useful stuff on any practical issues like this. How many book actively have constructive criticism about some of the poor choice of defaults in IIS? App recycle time, http keep alives, etc, etc many haven't changed in the last what 10 years or more when obviously websites, technology, etc have changed.

    Maybe I am just too honest..........

     

  • 09-17-2009, 12:13 PM In reply to

    • JohnnyW
    • Top 500 Contributor
    • Joined on 10-30-2008, 12:19 PM
    • Posts 21

    Re: Each Application Pool has two W3WP processes...

    I don't know about that, Minasi is pretty vocal with his complaints about Microsoft in his Windows Server 2003 book -- and that was after MS allowed him to come and use Server 2003 before its official release so he could write his book!

    I think the author should be especially vocal if there's something wrong or shouldn't be used.

    As for Web Gardens, despite all the hoohah in this thread, I've yet to see a definitive list of problems or overhead costs for using one. I think it would be worthwhile if someone dumped their experience somewhere so people could use it for reference.

Page 1 of 2 (20 items) 1 2 Next >
Microsoft Communities