cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug poor performance in WCMQS

leonardo_celati
Champ in-the-making
Champ in-the-making
Hi all,

I have adaptded the existing WCMQS application to suit my needs.

I am still in development mode, which is: my application developed on localhost, talking to a remote alfresco 4.2 community server, queried on the authoring folder.

I am seeing very bad performance when retrieving an html asset from the repository, in the order of nearly 10 seconds for each request.

Can you give me suggestions and advices on where to start looking for debugging ?

These are few points that may be useful

1- I have changed very little on the WCMQS side, only few templates and pages, and the asset retrieved is 10kb maximum.
2- Network performance are fine, other components on server are behaving well
3- When the asset is retrieved and cached there are no problems, until the cache expires

If you require further information just ask.
1 REPLY 1

leonardo_celati
Champ in-the-making
Champ in-the-making
Well, maybe this sounds complicated to the experienced alfresco users, but this is what I have done by now. I am writing it in case someone can point out a better solution.

Starting with this on my localhost:

tcpdump -A 'port:8080'

I discovered that a lot of cmis queries was made, all begin with this:


select f.cmis:objectId, w.ws:hostName, w.ws:hostPort, t.cm:title, t.cm:description, w.ws:webAppContext, w.ws:siteConfig from cmis:folder as f join ws:website as w on w.cmis:objectId = f.cmis:objectId join cm:titled as t on t.cmis:objectId = f.cmis:objectId


This results in retrieving all ws:website present on alfresco repository, even the one that has nothing to do with the current web site.
Each web site was then queried for retrieving getWebSiteInfo which results in a new cmis call.

I track it down to the WebSiteServiceImpl, where the mentioned query is used.

First of all I implemented my own custom WebSiteServiceImpl to supply a more restrictive query, which limit the result to the precise web site. It is fairly easy to supply the query as a spring property, rather than having it hard coded.
Then I see that for each web site a logo request was also made, which results again in a new cmis call.


            Asset logo = assetFactory.getSectionAsset(siteInfo.rootSectionId, logoFilename, true);
            webSite.setLogo(logo);


I just commented it out.
As a final step, I increased these two values:


    /** Cache timeout values (seconds) */
    private int webSiteCacheRefreshAfter = 60;
    private int webSiteSectionCacheRefreshAfter = 60;


That's it for the moment. The initial request now takes from 1 to 3 seconds, which is far better then the initial 10 seconds.
But I am keep investigating.