> If you've cached everything possible it might just be that your application > doesn't have enough data to use that much RAM. You might consider setting > aside some of it as a RAM disk, but I'm not sure how well mySQL could use > this. > > The idea would be to load your database (or the most used tables) into the > RAM disk on system boot (if it's small enough). I'm not sure how to do this > in mySQL (if it's possible at all). But if you could you'd eliminate disk > access for your client variables). > > This might improve performance but would create a risk: should the machine > go down you'd lose anything in the RAM disk. You should then create task or > process (if mySQL doesn't do it automatically) to periodically back up the > tables to physical disk. > > As long as CF's template cache is large enough to cache all templates in RAM > then there's not much you can do for CF using a RAM disk.
The significant portion of the load due to client variable access isn't disk access; it's all the work done by ColdFusion when it asks for them and when it parses and instantiates them once they're received. Loading into a RAM disk won't make that much difference at all, and will most likely make performance suffer even more because of what you're doing with memory. Remember that memory isn't unlimited. If you look at the metrics resulting from what you're suggesting while the system is under a significant load then you'll see physical memory getting unnecessarily squeezed during peaks and lots of access going to virtual memory (the page file on disk), which destroys performance. You might even find that much of your normal database access starts going to virtual memory as well. > > 3. Could the use of database client variables be causing peak hour > > sluggishness? I've always wondered what sort of performance hit using > > database client variables has under load. Would I get a noticable > > improvement switching to cookie client variables? > > How much information do you store in the client scope? If it's small enough > to be kept in a cookie then go for it. > > It's a simple change and you should see an immediate boost concerning DB > usage and availability. I can't believe how many times I hear this blanket statement without qualifications or warnings attached. Before you go plunking your client variables into a cookie, take a long and hard look at each and every assignment in your code base and ask yourself, "Would I publish this piece of information on a billboard in Times Square?" If the answer is "No" for even one client variable in the lot, you can't use cookies to store your client variables. Some people emulate Session variables using Client variables combined with timeout techniques when they can't use Session variables at all (we've done this), and in cases like this passwords, userIDs, permissions, and other private data is stored in the Client scope. You don't just throw that into cookies. The database-stored client variables are one of your biggest burdens to performance. Sometimes you have no choice, but if you can, reengineer them out of your application entirely. Respectfully, Adam Phillip Churvis Member of Team Macromedia http://www.ProductivityEnhancement.com Download Plum and other cool development tools, and get advanced intensive Master-level training: * C# & ASP.NET for ColdFusion Developers * ColdFusion MX Master Class * Advanced Development with CFMX and SQL Server 2000 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205958 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54