Tuesday, November 24, 2009

Re: CakePHP performance 1.2 - is future any better?

I can only agree with all these suggestions and add a little beauty i
was introduced to recently. X-Sendfile is a great for performance if
you do any file output from php. It offloads all the actual output of
the file to the webserver (nginx, Apache, lighttpd...).

For me, implementing sendfile for all file output was a 10-minute job
and I improved download speed by about 25% when testing to my home-
computer... and the cpu load showed that receiving an email was more
CPU-intenceive than sending a few dvd-image-sized files with nginx. I
believe that is what they like to call "low hanging fruit" in
corporate bullshit (that is a real language you know).

(I did also spend a few minutes finding out that nginx wants paths
relative to a configured folder while the other two main players take
a full system path)

/Martin

On Nov 24, 8:12 am, Crazy <crazy...@gmail.com> wrote:
> Judging by your setup I believe you should start using a profiler, and
> optimize your code a bit or take a better look at why your machines
> perform poorly.
>
> I run a site that has around 250k hits/day and it's on one box
> (Core2Quad 8800 8GB RAM) with the db on the same machine + .
> It runs on average 75% idle. Only thing that puts it under heavy load
> is the cronjobs that are running.
>
> Don't know how far you've optimized everything, like ppl say, use an
> opcode cacher(APC in my experience is the most stable) and do other
> things like gzip, fix your keepalives, use cdn, etags,....
>
> In cake, also don't do any find('all'), always specify the fields you
> need, don't use recursion if you don't have to, cache large sets of
> unchangeable data in memcache.
>
> Use a profiler(I use XDebug), every ms you can optimize will lower the
> load.
>
> From your description it sounds like an inefficient setup or code.
>
> I agree that cakephp isn't the fastest framework around, but it isn't
> that slow!
>
> On Nov 24, 7:37 am, "j0n4s.h4rtm...@googlemail.com"
>
>
>
> <j0n4s.h4rtm...@googlemail.com> wrote:
> > - Clone all of your application files/code (anything besides /app/
> > webroot but including /app/webroot/index.php) to a ram based file
> > system on your *nix host.
> > - Try lazyloader:http://github.com/mcurry/lazy_loader
> > - Never use recursive > -1, make sure containable does not do multiple
> > queries, if it does use complex find queries and joins
> > - Use elements that are being cached, if you use requestAction make
> > sure those are cached too
>
> > On Nov 23, 10:08 pm, Pablo Viojo <pvi...@gmail.com> wrote:
>
> > > Yes, APC and Memcache is a must if you want good performance.
>
> > > Regards,
>
> > > Pablo Viojo
> > > pvi...@gmail.comhttp://pviojo.net
>
> > > ¿Que necesitas?http://needish.com
>
> > > On Mon, Nov 23, 2009 at 5:58 PM, Miles J <mileswjohn...@gmail.com> wrote:
> > > > Haha funny you ask. The mozilla addons site actually runs CakePHP 1.1
> > > > and they recently announced they are switching to Django.
>
> > > > All I can say is use APC for opcode caching and memcache for user
> > > > caching.
>
> > > > On Nov 23, 11:02 am, Balrog <kraus.it...@gmail.com> wrote:
> > > > > Hello!
> > > > > We are running quite growing social network in Poland for students at
> > > > > CakePHP, now 70k users and 0.5M hits a day.
>
> > > > > We have 3 app servers for it with CakePHP 1.2.5 installed on each.
> > > > > Servers are Quad Core i7 920 + 8G RAM, so rather good machines.
>
> > > > > DB on separate box + nginx frontend for static content on other box.
>
> > > > > Load on each machine is now 5+, i see addons.mozilla using CakePHP
> > > > > with far greater traffic than ours
>
> > > > > Have they released info if they have made any significant changes to
> > > > > the Cake core ? It is rather publicly known that Cake seems to be
> > > > > rather poorly comparing to RoR or Django in performance.
>
> > > > > Any good pieces of advice on how to optimize your app (the cake
> > > > > itself, cause app is prettily good written, db also optimized) ?
>
> > > > > Is upcoming 1.3 or 2.0 anyhow faster or less-cpu-using?
>
> > > > > Regards
>
> > > > --
>
> > > > 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+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.c om>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/cake-php?hl=.

--

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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en.

No comments: