Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Very slow response times with CakePHP
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 36 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
GeneSys  
View profile  
 More options Dec 16 2008, 9:09 am
From: GeneSys <bernhard.bo...@gmail.com>
Date: Tue, 16 Dec 2008 06:09:37 -0800 (PST)
Local: Tues, Dec 16 2008 9:09 am
Subject: Very slow response times with CakePHP
Hey Folks!

So I'm using CakePHP for a couple of months now. The company I am
working at asked me to write a new web portal for them, so I thought,
"Well, Cake could make it!"

After spending some hours the website was (nearly) finished and so I
put it on the webspace the old webpage was at.

I already noticed during development that the site requests took about
3 - 5 secs until the page displayed, but I thought this is due to my
development environment (i just installed the XAMPP from apachefriends
with all default settings), but after uploading the website on the
host it got even worse.

Request times are between 4 to (up to!) 15 secs. Which is really ..
too slow for a business website. I also tried to cache a lot of
database requests so I limited most of the page calls to only 3 or 4
queries. But still load times are as high as they were before.

So there are some facts about my project: It is just a small
project ...
 - Core
   - 1 Model, 1 Controller, some views
 - 5 Plugins: Often containing nothing more than a model and a
controller
 - intended use: about 1000 visitors per month

So i don't have the faintest idea why cakePHP is running that slow?

Probably someone could take a look at the website: http://www.eurolyser.com/v4/
(cakePHP) http://www.eurolyser.com/_new/ (old website, plain PHP and
html) and tell what could be the problem about the high load times?

I don't know which configuration settings to post and due to security
concerns I just don't want to publish the whole cake config or
phpinfo. But if any information is necessary needed please don't
hesitate to ask.

Thank you all in advance guys!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Liebermann, Anja Carolin  
View profile  
 More options Dec 16 2008, 9:36 am
From: "Liebermann, Anja Carolin" <anja.lieberm...@alltours.de>
Date: Tue, 16 Dec 2008 15:36:34 +0100
Local: Tues, Dec 16 2008 9:36 am
Subject: AW: Very slow response times with CakePHP
Hi GeneSys,

Have you indexed your foreign keys in your database properly? For our project that was a real performance boost!
Do you use requestAction a lot? I removed it nearly everywhere by now and have fat models instead.

Anja

-----Ursprüngliche Nachricht-----
Von: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] Im Auftrag von GeneSys
Gesendet: Dienstag, 16. Dezember 2008 15:10
An: CakePHP
Betreff: Very slow response times with CakePHP

Hey Folks!

So I'm using CakePHP for a couple of months now. The company I am working at asked me to write a new web portal for them, so I thought, "Well, Cake could make it!"

After spending some hours the website was (nearly) finished and so I put it on the webspace the old webpage was at.

I already noticed during development that the site requests took about
3 - 5 secs until the page displayed, but I thought this is due to my development environment (i just installed the XAMPP from apachefriends with all default settings), but after uploading the website on the host it got even worse.

Request times are between 4 to (up to!) 15 secs. Which is really ..
too slow for a business website. I also tried to cache a lot of database requests so I limited most of the page calls to only 3 or 4 queries. But still load times are as high as they were before.

So there are some facts about my project: It is just a small project ...
 - Core
   - 1 Model, 1 Controller, some views
 - 5 Plugins: Often containing nothing more than a model and a controller
 - intended use: about 1000 visitors per month

So i don't have the faintest idea why cakePHP is running that slow?

Probably someone could take a look at the website: http://www.eurolyser.com/v4/
(cakePHP) http://www.eurolyser.com/_new/ (old website, plain PHP and
html) and tell what could be the problem about the high load times?

I don't know which configuration settings to post and due to security concerns I just don't want to publish the whole cake config or phpinfo. But if any information is necessary needed please don't hesitate to ask.

Thank you all in advance guys!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pyrite  
View profile  
 More options Dec 16 2008, 10:27 am
From: Pyrite <thelette...@gmail.com>
Date: Tue, 16 Dec 2008 07:27:33 -0800 (PST)
Local: Tues, Dec 16 2008 10:27 am
Subject: Re: Very slow response times with CakePHP
How do you index foreign keys, what does that mean? I am using
Postgresql. An example with MySQL will help too.

On Dec 16, 8:36 am, "Liebermann, Anja Carolin"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GeneSys  
View profile  
 More options Dec 16 2008, 11:11 am
From: GeneSys <bernhard.bo...@gmail.com>
Date: Tue, 16 Dec 2008 08:11:43 -0800 (PST)
Local: Tues, Dec 16 2008 11:11 am
Subject: Re: Very slow response times with CakePHP
Dear Anja,

Thank you for your reply. I checked my database again and added a few
column indexes. Unfortunately that didn't have any impact on the
problem. I suppose the problem is not database related (all queries
summed up just take max. about 100ms on the webhost, and not more than
40ms on my dev-machine). Also I do not use requestAction.

Even after checking the most often called functions they won't use
more than 30ms. I just don't have the faintest idea where the
bottleneck may be :/

Thank you for your help Anja!

Bernhard


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Liebermann, Anja Carolin  
View profile  
 More options Dec 16 2008, 11:18 am
From: "Liebermann, Anja Carolin" <anja.lieberm...@alltours.de>
Date: Tue, 16 Dec 2008 17:18:02 +0100
Local: Tues, Dec 16 2008 11:18 am
Subject: AW: Very slow response times with CakePHP
Hi Pyrite,

When you have an additional index on your foreign keys e.g. foo_id  in your table kikis then your connecting datasets are found much faster.

In Mysql you do it like this:

ALTER TABLE `kikis` ADD INDEX (`foo_id`)

Hope that helps!

Anja

-----Ursprüngliche Nachricht-----
Von: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] Im Auftrag von Pyrite
Gesendet: Dienstag, 16. Dezember 2008 16:28
An: CakePHP
Betreff: Re: Very slow response times with CakePHP

How do you index foreign keys, what does that mean? I am using Postgresql. An example with MySQL will help too.

On Dec 16, 8:36 am, "Liebermann, Anja Carolin"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Olexandr Melnyk  
View profile  
 More options Dec 16 2008, 12:02 pm
From: "Olexandr Melnyk" <omel...@gmail.com>
Date: Tue, 16 Dec 2008 19:02:50 +0200
Local: Tues, Dec 16 2008 12:02 pm
Subject: Re: Very slow response times with CakePHP
For InnoDB tables, adding a foreign key automatically creates an
index, unless you explicitly tell it to use an existing index.

It's easy to end up having duplicate indexes because of this gotcha.

Sincerely yours,
Olexandr Melnyk
http://omelnyk.net/

On Tue, Dec 16, 2008 at 6:18 PM, Liebermann, Anja Carolin


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GeneSys  
View profile  
 More options Dec 16 2008, 12:43 pm
From: GeneSys <bernhard.bo...@gmail.com>
Date: Tue, 16 Dec 2008 09:43:15 -0800 (PST)
Local: Tues, Dec 16 2008 12:43 pm
Subject: Re: Very slow response times with CakePHP
Additional infos after debugging with XDebug ...

So I investigated my application by use of XDebug and WinCacheGrind.
What made me really confusing is that bootstrap.php often takes ~350ms
to process. (comparison to another cake project of mine: 80ms).

In detail it shows me that the App::import Function in configure.php
called from bootstrap.php costs 230ms -- i wonder why?

Would it help someone if I'd loaded up the XDebug Cachegrind File?

Thank you!

Bernhard


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mark_story  
View profile  
 More options Dec 16 2008, 11:57 pm
From: mark_story <mark.st...@gmail.com>
Date: Tue, 16 Dec 2008 20:57:22 -0800 (PST)
Local: Tues, Dec 16 2008 11:57 pm
Subject: Re: Very slow response times with CakePHP
Are the tmp folders world writable? is debug off? Is it on a taxed
server? Is the slowdown in the queries?

-Mark

On Dec 16, 9:09 am, GeneSys <bernhard.bo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GeneSys  
View profile  
 More options Dec 17 2008, 5:34 am
From: GeneSys <bernhard.bo...@gmail.com>
Date: Wed, 17 Dec 2008 02:34:48 -0800 (PST)
Local: Wed, Dec 17 2008 5:34 am
Subject: Re: Very slow response times with CakePHP
Hi Mark,

 - Yes, tmp folders are world writable
 - Debug is set to 0
 - No, the slowdown is not a query problem

I'm not quite sure what you do mean by 'taxed server'  => It is hosted
on a shared host.
What just makes me curious about is that the plain php website is
running quite fast and cakePHP is often more than 300% slower (e.g. =>
plain php site: 1.5 secs, cakephp: 5 - 6 secs)

A blank cakePHP Project (no controllers, no models, just the plain
framework) runs in about 1 sec -- so I'm not really convinced that it
is cake alone that makes the app so slow.

What I will do next is to add a blank controller and profile the
scripts by use of XDebug. Maybe I'm getting to the root of all evil
that way ;)

Thanks for your ideas Mark!

Bernhard

On Dec 17, 5:57 am, mark_story <mark.st...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Federico Botti  
View profile  
 More options Dec 17 2008, 5:45 am
From: Federico Botti <fbo...@gmail.com>
Date: Wed, 17 Dec 2008 02:45:10 -0800 (PST)
Local: Wed, Dec 17 2008 5:45 am
Subject: Re: Very slow response times with CakePHP
Hi Bernhard (GeneSys),
                   I found a really interesting stuff about cakePHP
performance tuning. If you read the post you would see that it´s
mentioned something about $html->link is slowing down the scripts. If
you are about to profiling your scripts maybe you could test that in
order to report it as a bug.
                  By the way, which version exactly are you working
with?

Hope that helps!

Federico

On Dec 17, 5:34 am, GeneSys <bernhard.bo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dérico Filho  
View profile  
 More options Dec 17 2008, 7:36 am
From: Dérico Filho <uldericofi...@gmail.com>
Date: Wed, 17 Dec 2008 04:36:45 -0800 (PST)
Local: Wed, Dec 17 2008 7:36 am
Subject: Re: Very slow response times with CakePHP
I opened your website at firebug...

It took 3s to load /v4/...

You said you're using XDebug to profile your application... is XDebug
ever turned on?

Debugging tools may slow down a bit your application... wouldn't you
say?

On Dec 16, 9:09 am, GeneSys <bernhard.bo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dérico Filho  
View profile  
 More options Dec 17 2008, 7:38 am
From: Dérico Filho <uldericofi...@gmail.com>
Date: Wed, 17 Dec 2008 04:38:46 -0800 (PST)
Local: Wed, Dec 17 2008 7:38 am
Subject: Re: Very slow response times with CakePHP
another just that just came up to my mind how are you dealing with the
l10n thing?

How did you structure the router.php? I mean... It could be a point of
failure...

On Dec 16, 9:09 am, GeneSys <bernhard.bo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dérico Filho  
View profile  
 More options Dec 17 2008, 7:42 am
From: Dérico Filho <uldericofi...@gmail.com>
Date: Wed, 17 Dec 2008 04:42:32 -0800 (PST)
Local: Wed, Dec 17 2008 7:42 am
Subject: Re: Very slow response times with CakePHP
Hey! it's me again... :-)

Date: Wed, 17 Dec 2008 12:39:41 GMT
Server: Apache/2.0.59 (Unix)
X-CMS: www.genesys-network.com

What is this X-CMS header? Are you running some sort of CMS in the
same host?
Perhaps there could be some sort of conflict of this CMS and the
CakePHP...

On Dec 16, 9:09 am, GeneSys <bernhard.bo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mark_story  
View profile  
 More options Dec 17 2008, 9:43 am
From: mark_story <mark.st...@gmail.com>
Date: Wed, 17 Dec 2008 06:43:13 -0800 (PST)
Local: Wed, Dec 17 2008 9:43 am
Subject: Re: Very slow response times with CakePHP
By taxed server I meant a heavily loaded server. Sometimes on shared
servers your processes are limited and database response times can be
slow.  If you are getting really slow load on entirely static pages
that could point to something else though.  Perhaps limitations in
processing power or slow disks.

-Mark

On Dec 17, 5:34 am, GeneSys <bernhard.bo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GeneSys  
View profile  
 More options Dec 17 2008, 9:45 am
From: GeneSys <bernhard.bo...@gmail.com>
Date: Wed, 17 Dec 2008 06:45:20 -0800 (PST)
Local: Wed, Dec 17 2008 9:45 am
Subject: Re: Very slow response times with CakePHP
Dear Dérico,

This is in my router.php ...

        Router::connect('/', array('controller' => 'contents', 'action' =>
'home'));
        Router::connect('/pages/*', array('controller' => 'pages', 'action'
=> 'display'));
        Router::connect(
                '/:language/',
                array('controller' => 'contents', 'action' => 'home'),
                array('language' => 'de|en')
        );
        Router::connect(
                '/:language/:controller/:action/*',
                array(),
                array('language' => 'de|en')
        );

The X-CMS header is just a header I send every time a page is served
-- so no (other) CMS is running in background or some sort of thing --
CakePHP is the CMS ;) ..

I use XDebug only on my local development-machine -- online
(eurolyser.com) there is no debugger installed (just good old PHP5
with Zend Optimizer)

The L10n is done in my AppController ...

switch($selected_language)
{
        case 'de':  Configure::write('Config.language','deu');
                        break;
        default:
        case 'en':  Configure::write('Config.language','eng');
                        break;

}

every localized output is then done with __() -- anything that seems
to slow down the performance considerable?

Thank you for your ideas Dérico!

@Federico

Oh my gosh ... $html->link is slowing down the scripts? I use that
nearly everywhere on my pages (I extended the class so it changes the
language of the links automatically) -- but do you really think that
may be the problem? I used $html->link() on earlier projects without
having any problems -- but i will check that, thanks for the
Information!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GeneSys  
View profile  
 More options Dec 17 2008, 9:54 am
From: GeneSys <bernhard.bo...@gmail.com>
Date: Wed, 17 Dec 2008 06:54:09 -0800 (PST)
Local: Wed, Dec 17 2008 9:54 am
Subject: Re: Very slow response times with CakePHP
I forgot to mention ...

I used CakePHP 1.2 RC1 and RC3 => Seems to make no difference
according to the response times.
At the Moment I use 1.2 RC1 -- is RC3 the better choice? (I haven't
tested the website with RC3 enough so I kept RC1 running)

Thanks for all,

Bernhard


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Westin  
View profile  
 More options Dec 17 2008, 10:58 am
From: Martin Westin <martin.westin...@gmail.com>
Date: Wed, 17 Dec 2008 07:58:15 -0800 (PST)
Local: Wed, Dec 17 2008 10:58 am
Subject: Re: Very slow response times with CakePHP
Hi Bernhard,
I am sorry, I have no straight answer for what is slowing your site
down and can only offer suggestions of where to keep investigating.

I think you were on to something a few posts back when you stated that
XDebug reported your botstrap slow and more specifically App::import
(). In your shoes I would keep profiling to see where time is lost. If
you are lucky you will find something specific.

Since you can't install debugging on the production server I would do
it the "bad old way":
Manually put timers on anything you can in a clean CakePHP (to start
with). If you time the index.php, bootstrap, app_controller and a few
other things you can think of you have a "baseline". If you then do
the same for your app you can begin to see where time is lost.

One thing to check that I have noticed as a great bottleneck in my
code is data manipulation. Your SQL was not exactly slow but 100ms of
SQL can result in a few thousand rows of data that can bring php to
its knees when Cake tries to arrange the data into arrays for you.
Your portal does not look like it contains 10'000 articles at the
moment but take a look at the returned counts in the SQL debug.
Anything above 500 rows should be looked at to see if the data slows
down rendering or some manipulation (Set::extract(), afterFind()...).

Also in your last post you mention RC1. This version is supposed to be
quite a bit slower than RC3, but 5 sec sound way too slow.

Sorry for only offering more suggestions of random things to check.
/Martin

On Dec 16, 6:43 pm, GeneSys <bernhard.bo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GeneSys  
View profile  
 More options Dec 17 2008, 6:53 pm
From: GeneSys <bernhard.bo...@gmail.com>
Date: Wed, 17 Dec 2008 15:53:28 -0800 (PST)
Local: Wed, Dec 17 2008 6:53 pm
Subject: Re: Very slow response times with CakePHP
Hallo Martin,

Thank you for your constructive input! SQL seems not to be the
problem, because pages that don't require any SQL query run as slow as
pages that require some. (Also the amount of affected rows is often
not more than just a couple of)

Following your advice I did 'benchmark' the application and found out
a really 'strange' thing ...

In /cake/libs/configure.php on line 929 there is the following code-
line ...(called during bootstrap)

// Measurement point added by me ... [folder_before]
$directories = $Folder->tree($path, false, 'dir');
// Measurement point added by me ... [folder_after]

At the last iteration it takes up about 1.5 - 2 seconds in average to
parse(!) (which is approximately 50%-60% of the whole processing
time!!) (all iterations before take up only about 10ms) (the complete
processing time was about 3.2 seconds)
The $path variable helds the value of CAKE_CORE_INCLUDE_PATH/cake in
the last iteration

    [folder_before] => 1229554489.78
    [folder_after ([...]/_cake1.2rc3/cake)] => 1229554491.24

On my webhost PHP Safe mode is activated. Could this cause any issues
on folder access times? Maybe one who is more familiar with the core
of the framework could tell why the LAST iteration (containing the
path to /CAKE_CORE_INCLUDE_PATH/cake) takes up that long?

So I think if that issue could be resolved processing times would
decrease to about 1 - 2 seconds which would be as nearly as fast as
the (old) plain PHP site.

Thank you all for helping me with that issue :)

Bernhard


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dérico Filho  
View profile  
 More options Dec 18 2008, 8:09 am
From: Dérico Filho <uldericofi...@gmail.com>
Date: Thu, 18 Dec 2008 05:09:17 -0800 (PST)
Local: Thurs, Dec 18 2008 8:09 am
Subject: Re: Very slow response times with CakePHP
Well....

It seems something for _Nate_ to take a look... :-)

Perhaps there's something to do with PHP Safe mode ou some sort of
hardened PHP plugin which controls and avoids recursion.

This Folder->dir method uses recursion to create the file tree
structure for CakePHP internals. One last check you could do is to run
this software with debug 0 on some other PHP server, but a known Safe-
mode-free server. This would be the final check.

If it works just fine in the other server, then you've found a bug
likely.

Are you able to do such a test?

Thanks,
Dérico Filho

On Dec 17, 9:53 pm, GeneSys <bernhard.bo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kappa  
View profile  
 More options Dec 18 2008, 9:09 am
From: Kappa <andrea.cappalu...@gmail.com>
Date: Thu, 18 Dec 2008 06:09:53 -0800 (PST)
Local: Thurs, Dec 18 2008 9:09 am
Subject: Re: Very slow response times with CakePHP
So, i've been experiencing some time problem too on a cakephp based
portal.
I have seen that with debug setted to 0 the speed increases a few..
but
it's still to slow..
I also enabled caching on each requestAction (1 day) but nothing
changed;
the overall database time is quite small (40msec) but the whole page
loading
takes about 500msec on my own MacBook Pro .. but 4-5 seconds on the
server
that hosts the site ..with 1 connection only.

No i'll try to put timers everywhere.. and will see what's happening.

I hope to have some explaination from one of the cake guys.

bye,
  Andrea

On Dec 18, 2:09 pm, Dérico Filho <uldericofi...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jon Bennett  
View profile  
 More options Dec 18 2008, 9:30 am
From: "Jon Bennett" <jmbenn...@gmail.com>
Date: Thu, 18 Dec 2008 14:30:41 +0000
Local: Thurs, Dec 18 2008 9:30 am
Subject: Re: Very slow response times with CakePHP
Hi Kappa,

>  I also enabled caching on each requestAction (1 day) but nothing
>  changed;

are you sure the cache's are being written? look in /tmp/cache/views
for $this->element caches, and /tmp/cache/models for things written in
the model with Cache::write

>  the overall database time is quite small (40msec) but the whole page
>  loading
>  takes about 500msec on my own MacBook Pro .. but 4-5 seconds on the
>  server
>  that hosts the site ..with 1 connection only.

A MBP doing nothing else is a pretty beefy server, so to give a better
idea of the comparison, what hardware are you deploying on? Can you
increase the memory allocated to php via php.ini or .htaccess? Most of
my projects have a 64mb+ limit set.

hth

jon

--

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kappa  
View profile  
 More options Dec 19 2008, 2:13 am
From: Kappa <andrea.cappalu...@gmail.com>
Date: Thu, 18 Dec 2008 23:13:54 -0800 (PST)
Local: Fri, Dec 19 2008 2:13 am
Subject: Re: Very slow response times with CakePHP
Hi Jon
i didn't checked if cache is actually being written..
if it doesn't happens what could be the problem?

As far as the deployment, i know that a MBP doing nothing else is
a perfect server.. but in my opinion its 500 ms are still too much.
I have switched to cakephp after almost 1 year passed on building/
extending
my own framework, because i found it very easy and well done
mine had many design problems a probably many efficiency problems..
but it only used to take 150 ms on the same MBP ..70% off of the time
cakephp takes..

Anyway the html->link fact is worrying me, maybe i should convert all
those calls to direct URLs ..or at least do not use the array Url
format
('controller'=>'posts','action'=>'view',34) but /posts/view/34 .

thanks,
   Andrea

On Dec 18, 3:30 pm, "Jon Bennett" <jmbenn...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
AD7six  
View profile  
 More options Dec 19 2008, 4:11 am
From: AD7six <andydawso...@gmail.com>
Date: Fri, 19 Dec 2008 01:11:00 -0800 (PST)
Subject: Re: Very slow response times with CakePHP

On Dec 19, 8:13 am, Kappa <andrea.cappalu...@gmail.com> wrote:

Where is this 'fact'? 1/2s in production mode I also consider too
slow ;)

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Flipflops  
View profile  
 More options Dec 19 2008, 5:19 am
From: Flipflops <johnsv...@googlemail.com>
Date: Fri, 19 Dec 2008 02:19:41 -0800 (PST)
Local: Fri, Dec 19 2008 5:19 am
Subject: Re: Very slow response times with CakePHP
Hi Bernhard

The 1.5 - 2 seconds seems really wierd - maybe something to with the
file system on the server ( - particularly with safe mode enabled?)
For example I think Dreamhost have their shared servers on NFS - and
vaguely remember something about a cache plugin for wordpress that
even said that you shouldn't use it on NFS as it would actually slow
things down. (sorry can't remember the details)

On Dec 17, 11:53 pm, GeneSys <bernhard.bo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GeneSys  
View profile  
 More options Dec 22 2008, 8:38 am
From: GeneSys <bernhard.bo...@gmail.com>
Date: Mon, 22 Dec 2008 05:38:15 -0800 (PST)
Local: Mon, Dec 22 2008 8:38 am
Subject: Re: Very slow response times with CakePHP
Hi,

Thanks to everyone who has helped in this issue so far.
So this issue got me a bit restless ;) Did some testing on my
development server and on the 'production' machine.

Cake Framework used: RC3

On my development server I figured out the following behavior ...

* When calling a page the folder structure (for the cake framework) in
the bootstrap part gets read. The last iteration costs huge more time
than any other iteration (time varies between ~5ms up to ~200ms per
iteration, last iteration takes ~2000ms) --- when in debug 0 mode, the
folder structure seems to get cached when refreshing the page often.
(Anyone outside who knows how to control how long _that_ cache is
valid, or how to control how to enable that caching feature?)
* Complete bootstrap takes about 3000ms (2800ms are "wasted" by the
step I described before)
* The main application (measurement points before and after the
dispatcher) costs about 800ms

Summarization: A page request costs nearly 4 secs without the
directory tree cached and < 1 sec when cached.
System: Dell Inspiron 1720, OS: Windows Vista, CPU: T7300 (2.00GHz),
RAM: 2GB; XAMPP 1.6.7 beta1 (Apache: 2.2.9 / PHP: 5.2.6 / mySQL:
5.0.51b); (running local)
Remarks: PHP safe mode is not enabled

On my production server occures the following behavior ...

* First step: Same behavior as on the development server but times
vary by ~2ms up to ~250ms per iteration, last iterations takes
~2500ms. When in debug mode 0 folder structure won't get cached (am I
doing anything wrong here? On the development server (using same
configuration) caching works? (FYI: Yes, tmp folder is world-writeable
and "models"/"persistent" subfolders exist))
* Complete bootstrap costs ~3500ms, ~3200ms are used for the directory
tree iterations.
* Main application costs ~600ms.

Summarization: A page request costs also about 4 secs, but the
directory tree won't get cached. (This would increase performance
dramatically I guess ;))
System: Hardware facts unknown (as are the stats how many hosts are
shared on the same server). Webserver is: Apache 2.0.59, PHP: 5.2.5.
OS: Linux compatible (distro unknown)
Remarks: PHP safe mode is enabled

I hope I'll have some time the next few days and try to upload the
application on a dedicated server where I can repeat those tests for
comparison with my dev and my (current) production environment.

So I'm not quite sure if it's PHPs safe mode which decreases cakes
performance so signifcantly or if there's any other issue that is
involved in there. Caching the folder structure in production mode
(debug 0) would improve the performance (by not loosing any RAD
philosophy by cake) a lot  -- any ideas how to accomplish this (a
solution within using the tools cake provides would fit best I think)?

Thanks to everyone!

Best whishes,

Bernhard


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 36   Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google