On 9/20/2009 9:55 PM, Miles J wrote: > On my current host I was on a shared environment and would constantly > get an "internal error" message. After contacting my host they said I > was using way too many resource/memory/cpu on the shared environment. > So I upgraded to a dedicated private server and can now see my usage > graphed. > > On average my CPU uses 100mb, while it does spike up to 200/250mb. > However my memory usage on average is 300-400mb and spikes up to > 600mb, and has even reached 900mb. Its costing me quite a bit of money > to keep running these servers for these resource amounts. > > Anyone have any ideas how to optimize cake? Or fix memory leaks? Or > which caching engine would be a good fit to fix this problem? Etc? > > Matt has a great set of tips just for that: http://www.pseudocoder.com/archives/2009/03/17/8-ways-to-speed-up-cakephp-apps/
He also has a great Lazy Loader plugin for cakephp which I've started to use on all my projects: http://github.com/mcurry/lazy_loader If you still have problems after applying the above you most certainly have to tweak your sql server: queries without indexes, slow queries, etc. This requires a bit of reading, but it's worth it. Fast googleing I've found this bash script which (teoretically) helps you tune your MySQL configuration. (I haven't used it.) http://www.day32.com/MySQL/tuning-primer.sh http://www.day32.com/MySQL/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---