2

I have this in my log:

2016-01-07 12:22:38,720  WARN  [alfresco.cache.immutableEntityTransactionalCache] [http-apr-8080-exec-5] Transactional update cache 'org.alfresco.cache.immutableEntityTransactionalCache' is full (10000).

and I do not want to just increase this parameter without knowing what is really going on and having better insights of alfresco caches best practices!

FYI: The warning appears when I list the element from document library root folder in a site. Note that the site does have ~300 docs/folder at that level, several of which are involved in current workflows and I am getting all of them in one single call (Client-side paging)

I am using an Alfresco CE 4.2.c instance with around 8k nodes

Younes Regaieg
  • 4,156
  • 2
  • 21
  • 37

2 Answers2

4

I ve seen this in my logs whenever you do a "big" transaction. By that I mean making a change to 100+ files in a batch.

Quoting Axel Faust:

The performance degredation is the reason that log message is a warning. When the transactional cache size is reached, the cache handling can no longer handle the transaction commit properly and before any stale / incorrect data is put into the shared cache, it will actually empty out the entire shared cache. The next transaction(s) will suffer bad performance due to cache misses...


Cache influence on Xmx depends on what the cache does unfortunately. The property value cache should have little impact since it stores granular values, but the node property cache would have quite a different impact as it stores the entire property map. I only have hard experience data from node cache changes and for that we calculated additional need of 3 GiB for an increase to four-times the standard cache size

Community
  • 1
  • 1
Stefan De Laet
  • 1,409
  • 11
  • 20
  • I've seen it many times but only when batch processing some data, like when I am deleting a folder with thousands of nested folders and documents... I know it is just a warning and the operation is being executed correctly even though the warning is shown, but I noticed a notable performance degradation once the error is shown until the operation in hands finishes ! – Younes Regaieg Jan 07 '16 at 15:51
  • 3
    The performance degredation is the reason that log message is a warning. When the transactional cache size is reached, the cache handling can no longer handle the transaction commit properly and before any stale / incorrect data is put into the shared cache, it will actually empty out the entire shared cache. The next transaction(s) will suffer bad performance due to cache misses... – Axel Faust Jan 09 '16 at 00:13
  • @AxelFaust how much more RAM should I add to JVM Xmx parameter if I plan to increase several cache sizes, let's say 10 times ? Would 0.5 GB be enough ? Is there some kind of magic function that I can rely on for calculating that value? And most important, would my instance suffer from bad performance if caches are **too** big (let's say 10 times big)? – Younes Regaieg Jan 09 '16 at 08:45
  • 2
    Cache influence on Xmx depends on what the cache does unfortunately. The property value cache should have little impact since it stores granular values, but the node property cache would have quite a different impact as it stores the entire property map. I only have hard experience data from node cache changes and for that we calculated additional need of 3 GiB for an increase to four-times the standard cache size. – Axel Faust Jan 12 '16 at 13:39
3

It is very common to get these warnings. I do not think that it is a good idea to change the default settings. Probably you can try to change your code, if possible.

As described in this link to the alfresco forum by one of the Alfresco engineer, the value suggested by Alfresco are "sane". They are designed to work well in standard cases.

You can decide to change them, but you have to be careful because you can get lower performances than what you would get doing nothing.

I would suggest to investigate why your use of this webscript is causing the cache overflow and check if you can do something about it. The fact that you are retrieving 300 documents/folders in the same time, it is likely to be the cause.

In the following article you can find how to troubleshoot and solve issues with the cache.

Alfresco cache tuning

As described in that article, I would suggest to increase the log level for ehcache:

org.alfresco.repo.cache.EhCacheTracerJob=DEBUG

Or selectively adding the name of the cache that you want to monitor.

Marco Altieri
  • 3,726
  • 2
  • 33
  • 47
  • I am using the OOTB doclib listing webscript in share, I've not customized that! – Younes Regaieg Jan 09 '16 at 08:36
  • Sorry if I ask too many questions. Is this OOTB webscript returning the whole site in one call? Are these 300 elements all in the same folder? What is the size of the page that you are using? – Marco Altieri Jan 09 '16 at 09:31
  • It's an OOTB webscript, I am just asking for 1000 Records in the maxItems param, it returns the content of a particular under some cntaine (documentLibrary in my cas) under some site. In my case, I am pointing to the root documentLibrary folder which has directly 297 items including folders and files that are involved in several workflows. – Younes Regaieg Jan 09 '16 at 22:02
  • Ok. It seems that you are using an OOTB webscript but not in the way it is supposed to be used. The doclib usually returns 20 items, if I recall. This is way the cache is not enough. You can decide to change this logic and paginate, increase the cache or do nothing. – Marco Altieri Jan 09 '16 at 23:46
  • any considerations I should take in mind while increasing the cache (let's say 10 times)? I thought of inspecting my VM using jvisualvm or something like that to determine the exact size of a cache record and then, depending on that value, I would add some RAM to my JVM Xmx param! is it the way to go ? – Younes Regaieg Jan 10 '16 at 10:22
  • 1
    I think that it would be easier to increase the log level for the ehcache. It will tell you exactly what is happening in each cache. I added a link to an article that describes how to do it in my response – Marco Altieri Jan 10 '16 at 10:49
  • 2
    Just to point out but in Alfresco 4.2 there is no EhCache. Alfresco uses a combination of Hazelcast and transactional in-memory structures (basically simple maps wrapped in transaction listeners) for distributed data / cache management. – Axel Faust Jan 12 '16 at 16:02