Hi Benjamin,

Thanks for providing level information, it helps me get more of the context of your particular usage. If you have 2 levels, this means you are probably calling getAbsoluteContainerList 6 times per request, as you have 6 entries in your first level, and want to get the sub pages for each of the first level entries. So if you have a response time of 200ms on getAbsoluteContainerList that means your total calls will average to something like 1200ms right ?

In terms of caching, there is already a lot of it being done, and we spent lots of time reducing performance issues in Jahia. This has worked quite well for most databases, except for Oracle, which somehow seems to be a lot slower than others (e.g. MySQL) for the same kind of requests.

Now what could be improved in the caching mechanism is to try to load nothing at all for a page that has already been accessed once. This might seem quite trivial to do, but unfortunately it is not : if we didn't use a preload mechanism like we currently do (that loads all the container and fields for a whole page), we would need to load fields and containers on a per-demand basis. Basically what I'm saying is that the first access would be *much* slower (I'm thinking in the range of 5 to 6 secs per getAbsoluteContainerList() call). Implementing this wouldn't be too hard, but I'm sure some users would not find this acceptable (actually this was the first approach implemented in Jahia and we had to change it because too many users had experienced this problem).

An approach I am looking at implementing is offering a configurable caching system, where preloading and lazy-loading mechanisms could be setup by the Jahia administrator, based on the needs of the particular Jahia installation. This of course requires a lot more development time and will not happen overnight. But as I said, we have a lot of MySQL/postgeSQL/HSQLDB/... users that are not seeing the current implementation as a blocking problem at all, so there is something strange going on in Oracle that is slowing these calls down quite significantly. Are you sure you have indexed your Oracle DB? Do you have the following indexes in the your database, which would probably help the getAbsoluteContainerList request ?

CREATE INDEX jahia_fields_data_index ON jahia_fields_data(pageid_jahia_fields_data, ctnid_jahia_fields_data, rank_jahia_fields_data, id_jahia_fields_data);
CREATE INDEX jahia_ctn_entries_index on jahia_ctn_entries(pageid_jahia_ctn_entries);
CREATE INDEX jahia_ctn_lists_index on jahia_ctn_lists(pageid_jahia_ctn_lists);


Another tool you can use to profile SQL requests is the SQL Profiler tool we offer for free, and that is available here : http://sqlprofiler.jahia.org . Also there might be some better (commercial?) JDBC drivers that might include request caches that could help boost performance significantly.

I hope this helps,
Regards,
  Serge...

At 10:05 08.07.2004, you wrote:
On the top menu we have 6 menu items end we have only one level below that have in average 5 items...

That's no so much.


I'm wondering about the need to access the DB. Most of the accesses to the site are done as guest. Usually in this case the menu is the same from page to page. Is it not possible to cache this information? Here I'm made a test
(it is ugly but informative):I force the system to use a hardcoded menu and it really increase the performance. But it is not doable in reality.


What do you thinks ? ?

Thanks for all the information you provide ..



Benjamin L�onard
Intrasoft Internationnal
Currently at European Parliament


-----Original Message----- From: Serge Huber [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 07, 2004 4:58 PM To: [EMAIL PROTECTED] Subject: RE: Performance and cache


Another thought while I'm at it : how many calls to getAbsoluteContainerList do you have for a single page ? Maybe the easiest way to resolve the problem is to reduce these calls. For example if you're displaying a navigation menu this would just mean reducing the number of displayed levels.

Regards,
   Serge Huber.

At 10:12 07.07.2004, you wrote:
>I try this call :
>
>SELECT ctnid_jahia_fields_data, id_jahia_fields_data FROM jahia_fields_data
>WHERE pageid_jahia_fields_dataORDER BY ctnid_jahia_fields_data,
>rank_jahia_fields_data, id_jahia_fields_data ASC
>
>12 is a page id I retrieve :
>
>
>0 118
>46 119
>46 119
>46 119
>46 120
>46 120
>46 120
>46 121
>46 121
>46 121
>46 122
>46 122
>46 122
>47 123
>47 123
>47 123
>66 170
>67 171
>68 172
>69 173
>70 174
>71 175
>72 176
>73 177
>74 178
>492 1155
>492 1156
>492 1157
>492 1158
>493 1159
>504 1179
>
>
>Is it normal that the same data are duplicated or is it our database that
>is corrupted?
>
>
>Benjamin L�onard
>Intrasoft Internationnal
>Currently at European Parliament
>
>
>-----Original Message-----
>From: Serge Huber [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, July 06, 2004 4:42 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Performance and cache
>
>
>Hi Benjamin,
>
>For each call to getAbsoluteContainerList there are mainly three DB requests :
>
>SELECT ctnid_jahia_fields_data, id_jahia_fields_data FROM jahia_fields_data
>WHERE pageid_jahia_fields_data=? ORDER BY ctnid_jahia_fields_data,
>rank_jahia_fields_data, id_jahia_fields_data ASC
>
>SELECT DISTINCT id_jahia_ctn_entries, listid_jahia_ctn_entries FROM
>jahia_ctn_entries WHERE pageid_jahia_ctn_entries=?
>
>SELECT DISTINCT id_jahia_ctn_lists, parententryid_jahia_ctn_lists FROM
>jahia_ctn_lists WHERE pageid_jahia_ctn_lists=?
>
>These preload the content for the page, in as little requests as possible
>(previously every container and field was loaded with it's own SQL request
>which was much slower). If possible I would therefore suggest trying to put
>indexes on these tables for pageid loading.
>
>Regards,
> Serge Huber.
>
>At 14:58 05.07.2004, Benjamin LEONARD wrote:
> >Hello ,
> >We have serious performance problem So I try to find out what are the
> >bottle neck.
> >
> >In the file main_menu.inc I find out this line :" JahiaContainerList
> >linkContainerList = jData.containers().getAbsoluteContainerList(
> >"linkContainer", topLink.getID() );
> >
> >
> >This line is call on every page for every first level menu item. On my dev
> >server each time this is call it take between 250 and 1000 ms. I suppose
> >there is a database access.
> >
> >Can you give me a way to decrease this! Can we enable a cache????
> >
> >Benjamin L�onard
> >Intrasoft Internationnal
> >Currently at European Parliament
>
>- -- --- -----=[ serge.huber at jahia dot com ]=---- --- -- -
>Jahia : A collaborative source CMS and Portal Server
>www.jahia.org Community and product web site
>www.jahia.com Commercial services company


- -- --- -----=[ serge.huber at jahia dot com ]=---- --- -- -
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company

- -- --- -----=[ serge.huber at jahia dot com ]=---- --- -- -
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company





Reply via email to