Title: RE: [KCFusion] session vars

you don't double quote the session variable name in structdelete, structclear, or structinsert. that's most likely your problem. I'd recommend just clicking on the word in cf studio if you have it and hitting f1 and looking at their examples. I don't know why wrox would have it listed like that.

-----Original Message-----
From: Adaryl Wakefield [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 18, 2003 2:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [KCFusion] session vars


Thanks Ryan (and you too Bruce). I'm trained as an analyst not a computer
scientist so the details of memory usage sometimes escapes me. Most of the
questions I ask are generated from my trusty (albeit rather thick and thus
hard to haul around) WROX CF 5 book and they will say stuff like "use
session variables sparingly" with no real detail as to gauge sparingly.
We get a blazing up 5000 visitors a month so I never really worried about my
session vars till now but I'm working on a project that is likely to quantum
jump the site traffic. But it looks like I still have nothing to worry
about.
I have not gotten struct delete or struct clear to work. I keep getting a
"cannot resolve to structure" message. Code looks like
<cfscript>StructClear("session.email");</cfscript>
That's straight from the book and I have no clue how I could screw that up.
I also used Mr. Prices suggestion and no joy there either.
And while I'm in a prattling mood...did everybody know that Friends of Ed
bit the dust along with some other publishers? I saw it in another list I'm
on.
A.

----- Original Message -----
From: "Ryan Hartwich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 18, 2003 1:54 PM
Subject: RE: [KCFusion] session vars


Heck if I know,  I have yet to actually build a website that had any
significant loading on it :-)

You might want to check your server settings (or your setup in the
application.cfm) to see how long the session variables are good for before
they expire.  If its only 20-60 minutes, then how likely is it that you will
have enough loading in 1 hour to cause a problem...Probably slim.  I read a
long time ago somewhere how to calculate variable ram usage, I might be
wrong, but it was something like X number of bytes per letter of a string,
etc.  you could just as easily open up MS SQL, create a fake table with each
variable name you are going to make into a session variable.  Use nChar
instead of Char (n tells it to use unicode, which uses twice the space as a
normal character), etc.  That way your estimates are worst case scenarios.

If you add in a bit more space for the pointers and variable names, you
might get a fair representation for variable size.  For instance, if you
have a string being saved as 20-40 characters, guess 40 characters of nChar,
which takes 80 bytes.  Add in say, 20? for the variable name and its
pointer.  100B.  Say you have 5 of these for a user (500).  Now assume you
have 15 variables with floating point values (4 bytes each I think, say, 16
for the name) 15*20=300.  Add in a few integers, etc.  You are probably at
1K for the user.  Even if we double this to 2K for the user, that means 500
users in 1MB of ram.

Say you have a server with 512mb of RAM, 170 for Windows, 40 for CFMX, 40
for SQL Server = 250.  Leaving 250MB for session variables, coldfusion
caching of queries, pages, source code, database queries, etc.  Lets just
say you have 50MB of memory for session variables, at 500 users per meg,
that is 25 thousand users saving their variables in ram.  I doubt seriously
that most sites will get 25k+ users in <1 hour.    I wouldn't worry about
it.

Sure, I can just hear the more anal of you questioning my very crude
estimates :-), but for the average user, if they aren't saving queries,
large record sets, and complex structures inside of session variables, my
estimate is probably right on track.

Ryan




______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/[EMAIL PROTECTED]
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]




 
 
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/[EMAIL PROTECTED]
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]
 

Reply via email to