473,847 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using ASP.NET StateServer on another machine. So what?

I understand the benefit of pushing the StateServer process onto
another computer to "balance" the load and take some cpu and memory
usage off the web server, but how much could it possibly help?
Especially when you're talking about marshalling the data back and
forth across your network (although on the same segment)?
Here's my scenario: Each login stores exactly 3 session variables; one
integer and two strings. That's it. Never, ever, is anything else
ever stored in a session. We have a couple hundred users. So what?
I mean, how much could moving the StateServer process to another
computer REALLY help? I tried it but don't notice anything. This
week, I'll be monitoring memory and cpu usage but my initial trials
show nearly no difference at all... might as well use that other PC
for something more useful.
Thoughts?
Nov 18 '05 #1
8 2219
It is useful for a few reasons.

1. When you use InProc the session variables can be lost when the process
gets recycled.
This is the main reason for using StateServer. (Even if it is on the same
local box. You do not need 2nd box just for State Server.)

2. Web Farms can have multiuple boxes all pointed to the same State Server.
This lets you avoid "sticky sessions". Then you can truly load balance the
servers in the farm.

--
Joe Fallon

"GeekBoy" <ge*********@ya hoo.com> wrote in message
news:b0******** *************** ***@posting.goo gle.com...
I understand the benefit of pushing the StateServer process onto
another computer to "balance" the load and take some cpu and memory
usage off the web server, but how much could it possibly help?
Especially when you're talking about marshalling the data back and
forth across your network (although on the same segment)?
Here's my scenario: Each login stores exactly 3 session variables; one
integer and two strings. That's it. Never, ever, is anything else
ever stored in a session. We have a couple hundred users. So what?
I mean, how much could moving the StateServer process to another
computer REALLY help? I tried it but don't notice anything. This
week, I'll be monitoring memory and cpu usage but my initial trials
show nearly no difference at all... might as well use that other PC
for something more useful.
Thoughts?

Nov 18 '05 #2
For those two reasons, I agree completely. However, for one webserver
how much of a difference could it possibly make? I think, if you're
careful with your session variables (I only have three simple types)
then it might even be worse performance including the latency across
your network... so, why bother storing it on another machine? Has
anyone noticed any performance increase by off-loading the state
server to another machine?
"Joe Fallon" <jf******@nospa mtwcny.rr.com> wrote in message news:<uC******* *******@TK2MSFT NGP12.phx.gbl>. ..
It is useful for a few reasons.

1. When you use InProc the session variables can be lost when the process
gets recycled.
This is the main reason for using StateServer. (Even if it is on the same
local box. You do not need 2nd box just for State Server.)

2. Web Farms can have multiuple boxes all pointed to the same State Server.
This lets you avoid "sticky sessions". Then you can truly load balance the
servers in the farm.

--
Joe Fallon

"GeekBoy" <ge*********@ya hoo.com> wrote in message
news:b0******** *************** ***@posting.goo gle.com...
I understand the benefit of pushing the StateServer process onto
another computer to "balance" the load and take some cpu and memory
usage off the web server, but how much could it possibly help?
Especially when you're talking about marshalling the data back and
forth across your network (although on the same segment)?
Here's my scenario: Each login stores exactly 3 session variables; one
integer and two strings. That's it. Never, ever, is anything else
ever stored in a session. We have a couple hundred users. So what?
I mean, how much could moving the StateServer process to another
computer REALLY help? I tried it but don't notice anything. This
week, I'll be monitoring memory and cpu usage but my initial trials
show nearly no difference at all... might as well use that other PC
for something more useful.
Thoughts?

Nov 18 '05 #3
You're right, you'll loose performance. If durablity is not important
to you, I wouldn't bother with a stateServer.
--
Xavier Pacheco
Xapware Technologies Inc

manage your projects: www.xapware.com/ActiveFocus.htm
the blog: www.xavierpacheco.com/xlog
the book: http://www.amazon.com/exec/obidos/AS...vierpacheco-20
Nov 18 '05 #4
You will never get a perfromance increase when moving from InProc to State
Server.
You will always get a decrease.

What you get in trade is increase in stability.
--
Joe Fallon


"GeekBoy" <ge*********@ya hoo.com> wrote in message
news:b0******** *************** ***@posting.goo gle.com...
For those two reasons, I agree completely. However, for one webserver
how much of a difference could it possibly make? I think, if you're
careful with your session variables (I only have three simple types)
then it might even be worse performance including the latency across
your network... so, why bother storing it on another machine? Has
anyone noticed any performance increase by off-loading the state
server to another machine?
"Joe Fallon" <jf******@nospa mtwcny.rr.com> wrote in message
news:<uC******* *******@TK2MSFT NGP12.phx.gbl>. ..
It is useful for a few reasons.

1. When you use InProc the session variables can be lost when the process
gets recycled.
This is the main reason for using StateServer. (Even if it is on the same
local box. You do not need 2nd box just for State Server.)

2. Web Farms can have multiuple boxes all pointed to the same State
Server.
This lets you avoid "sticky sessions". Then you can truly load balance
the
servers in the farm.

--
Joe Fallon

"GeekBoy" <ge*********@ya hoo.com> wrote in message
news:b0******** *************** ***@posting.goo gle.com...
>I understand the benefit of pushing the StateServer process onto
> another computer to "balance" the load and take some cpu and memory
> usage off the web server, but how much could it possibly help?
> Especially when you're talking about marshalling the data back and
> forth across your network (although on the same segment)?
> Here's my scenario: Each login stores exactly 3 session variables; one
> integer and two strings. That's it. Never, ever, is anything else
> ever stored in a session. We have a couple hundred users. So what?
> I mean, how much could moving the StateServer process to another
> computer REALLY help? I tried it but don't notice anything. This
> week, I'll be monitoring memory and cpu usage but my initial trials
> show nearly no difference at all... might as well use that other PC
> for something more useful.
> Thoughts?

Nov 18 '05 #5
I recognize that -- my question was more: What kind of performance
change will you see when you move the State Server off of the web
server onto a different dedicated computer?
So far I notice not much change. There are currently almost 500
active sessions and the computer is basically asleep with 1-2% cpu
utilization and 168MB memory usage. Meanwhile, the web server has
about 478MB memory usage and the CPU usage varies as usual...(both
machines have a gig of memory and two CPUs). I completely turned off
the ASP.NET State Server service on the web server and it freed a bit
of memory but not much. Again, I don't see much change. I'm
wondering why this is good? Now I have TWO computers that could fail
and bring the website down. That's twice the opportunity for failure
than one machine. Is this standard practice? I guess I'll walk
around the company and ask some heavy-load users if they notice
anything different. Users are always eager to complain. By the way
-- what makes the "State Server Sessions Active" counter go down in
perfmon? The "abandoned" counter is at around 650. "Timed out" is at
0. "Active" sessions counter never seems to get smaller.
Thoughts on all this rambling?
"Joe Fallon" <jf******@nospa mtwcny.rr.com> wrote in message news:<uz******* *******@TK2MSFT NGP15.phx.gbl>. ..
You will never get a perfromance increase when moving from InProc to State
Server.
You will always get a decrease.

What you get in trade is increase in stability.
--
Joe Fallon


"GeekBoy" <ge*********@ya hoo.com> wrote in message
news:b0******** *************** ***@posting.goo gle.com...
For those two reasons, I agree completely. However, for one webserver
how much of a difference could it possibly make? I think, if you're
careful with your session variables (I only have three simple types)
then it might even be worse performance including the latency across
your network... so, why bother storing it on another machine? Has
anyone noticed any performance increase by off-loading the state
server to another machine?
"Joe Fallon" <jf******@nospa mtwcny.rr.com> wrote in message
news:<uC******* *******@TK2MSFT NGP12.phx.gbl>. ..
It is useful for a few reasons.

1. When you use InProc the session variables can be lost when the process
gets recycled.
This is the main reason for using StateServer. (Even if it is on the same
local box. You do not need 2nd box just for State Server.)

2. Web Farms can have multiuple boxes all pointed to the same State
Server.
This lets you avoid "sticky sessions". Then you can truly load balance
the
servers in the farm.

--
Joe Fallon

"GeekBoy" <ge*********@ya hoo.com> wrote in message
news:b0******** *************** ***@posting.goo gle.com...
>I understand the benefit of pushing the StateServer process onto
> another computer to "balance" the load and take some cpu and memory
> usage off the web server, but how much could it possibly help?
> Especially when you're talking about marshalling the data back and
> forth across your network (although on the same segment)?
> Here's my scenario: Each login stores exactly 3 session variables; one
> integer and two strings. That's it. Never, ever, is anything else
> ever stored in a session. We have a couple hundred users. So what?
> I mean, how much could moving the StateServer process to another
> computer REALLY help? I tried it but don't notice anything. This
> week, I'll be monitoring memory and cpu usage but my initial trials
> show nearly no difference at all... might as well use that other PC
> for something more useful.
> Thoughts?

Nov 18 '05 #6
Hi GeekBoy:

The answer is always - it depends. The answer depends on how much data
you keep in session, the type of data you keep in session, and how
performant those types are at serializing themselves into session
state, etc. etc.

You have the right approach - you have to test and take benchmarks and
measure. What might not be a noticable impact for you could be a
signifigant performance drop for someone else's application.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 18 Oct 2004 07:34:16 -0700, ge*********@yah oo.com (GeekBoy) wrote:
I recognize that -- my question was more: What kind of performance
change will you see when you move the State Server off of the web
server onto a different dedicated computer?


Nov 18 '05 #7
Thanks for your reply, Scott. Nice blog site by the way.
Anyway, after a full day of keeping a close eye on things, it would
seem as though making this relatively minor change has made a
noticable increase in performance, or at least an increase in
stability whereby the occasional pause while pages postback is gone.
I can't really explain it because the second computer really isn't
taking that much of a load off the first, but for some reason people
notice it, and so do I.
Again, to anyone who cares: I only store three session variables for
each person logged in: their unique logon name, unique ID number, and
a boolean value I need all the time. That's it. I do reference at
least two of these session variables on nearly every single page,
though. I assign their values to local private variables upon
page_load(). Simply moving the state server service to another
machine on the same network segment seems to have added a small
performance gain to the overall website. A small but perceptable
improvement in "snappiness " and no more slight pauses between
postbacks is a big leap in the eyes of users, so I'm happy. I'll keep
a close watch as the days and weeks go by. The state server machines
does seem to be keeping the sessions under control -- the memory, cpu,
and active sessions never gets out of hand.
Oh, and Scott -- I wouldn't hack that big sign-post either if I were
you <wink, wink>. Of course, the movie "L.A. Story" comes to mind...
Scott Allen <bitmask@[nospam].fred.net> wrote in message news:<o1******* *************** **********@4ax. com>...
Hi GeekBoy:

The answer is always - it depends. The answer depends on how much data
you keep in session, the type of data you keep in session, and how
performant those types are at serializing themselves into session
state, etc. etc.

You have the right approach - you have to test and take benchmarks and
measure. What might not be a noticable impact for you could be a
signifigant performance drop for someone else's application.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 18 Oct 2004 07:34:16 -0700, ge*********@yah oo.com (GeekBoy) wrote:
I recognize that -- my question was more: What kind of performance
change will you see when you move the State Server off of the web
server onto a different dedicated computer?

Nov 18 '05 #8
I'm trying hard to avoid it but it sure is tempting!! :)

--
Scott
http://www.OdeToCode.com/blogs/scott/

Oh, and Scott -- I wouldn't hack that big sign-post either if I were
you <wink, wink>. Of course, the movie "L.A. Story" comes to mind...


Nov 18 '05 #9

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

Similar topics

0
1205
by: Victor Marquez | last post by:
Hi All, We have been experiencing problems with StateServer. The service is hanging-up and stops responding further requests. Facts: - There are not events in Application Logs (not 1072/1076 problems).
2
1614
by: MG | last post by:
On my development machine my application works fine but on the deployment server my session variable gets lost after a postback on a webform. By doing a watch on the Session object I can see that the SessionId is changing and the mode is StateServer. (I changed from InProc to StateServer to try to fix the problem but it didn't have any effect. Details: - Win 2k Server/IIS 5.0/.NET Framework 1.1 - I have disabled virus protection.
6
2346
by: tshad | last post by:
I switched my site from InProc to StateServer a while ago which solve a problem I was having dropping my session cookies when the worker process recycles. This has been working well until today. I was looking at some sample code and found that it won't work under StateServer, but will under InProc. The message I get is:
1
5245
by: AV | last post by:
I have a web server in production running IIS 6 (Windows Server 2003 SP1) and hosting multiple virtual websites with each website hosting many ASP.NET applications in virtual directories. Each website is running in it's own worker process and all the application use the out of process ASP.NET State Server running on the same webserver (eg. connecting to 127.0.0.1:42424). Now recently the following errors have been showing up in the...
4
5279
by: archana | last post by:
Hi all, I am new to web services. I am using stateserver to stored data which i set using session. I changed mode in web.config file to StateServer. But didn't change tcipip address. I kept default value as it is. So my question is what this address specifies.127.0.0.1:42424. And can is specify my PC's ip adress instead of this address. IF yes how will i
0
4382
by: Med | last post by:
Hi, My Settings in web.config: <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1; Trusted_Connection=yes" cookieless="false"
2
3393
by: metafedora | last post by:
I am trying to use Session and StateServer to store values to be used by two different Web Applications, which run on the same IIS, in different Virtual Directories. I have StateServer running on another machine (192.168.0.1). I have set the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection to 1. I create two Web Projects in Visual Studio: Redirect and Receive. Redirect has a...
0
1289
by: Bjorn Sagbakken | last post by:
The subject says it all, more or less. With sessionState mode=InProc in web.config this works fine, using this approach in the global.asax: In the session_start event the count up: Application=(int)Application+1; In the session_end event the count down: Application=(int)Application-1;
2
2383
by: =?Utf-8?B?TUNN?= | last post by:
My development machine is running Vista x64. I cannot find the ASP.NET StateServer Service in my list of available Services. Do you know how I can enable this?
0
9887
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
10983
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10648
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7056
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5719
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5911
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4529
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4119
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3164
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.