Document Creation performance issue

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Document Creation performance issue

I am using Alfresco Community Edition 5.0 and Postgresql 9.3.

In our application, we are creating all the documents in the root folder using cmis API.

This led to the slowness in the process of creating or updating the documents in Alfresco.

During document create/update, it is using below query which is taking 5 to 6 seconds to execute.

select assoc.id as id,
parentNode.id as parentNodeId,
parentNode.version as parentNodeVersion,
parentStore.protocol as parentNodeProtocol,
parentStore.identifier as parentNodeIdentifier,
parentNode.uuid as parentNodeUuid,
childNode.id as childNodeId,
childNode.version as childNodeVersion,
childStore.protocol as childNodeProtocol,
childStore.identifier as childNodeIdentifier,
childNode.uuid as childNodeUuid,
assoc.type_qname_id as type_qname_id,
assoc.child_node_name_crc as child_node_name_crc,
assoc.child_node_name as child_node_name,
assoc.qname_ns_id as qname_ns_id,
assoc.qname_localname as qname_localname,
assoc.is_primary as is_primary,
assoc.assoc_index as assoc_index


from
alf_child_assoc assoc
join alf_node parentNode on (parentNode.id = assoc.parent_node_id)
join alf_store parentStore on (parentStore.id = parentNode.store_id)
join alf_node childNode on (childNode.id = assoc.child_node_id)
join alf_store childStore on (childStore.id = childNode.store_id)

where
parentNode.id = $id

I want to change the root folder(DB) of my alfresco from company home to some other folder.

Is there any configurations present which can help me in changing it?

Will this change resolve my problem?

Any other suggestions are most welcomed which can resolve the same.

3 Replies
Highlighted
Senior Member

Re: Document Creation performance issue

Hi,

I don't think that changing destination path will resolve your problem. 

Reference of compnayhome is used by other services of Alfresco as well, so it is not recommended to make any changes in Database. 

However, using CMIS you can always change the path (from CompanyHome) to where you want to create / update the documents in Alfresco e.g. /Sites/test/documentLibrary/My Folder

Regards

Kintu

ContCentric

Regards,
Kintu | ContCentric
Highlighted
Established Member II

Re: Document Creation performance issue

Hi ,

Can you provide some more detail:

a) Using some client application - uploading/updating the documents? what is the client application based on java/python etc..? Also what protocol is used - REST- browser binding/REST atom pub/web services.

b) Can you check if database is causing the delay running a simple cmis GET query using cmisselector = properties or cmisselector =objects

c) Also is there any way you can profile the application using - Yourkit etc so that we know what exactly is taking time.

d) In the query - can you provide the noderef of the folder and not the path where you would like to upload the document.(and see if you get good performance)

e) Try to make direct REST call from POSTman or any REST client:

First get alf_ticket:

http://localhost:18080/alfresco/s/api/login?u=SSO4&pw=Password1
<?xml version="1.0" encoding="UTF-8"?>
<ticket>TICKET_c98c483f4ebd30f980d43b55e6a8e8c641a9c00b</ticket>

And then do a POST callSmiley Sadas below screenshot)

http://localhost:18080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root?objectId=edae380...Smiley Surprised

Just to ensure that login/getting ticket is 1st step and main upload is second step -

to identify if authentication is taking time.

Let me know if this helps.

Highlighted
Customer

Re: Document Creation performance issue

Hi:

As advise, don't use , better, place them under /MyApp/

Besides, you should distribute your documents uploads in some folder structure under your application rootpath.

There is a non-written rule that you should not have more than let's say 1000 documents in each level folder. Then your alfresco queries probably perfom better (or at least something better). Typical intermediate folder structures are yy/MM/dd based and the structure may depend on how many documents you upload per day.

Creation date based is valid for online daily uploads with no more than 1 thousand documents. 

/MyApp/2018/12/26/doc1.pdf

/MyApp/2018/12/26/doc2.pdf

 

If you plan to some bulk upload some days, you can distribute them volume based:

/MyApp/Vol0001/ --> 1000 docs

/MyApp/Vol0002/ --> 1000 docs

Your application must create these hierchies via CMIS for example.

Regards.

--C.