Re: Using too much memory/cpu/resource

2009-09-21 Thread Jon Bennett

> SQL's are stored in cached files, ill probably give memcache a chance.

Memcached is much more efficient than the file system, so should be a
lot quicker. It didn't require any changes to your SQL cache method,
just a tweak to the Cache config in core (well, mine's in bootstrap as
I have an env('HTTP_HOST') switch statement).

hth

j

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Using too much memory/cpu/resource

2009-09-21 Thread Miles J

SQL's are stored in cached files, ill probably give memcache a chance.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Using too much memory/cpu/resource

2009-09-21 Thread Jon Bennett

> Not tried APC, I did have eAccelerator installed, but it was a bit
> flakey in terms of breaking on OS updates. It certainly made things
> fly though (might give it a another go).

Just re-enabled eaccelerator and pages seem much quicker, not sure
about server load as yet, will post back with results.

j

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Using too much memory/cpu/resource

2009-09-21 Thread Jon Bennett

> Yeah ive optimized all my controllers, models, queries, etc. Applied
> persistent models, cache SQL queries, everything.

How are you caching SQL? file system or Memcached? Memcached rocks.

> I think ill try APC
> next then.

Not tried APC, I did have eAccelerator installed, but it was a bit
flakey in terms of breaking on OS updates. It certainly made things
fly though (might give it a another go).

j

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Using too much memory/cpu/resource

2009-09-20 Thread Miles J

Yeah ive optimized all my controllers, models, queries, etc. Applied
persistent models, cache SQL queries, everything. I think ill try APC
next then.

On Sep 20, 12:32 pm, Alexandru Ciobanu  wrote:
> 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-cak...
>
> 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.shhttp://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
-~--~~~~--~~--~--~---



Re: Using too much memory/cpu/resource

2009-09-20 Thread Alexandru Ciobanu

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
-~--~~~~--~~--~--~---



Re: Using too much memory/cpu/resource

2009-09-20 Thread dogmatic

what are you doing? lots of gfx with gd or big db calls
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---