Out of Process State - MSSQL

  • Thread starter Thread starter Chad Crowder
  • Start date Start date
C

Chad Crowder

I've taken a look at this article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp12282000.asp
which someone posted a month or so ago regarding setting up SQL server to
handle state data.

The article references .Net beta, and the file state.sql in the
framwork/1.0x directory, but that file doesn't exist for version 1.1.4322.
I'm wondering if there's a component that I need to install, or if I need to
simply use the state.sql file in the older version directory. Any help, or
points in the right direction, with this is greatly appreciated.

Also, I'm wondering what your impressions of using MS SQL as a state server
is. I've seen alot of articles concerning the concepts of state management,
but I'd love to hear from someone who's actually been using the sql server
state functionality of .net framework. Essentially, I'm interested in
taking my failover cluster web servers to a load-balance cluster, and I'm
thinking that the sql server state management would be better than relying
on cookies.

Thanks!
- Chad Crowder
 
Chad,

For the 1.1 Framework, the file you need is InstallSqlState.sql for Session
state in the Temp database and InstallPersistSqlState.sql for Session state
in the ASPState database. Both of these files are in the v1.1.4322
directory.

SqlServer Session state is going to have considerable overhead from InProc
Session state. While you gain the benefit of maintaining Session state is
the process is restarted, you are going to experience at least a 25%
performance drop from in process Session state. That number can increase
dramatically if you are storing complex objects.

See http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=7504.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.



--------------------
 
Jim,

Thanks for the info and insight. I'd read about the 25% as well, but I was
thinking that I can offset much of this performance decrease by the fact
that I'll be able to distribute the load across multiple web servers in the
server farm.

I'm also interested in whether this 25% reduction in performance is
predicated on the assumption that my coding isn't already database-bound.
For example, I'm already making at least one DB connection per page anyway.

The State Server concept doesn't appeal a great deal to me. It seems that
going that route would create a single fail point (ie, if the state server
goes down, I'm screwed), whereas with SQL Server state, I already have a
redundant SQL Server system. I'm not sure if it's even possible to make a
State Server redundant (ie, run it in some sort of cluster).

Again, thanks for the info and insight.

- Chad


Jim Cheshire said:
Chad,

For the 1.1 Framework, the file you need is InstallSqlState.sql for Session
state in the Temp database and InstallPersistSqlState.sql for Session state
in the ASPState database. Both of these files are in the v1.1.4322
directory.

SqlServer Session state is going to have considerable overhead from InProc
Session state. While you gain the benefit of maintaining Session state is
the process is restarted, you are going to experience at least a 25%
performance drop from in process Session state. That number can increase
dramatically if you are storing complex objects.

See http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=7504.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.



--------------------
From: "Chad Crowder" <chad@spam_me_not.chad>
Subject: Out of Process State - MSSQL
Date: Fri, 2 Apr 2004 13:48:53 -0500
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 12.108.244.117
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:223231
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

I've taken a look at this article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/h
tml/asp12282000.asp
which someone posted a month or so ago regarding setting up SQL server to
handle state data.

The article references .Net beta, and the file state.sql in the
framwork/1.0x directory, but that file doesn't exist for version 1.1.4322.
I'm wondering if there's a component that I need to install, or if I need to
simply use the state.sql file in the older version directory. Any help, or
points in the right direction, with this is greatly appreciated.

Also, I'm wondering what your impressions of using MS SQL as a state server
is. I've seen alot of articles concerning the concepts of state management,
but I'd love to hear from someone who's actually been using the sql server
state functionality of .net framework. Essentially, I'm interested in
taking my failover cluster web servers to a load-balance cluster, and I'm
thinking that the sql server state management would be better than relying
on cookies.

Thanks!
- Chad Crowder
 
Chad,

The fact that you have another connection already open isn't going to
change anything. The connection string will be different. The reason you
suffer from the performance hit with SqlServer Session state is that you
are dealing with an architecture that is much slower than accessing memory
via InProc Session state.

Because State Server is a Windows service, there is no clustering. You can
share Session state between members of a cluster, but you cannot cluster
State Server.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
From: "Chad Crowder" <chad@spam_me_not.chad>
References: <[email protected]>
Subject: Re: Out of Process State - MSSQL
Date: Tue, 6 Apr 2004 08:59:25 -0400
Lines: 103
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 12.108.244.117
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:223901
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Jim,

Thanks for the info and insight. I'd read about the 25% as well, but I was
thinking that I can offset much of this performance decrease by the fact
that I'll be able to distribute the load across multiple web servers in the
server farm.

I'm also interested in whether this 25% reduction in performance is
predicated on the assumption that my coding isn't already database-bound.
For example, I'm already making at least one DB connection per page anyway.

The State Server concept doesn't appeal a great deal to me. It seems that
going that route would create a single fail point (ie, if the state server
goes down, I'm screwed), whereas with SQL Server state, I already have a
redundant SQL Server system. I'm not sure if it's even possible to make a
State Server redundant (ie, run it in some sort of cluster).

Again, thanks for the info and insight.

- Chad


Jim Cheshire said:
Chad,

For the 1.1 Framework, the file you need is InstallSqlState.sql for Session
state in the Temp database and InstallPersistSqlState.sql for Session state
in the ASPState database. Both of these files are in the v1.1.4322
directory.

SqlServer Session state is going to have considerable overhead from InProc
Session state. While you gain the benefit of maintaining Session state is
the process is restarted, you are going to experience at least a 25%
performance drop from in process Session state. That number can increase
dramatically if you are storing complex objects.

See http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=7504.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.



--------------------
From: "Chad Crowder" <chad@spam_me_not.chad>
Subject: Out of Process State - MSSQL
Date: Fri, 2 Apr 2004 13:48:53 -0500
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 12.108.244.117
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:223231
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

I've taken a look at this article

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/ h
tml/asp12282000.asp
which someone posted a month or so ago regarding setting up SQL server to
handle state data.

The article references .Net beta, and the file state.sql in the
framwork/1.0x directory, but that file doesn't exist for version 1.1.4322.
I'm wondering if there's a component that I need to install, or if I
need
to
simply use the state.sql file in the older version directory. Any help, or
points in the right direction, with this is greatly appreciated.

Also, I'm wondering what your impressions of using MS SQL as a state server
is. I've seen alot of articles concerning the concepts of state management,
but I'd love to hear from someone who's actually been using the sql server
state functionality of .net framework. Essentially, I'm interested in
taking my failover cluster web servers to a load-balance cluster, and I'm
thinking that the sql server state management would be better than relying
on cookies.

Thanks!
- Chad Crowder
 
Back
Top