473,884 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session Variables Question

Can somebody tell me how many Session variables would be considered
exessive, and when they start really affect the server speed.
For example on 20-30 asp pages I need to use about 200-300 session variables
and 5 arrays by 1000 elements 50 characters long each.
Let say having 300 users using those pages at the same time.
Server is not the fastest one, just CPU 2.40GHz.

So question is as a user am I going to feel a difference in speed between if
I am the only user,
and if all 300 users are online at the same time.

And if using of so many session variables not a good idea, so what's an
alternative?

Regards,
Michael
Sep 10 '06 #1
2 1771

"Michaelk" <mi******@gizmo wireless.comwro te in message
news:Ou******** ******@TK2MSFTN GP03.phx.gbl...
Can somebody tell me how many Session variables would be considered
exessive, and when they start really affect the server speed.
For example on 20-30 asp pages I need to use about 200-300 session
variables
and 5 arrays by 1000 elements 50 characters long each.
Let say having 300 users using those pages at the same time.
Server is not the fastest one, just CPU 2.40GHz.

So question is as a user am I going to feel a difference in speed between
if
I am the only user,
and if all 300 users are online at the same time.
You didn't specify how much memory you have but a conserative estimate would
put the memory requirement at 300MB for the data described

The answer really depends not on how many users you have but how many
requests per second will be processed and how much of this session data is
needed by those requests. A key problem area would be the arrays which need
to be copied into the request execution context and if modified copied back
to the session object. Each represents the copying of 100Kbytes and the
allocation/deallocation 5000 strings.

If you only get one request per second and only a sub-set of the arrays and
other variables are used per request you could probably get away with this.
And if using of so many session variables not a good idea, so what's an
alternative?
An alternative is to use a Database. Store useful groups of values in a set
of tables and of course each array in tables, each table should contain a
key field that links the data to your session. You can then just store a
few highly active session variables in the session object and store in the
session object a key that represents your sessions data in the DB. You will
need some housekeeping to eliminate data from sessions that are no longer
active.

Regards,
Michael


Sep 11 '06 #2
Thanks Antony.
Actually I have all this data in the SQL server right now, and a few session
variables.
Just was thinking if it makes a sense to trade all those database
connections and
browsing recordsets to load the data ones in the session variables and have
it
all handy right here in the session, specially arrays.

Regards,
Michael

"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:OR******** ******@TK2MSFTN GP03.phx.gbl...
>
"Michaelk" <mi******@gizmo wireless.comwro te in message
news:Ou******** ******@TK2MSFTN GP03.phx.gbl...
>Can somebody tell me how many Session variables would be considered
exessive, and when they start really affect the server speed.
For example on 20-30 asp pages I need to use about 200-300 session
variables
>and 5 arrays by 1000 elements 50 characters long each.
Let say having 300 users using those pages at the same time.
Server is not the fastest one, just CPU 2.40GHz.

So question is as a user am I going to feel a difference in speed between
if
>I am the only user,
and if all 300 users are online at the same time.

You didn't specify how much memory you have but a conserative estimate
would
put the memory requirement at 300MB for the data described

The answer really depends not on how many users you have but how many
requests per second will be processed and how much of this session data is
needed by those requests. A key problem area would be the arrays which
need
to be copied into the request execution context and if modified copied
back
to the session object. Each represents the copying of 100Kbytes and the
allocation/deallocation 5000 strings.

If you only get one request per second and only a sub-set of the arrays
and
other variables are used per request you could probably get away with
this.
>And if using of so many session variables not a good idea, so what's an
alternative?

An alternative is to use a Database. Store useful groups of values in a
set
of tables and of course each array in tables, each table should contain a
key field that links the data to your session. You can then just store a
few highly active session variables in the session object and store in the
session object a key that represents your sessions data in the DB. You
will
need some housekeeping to eliminate data from sessions that are no longer
active.

>Regards,
Michael



Sep 11 '06 #3

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

Similar topics

9
2999
by: Xizor | last post by:
Let's say I run a server. I have two people using the server. Bill and Joe. Bill is at address.com/bill and Joe is at address.com/joe. Let's say Joe and Bill are both using PHP with sessions on their web pages. Let's say they both create the session variable $_SESSION. Each uses yo for a different purpose. Now we have a user accessing address.com. He goes to Bill's site and his session his started with the $_SESSION created.
2
5271
by: Brad | last post by:
Hi everyone, I've been using ASP on a few different projects over the past year, either using Javascript or VBScript. During that time, I've made use of session variables, but even then, I've tried to keep those variables to a minimum (which is not always easy). I've also read on many ASP resource sites (such as fuzzysoftware.com, etc) that the use of session variables can be a no-no, while others say that it's perfectly valid to use...
5
2464
by: Abhilash.k.m | last post by:
This is regarding the session management using Out of proc session management(SQL SERVER). Among the samples below which one is better to set the session? 1. There are 20 session variables and all of them are being stored into session and accessed from session and individual session object. Example: Session = "XYZ", Session=100, Session="NAME", etc.
10
3524
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much more time I have on a session? If I do a refresh, does reset the session clock? Do you have have to go to another page to reset the session timeout or will a postback also do it? This is important as we have a few pages that a user
3
2917
by: Alan Wang | last post by:
Hi there, Once my application gets complicated and complicated. I found it's really hard to keep track of Session value I am using in my asp.net application. I am just wondering if anyone have any experience on how to keep track of session value. Any help it's appreciated. Thanks Alan
14
2202
by: Coleen | last post by:
Hi All :-) We have an APSX application using VB.net as the code behind, which uses one or two session variables per page. These Session variables are passed to the final page and calculations and summaries are done there. In order for all of the values to appear on the last page, the user has to view each page that has a session variable to be passed to the last page. The only way I can think of to bypass the necessity of the user...
26
3624
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user opens a new IE window with Ctrl-N or File-New-Window, BOTH WINDOWS SHARE THE SAME SESSION VARIABLES. This cannot be prevented.
2
1468
by: DLN | last post by:
Hello all, I apologize for the naivety of this question, but I'm wondering whether session variables can ever be modified (somehow) by a client without having to go through code that I write. If I read in user input from a web form, sanitize the input to make sure there isn't any injected data, and then store the sanitized input in a session variable, is there any way for that session variable to be modified by the client afterwards? I...
0
9953
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
11167
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
10768
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
9591
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7984
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
7137
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
6009
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4623
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
4231
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.