473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1441
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**@discussions.microsoft.com> wrote in message
news:59**********************************@microsof t.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**@discussions.microsoft.com> wrote in message
news:59**********************************@microsof t.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
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...
4
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...
4
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
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
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...
6
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
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...
18
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...
11
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...
3
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.