Hopefully this is something simple. I have a fresh copy of the 1.1 and
1.2 frameworks running side by side on a Media Temple grid server. I
haven't built any pages yet, it's just the basic cakePHP greeting
page. If I let the server stand idle for 15 minutes, when I hit the
1.1 page it takes between 1 and 2 seconds to build the page. Then,
when I hit the page again, it takes just a few hundreths of a
millisecond. Awesome.
Then, when I go to the 1.2 version, my initial request takes anywhere
from 5 to 20 seconds to build the page! Page renders after that are
faster, but just in the tenths of seconds, so approximately 10 times
slower than the 1.1 version.
I've tried the 1.2 framework on two different Media Temple grid server
profiles, getting the same results.
I've also set up the 1.2 framework on a server that I maintain, and
find that it's really fast, giving me performance as good or better
then the 1.1 framework. So I must have some configuration issue on the
grid server, does anybody have any ideas?
Please note that I copied up fresh copies of the frameworks, all of
the tmp directories are there and writable.
Hi Mark,
You are hardly using the more ideas page to test speed with.
That page does a bunch of checks on your installation. I don't know
all they check but I would be surprised if they were identical.
Comparing the two versions would require you to create some kind of
application with identical (or close) functionality. There are already
such mini-applications and comparisons (often Cake vs other
frameworks) but they are all controversial.
One of them is this guy called Paul, his latest, and last, test was
run using rc2 and rc3 is a great deal faster:
http://paul-m-jones.com/?p=315
He also writes a bunch of useful stuff if you want to learn about the
details of a good test. I would not worry though. In my experience,
the biggest improvements in performance you are likely to get is from
optimizing your own code. That's where I find the real bottlenecks :)
/Martin
On Oct 23, 12:54 pm, Mark <mark.b...@gmail.com> wrote:
> Hopefully this is something simple. I have a fresh copy of the 1.1 and
> 1.2 frameworks running side by side on a Media Temple grid server. I
> haven't built any pages yet, it's just the basic cakePHP greeting
> page. If I let the server stand idle for 15 minutes, when I hit the
> 1.1 page it takes between 1 and 2 seconds to build the page. Then,
> when I hit the page again, it takes just a few hundreths of a
> millisecond. Awesome.
> Then, when I go to the 1.2 version, my initial request takes anywhere
> from 5 to 20 seconds to build the page! Page renders after that are
> faster, but just in the tenths of seconds, so approximately 10 times
> slower than the 1.1 version.
> I've tried the 1.2 framework on two different Media Temple grid server
> profiles, getting the same results.
> I've also set up the 1.2 framework on a server that I maintain, and
> find that it's really fast, giving me performance as good or better
> then the 1.1 framework. So I must have some configuration issue on the
> grid server, does anybody have any ideas?
> Please note that I copied up fresh copies of the frameworks, all of
> the tmp directories are there and writable.
I agree, it's usually my code that's the problem! Even here, I'm sure
that there's just some configuration that needs to be updated on the
server.
But, I think we can agree that the welcome page taking 20 seconds to
first render is not normal.
I spent yesterday putting break points in the 1.2 framework, halting
the execution before dispatch.php was invoked. Just getting the
framework off the ground takes all the time I mention below, 5 - 20
seconds on a first call, and tenths of a second thereafter.
<martin.westin...@gmail.com> wrote:
> Hi Mark,
> You are hardly using the more ideas page to test speed with.
> That page does a bunch of checks on your installation. I don't know
> all they check but I would be surprised if they were identical.
> Comparing the two versions would require you to create some kind of
> application with identical (or close) functionality. There are already
> such mini-applications and comparisons (often Cake vs other
> frameworks) but they are all controversial.
> One of them is this guy called Paul, his latest, and last, test was
> run using rc2 and rc3 is a great deal faster:http://paul-m-jones.com/?p=315
> He also writes a bunch of useful stuff if you want to learn about the
> details of a good test. I would not worry though. In my experience,
> the biggest improvements in performance you are likely to get is from
> optimizing your own code. That's where I find the real bottlenecks :)
> /Martin
> On Oct 23, 12:54 pm, Mark <mark.b...@gmail.com> wrote:
> > Hello everyone,
> > Hopefully this is something simple. I have a fresh copy of the 1.1 and
> > 1.2 frameworks running side by side on a Media Temple grid server. I
> > haven't built any pages yet, it's just the basic cakePHP greeting
> > page. If I let the server stand idle for 15 minutes, when I hit the
> > 1.1 page it takes between 1 and 2 seconds to build the page. Then,
> > when I hit the page again, it takes just a few hundreths of a
> > millisecond. Awesome.
> > Then, when I go to the 1.2 version, my initial request takes anywhere
> > from 5 to 20 seconds to build the page! Page renders after that are
> > faster, but just in the tenths of seconds, so approximately 10 times
> > slower than the 1.1 version.
> > I've tried the 1.2 framework on two different Media Temple grid server
> > profiles, getting the same results.
> > I've also set up the 1.2 framework on a server that I maintain, and
> > find that it's really fast, giving me performance as good or better
> > then the 1.1 framework. So I must have some configuration issue on the
> > grid server, does anybody have any ideas?
> > Please note that I copied up fresh copies of the frameworks, all of
> > the tmp directories are there and writable.
On Oct 23, 10:30 am, Mark <mark.b...@gmail.com> wrote:
> But, I think we can agree that the welcome page taking 20 seconds to
> first render is not normal.
Why is it not normal?
The landing page is not there for performance testing, but to validate
your configuration of Cake. The fact that it takes long should imply
that it's doing more checks then the older 1.1, and that's a good
thing!
The home page that you'll bring up doesn't have any database access,
just a plain old home.ctp page. It makes the same behaviour, 20
seconds to initially load, not stellar performance thereafter.
This might also be interesting: I hacked up the framework, putting in
a bunch of echo timestamps and aborting the process before
dispatch.php is called. So this page lists out everything that happens
before any particular page in app is run. You can see it here:
It's not very pretty, I'll try to clean it up a bit so it's clearer
what's going on. But all of the outputs are coming from config.php and
folder.php that CakePHP uses to get things going. The process aborts
before anything happens beside the framework loading.
It's kind of a pain because you'll only get the reeeally long load
time after 15 minutes or so of the server being idle. You'll just have
to take my word for it!
Thanks everybody,
Mark
On Oct 23, 10:46 am, Mathew <nfoscar...@yahoo.com> wrote:
> On Oct 23, 10:30 am, Mark <mark.b...@gmail.com> wrote:
> > But, I think we can agree that the welcome page taking 20 seconds to
> > first render is not normal.
> Why is it not normal?
> The landing page is not there for performance testing, but to validate
> your configuration of Cake. The fact that it takes long should imply
> that it's doing more checks then the older 1.1, and that's a good
> thing!
Mark,
Those times seem very high... and it's very suspicious.
First, is your test running with debug > 0?
Personally my production homepage (with debug 0) renders in ~0.5 s,
according to the little debug output in the source of the page.
A similar page in dev (on a basic windows box, with debug 2) loads in
1.8 sec. Now, this page also includes a rss feed, which I know
certainly adds a little extra time to render.
Again, I'm only talking about home.ctp pages, no DB or anything
involved.
Both running 1.2
On Oct 23, 11:03 am, Mark <mark.b...@gmail.com> wrote:
> The home page that you'll bring up doesn't have any database access,
> just a plain old home.ctp page. It makes the same behaviour, 20
> seconds to initially load, not stellar performance thereafter.
> This might also be interesting: I hacked up the framework, putting in
> a bunch of echo timestamps and aborting the process before
> dispatch.php is called. So this page lists out everything that happens
> before any particular page in app is run. You can see it here:
> It's not very pretty, I'll try to clean it up a bit so it's clearer
> what's going on. But all of the outputs are coming from config.php and
> folder.php that CakePHP uses to get things going. The process aborts
> before anything happens beside the framework loading.
> It's kind of a pain because you'll only get the reeeally long load
> time after 15 minutes or so of the server being idle. You'll just have
> to take my word for it!
> Thanks everybody,
> Mark
> On Oct 23, 10:46 am, Mathew <nfoscar...@yahoo.com> wrote:
> > On Oct 23, 10:30 am, Mark <mark.b...@gmail.com> wrote:
> > > But, I think we can agree that the welcome page taking 20 seconds to
> > > first render is not normal.
> > Why is it not normal?
> > The landing page is not there for performance testing, but to validate
> > your configuration of Cake. The fact that it takes long should imply
> > that it's doing more checks then the older 1.1, and that's a good
> > thing!
One you analyze the output with WinCacheGrind (or similar for other
OS), you'll have a clear idea of the culprit
And don't rule out the fact that you might have to yell at media
temple support due to the poor performance.
All that being said, I highly doubt that if cake performed so crappy
on every single install anyone would be using it... (perhaps the issue
is elsewhere)
On Oct 23, 11:03 am, Mark <mark.b...@gmail.com> wrote:
> The home page that you'll bring up doesn't have any database access,
> just a plain old home.ctp page. It makes the same behaviour, 20
> seconds to initially load, not stellar performance thereafter.
> This might also be interesting: I hacked up the framework, putting in
> a bunch of echo timestamps and aborting the process before
> dispatch.php is called. So this page lists out everything that happens
> before any particular page in app is run. You can see it here:
> It's not very pretty, I'll try to clean it up a bit so it's clearer
> what's going on. But all of the outputs are coming from config.php and
> folder.php that CakePHP uses to get things going. The process aborts
> before anything happens beside the framework loading.
> It's kind of a pain because you'll only get the reeeally long load
> time after 15 minutes or so of the server being idle. You'll just have
> to take my word for it!
> Thanks everybody,
> Mark
> On Oct 23, 10:46 am, Mathew <nfoscar...@yahoo.com> wrote:
> > On Oct 23, 10:30 am, Mark <mark.b...@gmail.com> wrote:
> > > But, I think we can agree that the welcome page taking 20 seconds to
> > > first render is not normal.
> > Why is it not normal?
> > The landing page is not there for performance testing, but to validate
> > your configuration of Cake. The fact that it takes long should imply
> > that it's doing more checks then the older 1.1, and that's a good
> > thing!
You are not alone on this one... I have been involved in a project
hosted with MT using CakePHP 1.2 RC3 and the speed is terrible. Takes
around 20 to 30 seconds to get to the site! If I put that same site on
another dedicated hosting server, it takes a couple of seconds max.
I am pretty sure it is to do with the MT infrastructure and nothing to
do with CakePHP at all, although am yet to find out exactly what. It
could be due to the type of infrastructure they are using as the only
other time I experienced this kind of issue was when I hosted a site
with servage.net - and they run similar infrastructure. Incidentally,
I got nowhere with them either.
Please post back here if you ever get any further with MT than I did.
I am wondering if you have a DNS problem for that domain. The first
time I requested the page it did take about 10 seconds to come up, but
HTML showed it rendered quickly. You might want to use nslookup to
query your DNS server, and see how it's resolving the IP address.
Also, can you put up a phpinfo() page so we can see which PHP
optimizers you have installed. My ISP runs with Zend and a few other
optimizers. I'm also wondering if your running it on a Windows server
(yuck!).
"It's kind of a pain because you'll only get the reeeally long load
time after 15 minutes or so of the server being idle. You'll just have
to take my word for it!"
Do you have SSH access to the server? Can you compare the results of
running TOP before and after.
The latency is seen on the first page load and then things get faster most of the time. I suspect there are other issues as well but haven't had the time to test anything. MySQL performance is terrible at times on clusters 1 & 2, however in your case these are static pages so not a factor.
Do post any information you come up with.
@Mathew Its not a windows server issue, as far as I'm aware the machines are running debian
Just re-read your first post, seems like you are running on cluster 1 for both your 1.1 and 1.2 applications so they should experience the same latency, maybe 1-2 seconds plus any extra code 1.2 might have. To exclude any issues in regard to this have you setup the same static page for 1.1 and 1.2 i.e. http://dev.fortunecookieprojects.net ? How did that perform ?
Matthew, I do have SSH access to the server, but I'm not sure what TOP
is; can you send a link?
Brett, I did try the same "static page" test on the fortunecookie
server, with the same results. Out of curiosity, how can you tell that
the applications are running on cluster 1?
It seems to me like the media temple grids have a latency issue that
is exacerbated by starting up the framework. I'll spend some time with
it in the next couple of days and post back here if I find anything
good.
Thanks again everyone for your help.
m
On Oct 23, 2:43 pm, "Brett Wilton" <bdwil...@gmail.com> wrote:
> Just re-read your first post, seems like you are running on cluster 1
> for both your 1.1 and 1.2 applications so they should experience the
> same latency, maybe 1-2 seconds plus any extra code 1.2 might have.
> To exclude any issues in regard to this have you setup the same static
> page for 1.1 and 1.2 i.e.http://dev.fortunecookieprojects.net? How
> did that perform ?
> Matthew, I do have SSH access to the server, but I'm not sure what TOP
> is; can you send a link?
> Brett, I did try the same "static page" test on the fortunecookie
> server, with the same results. Out of curiosity, how can you tell that
> the applications are running on cluster 1?
> It seems to me like the media temple grids have a latency issue that
> is exacerbated by starting up the framework. I'll spend some time with
> it in the next couple of days and post back here if I find anything
> good.
> Thanks again everyone for your help.
> m
> On Oct 23, 2:43 pm, "Brett Wilton" <bdwil...@gmail.com> wrote:
> > Just re-read your first post, seems like you are running on cluster 1
> > for both your 1.1 and 1.2 applications so they should experience the
> > same latency, maybe 1-2 seconds plus any extra code 1.2 might have.
> > To exclude any issues in regard to this have you setup the same static
> > page for 1.1 and 1.2 i.e.http://dev.fortunecookieprojects.net?How > > did that perform ?
> Brett, I did try the same "static page" test on the fortunecookie > server, with the same results. Out of curiosity, how can you tell that > the applications are running on cluster 1?
It looks like both servers are running on grid 1; I'd be interested if
anyone out there running on grid 3 could give the new version of the
framework a try and let us know how it performs?
m
On Oct 23, 8:35 pm, "Brett Wilton" <bdwil...@gmail.com> wrote:
> > Brett, I did try the same "static page" test on the fortunecookie
> > server, with the same results. Out of curiosity, how can you tell that
> > the applications are running on cluster 1?
Just a closing statement, I have to get this project out the door so I
went ahead and downgraded to the 1.1 framework. Thanks everyone for
your good advice.
Take care,
Mark
On Oct 24, 4:35 am, Mark <mark.b...@gmail.com> wrote:
> It looks like both servers are running on grid 1; I'd be interested if
> anyone out there running on grid 3 could give the new version of the
> framework a try and let us know how it performs?
> m
> On Oct 23, 8:35 pm, "Brett Wilton" <bdwil...@gmail.com> wrote:
> > > Brett, I did try the same "static page" test on the fortunecookie
> > > server, with the same results. Out of curiosity, how can you tell that
> > > the applications are running on cluster 1?
Like Mark, I had been having serious issues with Cake on Media Temple
GS. So much so that I was considering going back to Rails.
It would take up to 20 seconds sometimes to load a page that hadn't
been hit in a few hours.
You need to move the core cake files out of the public HTML directory.
I think what is happening when you have it out in the public area is
that it is fair game for (mt) and their caching bots.
Anyways, I hope this helps someone as it has made my apps on (mt)
almost as fast as they are running localhost on my Mac pro.
-Scott
On Oct 28, 3:24 am, Mark <mark.b...@gmail.com> wrote:
> Just a closing statement, I have to get this project out the door so I
> went ahead and downgraded to the 1.1 framework. Thanks everyone for
> your good advice.
> Take care,
> Mark
> On Oct 24, 4:35 am, Mark <mark.b...@gmail.com> wrote:
> > Thanks, Brett, good to know.
> > It looks like both servers are running on grid 1; I'd be interested if
> > anyone out there running on grid 3 could give the new version of the
> > framework a try and let us know how it performs?
> > m
> > On Oct 23, 8:35 pm, "Brett Wilton" <bdwil...@gmail.com> wrote:
> > > > Brett, I did try the same "static page" test on the fortunecookie
> > > > server, with the same results. Out of curiosity, how can you tell that
> > > > the applications are running on cluster 1?