Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Session issues on multi processor machine

Reply
Thread Tools

Session issues on multi processor machine

 
 
Shiv Kumar
Guest
Posts: n/a
 
      01-13-2004
Is there a known problem or caveat with ASP.NET sessions on a multi-processor machine? Are sesions bound to a CPU or are they application wide?

My machine.config is the default and my web.config file has no session specific entries. On my development machine XP I have no problem but on the production server W2K3/dual proc I have issues.

--
Shiv R. Kumar
http://www.matlus.com
 
Reply With Quote
 
 
 
 
Hermit Dave
Guest
Posts: n/a
 
      01-13-2004
My understanding of asp.net worker process and mutiple processors is that each processor runs its dedicated aspnet worker process. And if you are using default config then you are using InProc sessionState. In this case session variables will be local to each of the worker processes.

I would advise you to look into configuration of sessionState in your web.config.. you can either set it up as a StateServer or can store it in SQL Server.



--
Regards,

HD

"Shiv Kumar" <(E-Mail Removed)> wrote in message news:e9Se%(E-Mail Removed)...
Is there a known problem or caveat with ASP.NET sessions on a multi-processor machine? Are sesions bound to a CPU or are they application wide?

My machine.config is the default and my web.config file has no session specific entries. On my development machine XP I have no problem but on the production server W2K3/dual proc I have issues.

--
Shiv R. Kumar
http://www.matlus.com
 
Reply With Quote
 
 
 
 
Shiv Kumar
Guest
Posts: n/a
 
      01-13-2004
Hermit,

Thanks for your reply.

So it looks like I don't have an option to use the default session state mode (in memory) on a multi-processor machine? If so this goes against the grain doesn't it? I thought the whole idea was about having a choice (which way to go). But it looks like I don't really have a choice. Or did I miss-read your reply.

I'm curious, does anyone else find this to be a problem/limitation?

--
Shiv R. Kumar
http://www.matlus.com
 
Reply With Quote
 
Hermit Dave
Guest
Posts: n/a
 
      01-13-2004
yes the idea is that you have a choice....
check the application pool settings... set the number of worker processes to just one.
have a look at this... this is on Performance Application Pool Settings (for IIS 6.0 win2k3)
http://msdn.microsoft.com/library/de...olsettings.asp

check the processModel on IIS 6.0 win2k3's machine config (to see if its set to a web garden scenario)


check the machine config and your app webconfig...
if you dont have a sessionState Element in your app's web config.. it will use the values from machine.config (not sure what its called in IIS 6.0)

you can just enable one worker process that should start sort out your session issues... but for more information... think we would need to know your app's webconfig <sessionState /> and your machine.config's <sessionState> also the setting for the processModel on your server.

hope this helps...

--

Regards,

HD

PS: If you want to use more than 1 worker processes than you will have to resort to a web garden scenario.. and to make sure data is available to the other worker processes you will have to store in using StateServer or SQLServer
"Shiv Kumar" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
Hermit,

Thanks for your reply.

So it looks like I don't have an option to use the default session state mode (in memory) on a multi-processor machine? If so this goes against the grain doesn't it? I thought the whole idea was about having a choice (which way to go). But it looks like I don't really have a choice. Or did I miss-read your reply.

I'm curious, does anyone else find this to be a problem/limitation?

--
Shiv R. Kumar
http://www.matlus.com
 
Reply With Quote
 
Shiv Kumar
Guest
Posts: n/a
 
      01-13-2004
Hermit,

I had already read that article and a whole host of others. I do have confirmation that sessions are tied to a worker process (As you rightly said), and as a result (if one is to use multiple worker processes for performance reasons) then one has no choice but to avoid using the InProc mode. This is a real shame in my opinion.

Thank you for your replies.

--
Shiv R. Kumar
http://www.matlus.com
 
Reply With Quote
 
Hermit Dave
Guest
Posts: n/a
 
      01-13-2004
inproc is a good thing.. but again... you want to feel the sun from both sides... its a seperate worker process !!!! so you cant be sharing memory.. first that would be a bad design and second you have a security headache...

so if you are using multiple worker processes and would like to continue to use session state then your choices are StateServer and SqlServer...
http://msdn.microsoft.com/library/de...ssionstate.asp

nice article... hope it helps...

--
Regards,

HD

"Shiv Kumar" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
Hermit,

I had already read that article and a whole host of others. I do have confirmation that sessions are tied to a worker process (As you rightly said), and as a result (if one is to use multiple worker processes for performance reasons) then one has no choice but to avoid using the InProc mode. This is a real shame in my opinion.

Thank you for your replies.

--
Shiv R. Kumar
http://www.matlus.com
 
Reply With Quote
 
Shiv Kumar
Guest
Posts: n/a
 
      01-13-2004
Hermit,

Yes I understand the concept or worker process I've been a Windows programmer for 8 years and have been building ISAPI applications for almost as long

I still think there is a feeling of "bad design" somewhere in all of this. To me it's a limitation and besides which one now needs a development machine that is similar to the production machines. That's just my point of view by the way.

That's not to say I don't understand the ASP.NET framework better now

--
Shiv R. Kumar
http://www.matlus.com
 
Reply With Quote
 
Shiv Kumar
Guest
Posts: n/a
 
      01-13-2004
Further, the target machines configuration plays a role since your application may not work because some other application may require multiple worker processes while this one can't use that setting. From my understanding using the worker process model is a machine wide setting.

I can just see issue in the long run between compatibility of applications running on the same box but requiring different configurations either by design or to meet performance requirements etc.

My two cents.
--
Shiv R. Kumar
http://www.matlus.com
 
Reply With Quote
 
Hermit Dave
Guest
Posts: n/a
 
      01-13-2004
true i take your point that target machines config does play an important role... yeah been working ms stuff for a while.. though c++/atl half the time.. and have had my share of dealing with asp/ iis.

in good ol days we only have inetinfo and that did just bout everything.. with i guess ms are going the right way by making sure that if you have a multi proc system and what you would want failover with or without resorting to a web cluster then you make the each process independant.. now all iis does is calling up aspnet isapi to pass the call to aspnet worker process... and since you have multiple process rather than 1 big fat iis... sharing the data can be an issue.. not to forget added issues with marshalling across process boundaries to share the data and protection of data from potential corruption... (reminding me of com days)

i reckon we both can go on and on... it probably would be cheaper to get yourself a multiproc dev server. %>)

--
Regards,

HD

"Shiv Kumar" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
Further, the target machines configuration plays a role since your application may not work because some other application may require multiple worker processes while this one can't use that setting. From my understanding using the worker process model is a machine wide setting.

I can just see issue in the long run between compatibility of applications running on the same box but requiring different configurations either by design or to meet performance requirements etc.

My two cents.
--
Shiv R. Kumar
http://www.matlus.com
 
Reply With Quote
 
Hermit Dave
Guest
Posts: n/a
 
      01-13-2004
and i always had a feeling that people specially from c++ would probably start appreciating .net's beauty after they got used to the constraints imposed by the design... lol
(I did whine and bitch bout it for over 2 years before i could actually do anything... lol used to remind me of java)

--
Regards,

HD

"Hermit Dave" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
true i take your point that target machines config does play an important role... yeah been working ms stuff for a while.. though c++/atl half the time.. and have had my share of dealing with asp/ iis.

in good ol days we only have inetinfo and that did just bout everything.. with i guess ms are going the right way by making sure that if you have a multi proc system and what you would want failover with or without resorting to a web cluster then you make the each process independant.. now all iis does is calling up aspnet isapi to pass the call to aspnet worker process... and since you have multiple process rather than 1 big fat iis... sharing the data can be an issue.. not to forget added issues with marshalling across process boundaries to share the data and protection of data from potential corruption... (reminding me of com days)

i reckon we both can go on and on... it probably would be cheaper to get yourself a multiproc dev server. %>)

--
Regards,

HD

"Shiv Kumar" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
Further, the target machines configuration plays a role since your application may not work because some other application may require multiple worker processes while this one can't use that setting. From my understanding using the worker process model is a machine wide setting.

I can just see issue in the long run between compatibility of applications running on the same box but requiring different configurations either by design or to meet performance requirements etc.

My two cents.
--
Shiv R. Kumar
http://www.matlus.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No speedup on multi-processor machine? danfan1981@yahoo.com Python 15 04-24-2007 03:39 PM
win xp pro sp2 64 bit is a multi processor or a uni processor =?Utf-8?B?dW1lc2g=?= Windows 64bit 4 08-01-2006 05:24 AM
Performance problems with multi-processor machine Anton Berg Java 0 01-16-2006 09:48 PM
multi threading in multi processor (computer) ajikoe@gmail.com Python 38 02-15-2005 05:01 PM
Scaling on multi-processor machine Atul Kshirsagar Python 2 05-23-2004 07:16 PM



Advertisments