On Tue, 1 Mar 2005 13:00:03 +1100, Andrew Scott <[EMAIL PROTECTED]> wrote:
> Mark,
> 

[snip]

> 
> We have applications that are chewing through too much memory, and I need to
> reduce this quickly and find a solution that will work.
> 
> Here is the problem I have 80 users on this system, and every time they log
> in and logout they are creating another session, multiply the number of
> users by 500k by 100 logins an it starts adding up.
>
> My solution is to start reducing things that don't need to be held in
> memory, but I would like to know how much memory certain variables are
> taking up if this is at all possible.

Cool..hmm.. i guess this is where you need to think about whats needed
in memory, for my mind if any data falls into these two categories,
then yes they belong in session scope - otherwise get em out - imho.

- Temporary data (ie scarts for basic example)
- Common Data (used on nearly every page in/out)

I say this as its a fine balance between saving "expensive calls" to a
Database / XML file then it is to hold stuff in memory that may be
more expensive (simply due to volume). Also keep basic information, a
classic basic example would be a simple shopping cart:

Now you add an item to your basket and there is various metadata that
you need to keep track of about that item mostly snapshot of the items
important information. Most would simply lock that up in a big ol
Struct and unpack it it at checkout.. but in reality once you add it
to a cart? all you really need is some "summary" level variables and a
"key" that refers to the extended information.

This extended information could be stored in:

- XML file (probably not a good idea as it means HDD annoyances)
- Database (typically not that bad.. but could also be expensive)
- Other means ( you could have a compression system in place on the
data or crap like that maybe).

But i think that would get into collections vs entities argument(s)
hehehehehe...

 
> I don't like using session either, as it is very non cluster aware unless
> using sticky sessions. But that defeats the purpose of off loading in a
> cluster in my eyes. But that is another story.
> 
> All I am asking, is there a way to see how much memory a variable is taking
> up.

Nothing but good ol getTicker() heheheh...

> And I am already aware of the SessionEnd and SessionStart of CF7.0, but its
> not what I am asking.

DONT GO THERE.. lol - I'd even say that as until I get CF7.0 i too
have to pretend those damn purty events don't exist...

Andrew it all sounds like your pinning your hopes on Singletons vs
refactoring / revising whats stored in session scope. Once you narrow
that down, how you store the excess is another process unto itself. (
I am assuming you haven't done the first part.. if you have, accept my
apologies).

-- 
Regards,
Scott Barnes
http://www.mossyblog.com

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to