a) I've noticed that you can access the CMS with lower memory
requirements by autoloading a page, e.g. site.com/admin/show/1
b) In my experience you will quite quickly find the appropriate memory
limit, e.g. 256 MB
c) Agree, this memory issue is something we should resolve. The CMS is
supposed to only load pages as you browse to them, so I think the
solution is to find where there is a bug that is trying to use/load
all pages in an unnecessary memory wasting manner.
Sig
On 12/01/2009, at 9:25 AM, windandwaves wrote:
>
> Hi All
>
> For a personal project (promoting sustainability issues) I am building
> a website with 10,000+ pages - and it aint working. I could just work
> with plain DataObjects, but using pages has several advantages: SEO,
> Hierarchy, ability to "browse" pages without having to build anything,
> etc... If I were to use DataObjects then I would essentially be re-
> creating the functionality of SiteTree, that seems silly.
>
> So, I increased the memory in PHP to 160M, but I still cant open my
> CMS after I created the pages.
>
> I have looked at several post on this matter and I am looking for
> further ideas. I have implemented: http://open.silverstripe.com/ticket/826
> - without much noticeable improvement.
>
> In my five cents worth, I think this will one of the most important
> challenges for the Silverstripe CMS - and also a way to distinguish
> itself from other CMS-es: speed and agility.
>
> Any thoughts? Could we write a function that checks for the number of
> pages in the CMS and takes some shortcut if there are over X pages?
>
> Thank you
>
> Nicolaas
>
>
>
Sam - cool! - Nicolaas - can you let us know if it gets your CMS
loading in less than a few hundred megs of RAM! :)
Sig
On 12/01/2009, at 4:43 PM, Sam Minnee wrote:
>
> Alright, on my test install with 643 pages, I got the number of
> queries from 15,312 to 244
>
> See the individual commit logs for exactly what I did:
>
> http://open.silverstripe.com/changeset/69977
> http://open.silverstripe.com/changeset/69981
> http://open.silverstripe.com/changeset/69982
> http://open.silverstripe.com/changeset/69983
> http://open.silverstripe.com/changeset/69986
>
> There's more that can be done - 244 queries is still a lot - but I
> think this will take it away from "crisis point" and we can leave
> further optimisations for 2.3.1 or 2.4.0
>
> It raises the question of how this happened. We could probably stand
> to include the total number of queries in our test execution, to look
> for big changes.
>
With regards to the testing / monitoring of SQL queries, I think the
most important thing to look for is not so much the exact number of
queries, or expected totals, but *changes* between commits.
For example, if a page view generally uses 100 queries, and someone
checks in some new code and that number shoots up to 1000 (eg: they
added a foreach loop that contains a lurking N+1 query). The issue is
less obvious from looking at the application code, but glaringly
blatant at the SQL level.
You wouldn't know about such N+1 issues otherwise, because the
code/behavior itself would be working fine.