12-12-2016 06:27 AM
Hello,
we are currently developing an application which uses the Alfresco backend (Content Repository) to create new documents and change a document’s metadata. For communication with the Alfresco backend we use the CMIS REST API [0]. Our CMIS client is implemented with Apache Chemistry [1].
We recognized that the performance for checking-out and checking-in a document is poor. Checking-out a document should only “mark” the document as “checked out”. No content is transferred/downloaded. During check-in, we only set new metadata and do not provide new content.
Alfresco environment 1: Alfresco 5.1 CE Standard-Installation, Windows 10, 4 CPUs, 8 GB RAM.
Alfresco environment 2: Alfresco 5.1 One, RedHat, 4 CPUs, 19 GB RAM
Code for checking-out a document:
StopWatch checkoutStopWatch = new StopWatch();
checkoutStopWatch.start();
ObjectId checkedOutObjectId = document.checkOut();
logPerformance(checkoutStopWatch, " ### PerfSer: CheckOut Document in {} ms");
Average Check-out performance: ~800ms on both environments
Code for checking-in a document:
StopWatch checkinStopWatch = new StopWatch();
checkinStopWatch.start();
ObjectId newObjectId;
try {
newObjectId = pwc.checkIn(false, properties, null, "update metadata");
}
catch (CmisConstraintException e) {
throw new ArchiveValidationException(e);
}
logPerformance(checkinStopWatch, " ### PerfSer: CheckIn Document in {} ms");
Average Check in performance: ~700ms on both environments
So the roundtrip for changing a document's metadata will be ~1500ms.
Does someone know a more performant approach to check-out and check-in a document to update a document’s metadata?
Best regards,
Stefan Reiterer
[0] http://docs.alfresco.com/community/pra/1/topics/cmis-welcome.html
[1] https://chemistry.apache.org/java/opencmis.html
12-12-2016 09:59 AM
This is the default checkout-edit-checkin cycle using operations as defined by the specification. Instead of looking for a more performant (and potentially less standards-compliant) approach you should investigate what is causing any unnecessary delays in the execution. E.g. is your database sufficiently optimised, are there IO bottlenecks, are 3rd party addons installed that may include sub-optimal customisations, etc.?
Also, you might want to do some monitoring of the Alfresco server via JVisualVM to sample internal operations, check for slow SQL queries and also network latency / packet transmission performance.
12-16-2016 03:48 AM
Thank you for your reply! One of our most important intentions is to use CMIS for communicating with the content repository in a standardized manner.
We use a standard Alfresco installation without further add-ons. The database (and content repository) is empty and everything (database, Alfresco, solr) at my local development environment runs on localhost (no network latency problems). Monitoring the system via JVisualVM showed that only a small fraction of the assigned resources are in use.
To approve that the CMIS client library (Apache Chemistry) is not the problem, I used a REST-Client to call the service interface directly. This approach showed, that Apache Chemistry provides nearly no overhead.
My investigations lead me to the assumption, that Alfresco itself is the problem. Does someone know which configuration options have direct impact to check-out and check-in performance? Does someone else use Alfresco CE via CMIS in an enterprise environment and overcame these serious performance problems?
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.