473,791 Members | 2,901 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session State and performance

Hi,

I was wondering if anyone could give me a good guide as to how much can be
stored in the session state before performance is affected?

The app I'm working on is to be hosted on an intranet with in the region of
500 users (not at all times though) but it's intended to be able to be used
accross a variety of environments with different numbers of users and
different grades of servers. As I have no definite info on what the
capabilities of server's powering it are to be I'd like it if someone could
give me a rough idea of when i should think of using something other than
session state.

The idea is too store a database control class/object in the Session state
for each user so that I don't need to reinitialise the object every time a db
access is needed.
The class will likely have several methods. Is this feasible or would it be
a better idea to just recreate the db access object every time?

Thanks in anticipation.
Jul 21 '05 #1
3 1459
What exactly do you intend to serialize into this database object?

It sounds like you plan to put a connection in there, which won't work.

Using ADO.NET, you get connection pooling, which means that if 10
connections are open to the database, and one app frees their connection,
the next app to call "open" with the same connection settings will get that
connection... a new one does not have to be created. This is all managed
for you.

This makes it fairly easy to manage the connections, because you can pretend
that they are fast to make, and just write your app as though it was opening
the connection directly.

Also, if there is lookup data that you want all users of your app to use,
you can create some singleton objects in the ASP.NET side to hold the data
from the database. That way, only the first user to look up this static
data would pay the price of getting it and storing it in memory for all
other users to use.

HTH,
--- Nick

"lozd" <lo**@discussio ns.microsoft.co m> wrote in message
news:59******** *************** ***********@mic rosoft.com...
Hi,

I was wondering if anyone could give me a good guide as to how much can be stored in the session state before performance is affected?

The app I'm working on is to be hosted on an intranet with in the region of 500 users (not at all times though) but it's intended to be able to be used accross a variety of environments with different numbers of users and
different grades of servers. As I have no definite info on what the
capabilities of server's powering it are to be I'd like it if someone could give me a rough idea of when i should think of using something other than
session state.

The idea is too store a database control class/object in the Session state
for each user so that I don't need to reinitialise the object every time a db access is needed.
The class will likely have several methods. Is this feasible or would it be a better idea to just recreate the db access object every time?

Thanks in anticipation.

Jul 21 '05 #2
Thanks for the quick reply.

You've pretty much hit the nail on the head. I was intending to put the
connection in Session state (along with a few supporting methods for using
it) but from what you've told me it's not necessary.

I do have one other query if you don't mind though just to make sure I've
got your answer clear in my head (Sorry if this is a bit obvious).
If I use the connection objects "Close" method in the app - the actual
connection is still maintained in the connection pool. Is this the situation?

"Nick Malik" wrote:
What exactly do you intend to serialize into this database object?

It sounds like you plan to put a connection in there, which won't work.

Using ADO.NET, you get connection pooling, which means that if 10
connections are open to the database, and one app frees their connection,
the next app to call "open" with the same connection settings will get that
connection... a new one does not have to be created. This is all managed
for you.

This makes it fairly easy to manage the connections, because you can pretend
that they are fast to make, and just write your app as though it was opening
the connection directly.

Also, if there is lookup data that you want all users of your app to use,
you can create some singleton objects in the ASP.NET side to hold the data
from the database. That way, only the first user to look up this static
data would pay the price of getting it and storing it in memory for all
other users to use.

HTH,
--- Nick

"lozd" <lo**@discussio ns.microsoft.co m> wrote in message
news:59******** *************** ***********@mic rosoft.com...
Hi,

I was wondering if anyone could give me a good guide as to how much can

be
stored in the session state before performance is affected?

The app I'm working on is to be hosted on an intranet with in the region

of
500 users (not at all times though) but it's intended to be able to be

used
accross a variety of environments with different numbers of users and
different grades of servers. As I have no definite info on what the
capabilities of server's powering it are to be I'd like it if someone

could
give me a rough idea of when i should think of using something other than
session state.

The idea is too store a database control class/object in the Session state
for each user so that I don't need to reinitialise the object every time a

db
access is needed.
The class will likely have several methods. Is this feasible or would it

be
a better idea to just recreate the db access object every time?

Thanks in anticipation.


Jul 21 '05 #3
If I use the connection objects "Close" method in the app - the actual
connection is still maintained in the connection pool. Is this the situation?

Yes, this is the case.

No need to manage it yourself.

--- Nick
Jul 21 '05 #4

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

Similar topics

3
6042
by: Nhi Lam | last post by:
Hi, I understand that there are 3 modes in which I can configure the SessionStateModule. What I need is an out of process Session State store with fail over support. The "SQL Server Mode" seems to be it, but I heard there is quite a bit of degradation in performance for using this mode. My next option is the "State Server Mode". However, this mode does not give me the fail over support. Is there anything that I can do the enhance the...
4
4007
by: John Q. Smith | last post by:
I'm trying to find out some of the details behind OOP state management with SQL Server. For instance - how long does the session object live on any server? Is it created and destoyed with each page request? - will each reading of a session variable cause a round trip to the DB server? or does the complete session live within the HttpContext object? - when asp.net session state is enabled (in any mode), after a session has been created,...
4
7430
by: Nedu N | last post by:
how to make session not to time out (infinite life time)? if not possible how to increase the time out? for my application its timing out fairly very quick even though i have time out = 99999
8
8425
by: karahan celikel | last post by:
I realized that when SqlServer mode is used for session management Session_End event is not fired in global.asax. What can I do if I want to do something when a user's session end? Thanks
5
2200
by: ASP.Confused | last post by:
As you can tell from my previous posts on this issue...I'm really confused :-/ I have a few ASP.NET web applications on my web host's "https" server. Our web host has a single "bin" folder for me to toss my assemblies into. We keep loosing session state every few months. People have told me that my app could be running out of memory, causing the sessions to get reset. Well, if this is the case, then when I go to the page again,...
6
2013
by: Steven Spits | last post by:
Hi, We're thinking of moving session from inproc to a state server. My question is: should we expect a difference in performance? Is it noticeable? Steven - - -
4
1604
by: tshad | last post by:
I am running with Sql Server and am curious if I should use in-process, State Server, or SQL Server. By default, I assume I am using in-process (I could be wrong here, however). I am not actually defining it in my web.config. I was thinking about moving to Sql Server mode, but am not sure what I would gain or lose by changing. One thing I was curious about, was if this would make it easier to figure
18
3446
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that File-New-Window creates an instance of IE in the same process with the same SessionID as the parent window is in big trouble. This fundamentally restricts the usefullness of using session state management. I probably missed it somewhere - can...
11
7924
by: Joseph Geretz | last post by:
I've been looking at two approaches for the maintenance of Session state for a Web Service application. One approach uses the old familiar Session object which I've used in the past for Web applications. As far as I can see, the Session approach is non-standard since Web Services are supposed to be agnostic with respect to their clients. It seems that cookies are outside the Web Service standard; therefore, such a Web Service application...
3
3462
by: Moe Sisko | last post by:
Using dotnet 2.0 sp1, I've got ASP.NET session state working ok in SQLServer mode, but the sessions never seem to expire. e.g if I add a timeout attribute like so : <sessionState mode="SQLServer" sqlConnectionString="Integrated Security=SSPI;data source=localhost" timeout="1" >
0
9669
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
10207
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...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
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
5430
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
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2913
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.