SlideShare uma empresa Scribd logo
1 de 17
Tech Talk Live
Alfresco Performance Tuning – Part 2
Speaker Bio
Luis Cabaceira – Principal Consultant at Alfresco
Agenda
1 – Jvm tuning
2 – Garbage collection analisis
2 – Caches
3 - Alfresco is running slow.. where to start ?
1 – JVM Tuning
• Tune the memory and garbage collection parameters for the JVM to be
appropriate for your situation. Enable GC logs and analyze them.
• Solr is more memory intensive than Alfresco
• Alfresco consumes memory on the repository L2 Cache, Alfresco system memory.
• Tuning will vary depending if you are running Alfresco and Solr on the same server
and same Jvm.
• General good settings for Alfresco (assuming a server with 16GB RAM)
-Xms8000m –Xmx12000m -XX:MaxPermSize=512m -Xss1024K
-XX:-DisableExplicitGC -XX:NewSize=2G -XX:+UseCodeCacheFlushing
-Dsun.security.ssl.allowUnsafeRenegotiation=true -Djava.awt.headless=true
• Extra Settings found on large Alfresco implementations (solr better with CMS)
-XX:+UseConcMarkSweepGC –server
-XX:+CMSIncrementalMode -XX:CMSInitiatingOccupancyFraction=80
-XX:+UseParNewGC -XX:ParallelGCThreads=4
-XX:+UseCompressedOops -XX:+CMSClassUnloadingEnabled
1 – Garbage Collector Tuning
A regular analysis to the garbage collection logs is also a known best practice
and the health of the Garbage collection engine is normally related with the
overall effectiveness of memory usage across the system. This is valid for
Alfresco, Solr and any possible client that is part of the deployment.
The best practice is to choose an analysis timeframe which is know to be the
period when the system is most heavily used and monitor the garbage
collection operations that happened during that period.
There are some available tools to analyze garbage collection logs, but the one I
think generates a more accurate report is Censum from Jclarity. It’s possible to
download a trial version of this tool as use it to analyze the GC logs during 7
days.
You can also GCViewer, its opensource and a very useful tool.
https://github.com/chewiebug/GCViewer
1 – Garbage Collector common problems
1 - Look for periodic calls to system.gc(); - add the -XX:+DisableExplicitGC flag
2 - Look for high pauses
High pauses from garbage collection can be an indication of a number of problems. A High
Percentage Of Time spent paused in GC may mean that the heap has been under-sized, causing
frequent full GC activity. A high Longest Pause in Seconds may be an indication that the heap is too
large, causing long individual garbage collections.
3 - Look for premature promotion of objects
Premature promotion is a condition that occurs when objects that should be collected in a young
generation pool (Eden or The Survivor "From" space) are instead promoted to Tenured (Old) space.
A consequence of premature promotion is that this places additional pressure on Tenured space,
which will result in more frequent collections of Tenured. More frequent collections in Tenured
collector will interfere with your application's performance.Look for premature
2 – Caches (ehcache/hazzlecast)
• Alfresco now uses hazelecast clustering and caching
• Database is now used for cluster discovery
• Removing a node from the cluster is now configured on the alfresco-global.properties
• alfresco.cluster.enabled=false
• The repository caches are separated in 2 different levels:
• L1 = The transactional cache (TransactionalCache.java)
• L2 = Hazelcast distributed Cache (>4.2.X)
• The level 1 cache commits to L2 cache.
• Tracing cache usage is very important for tuning
• Adding the following options to your JVM will expose the jmx features of hazelcast.
• -Dhazelcast.jmx=true -Dhazelcast.jmx.detailed=true
2 – Caches (ehcache/hazzlecast)
• In Alfresco, hazelcast works with factories that allow the creation of caches
• You can define your own caches
2 – Hazzlecast cache mechanisms
With Hazelcast the cache is distributed across the clustering members, doing a more
linear distribution of the memory usage. In the alfresco implementation you have more
mechanisms available to define different cache cluster types.
Fully Distributed
This is the normal value for a hazelcast cache. Cache values (key value pairs) will be
evenly distributed across cluster members. Leads to more remote lookups when a get
request is issued and that value is present in other node (remote).
Local cache
Some caches you may not actually want them to be clustered at all (or distributed), so
this option works as a unclustered cache.
Invalidating
This is a local (cluster aware) cache that sets up a messenger that sends invalidation
messages messages to the remaining cluster nodes if you updated an item in the cache,
much similar as the old eh-cache mechanisms.
2 – Tuning hazelcast
To perform a cache tuning exercise we need to analyze 3 relevant factors :
- type of data
- how often it changes
- number of gets compared to the number of writes
If we can identify caches that the correspondent values do not change often, its worth to try
and set them to invalidating, and check the performance results.
Note that in distributed-caches, when we have a lot a remote gets, if the objects that are being
stored are big, the remote get operation its going to be slow. This is mainly because the object is
serialized and it needs to be un-serialized before its content is made available and that
operation can take some time depending on the size of the object.
2 – Tuning hazelcast
Caches values can be configured/overridden on alfresco-global.properties
• cache.aclSharedCache.tx.maxItems=40000
• cache.aclSharedCache.maxItems=100000
• cache.aclSharedCache.timeToLiveSeconds=0
• cache.aclSharedCache.maxIdleSeconds=0
• cache.aclSharedCache.cluster.type=fully-distributed
• cache.aclSharedCache.backup-count=1
• cache.aclSharedCache.eviction-policy=LRU
• cache.aclSharedCache.eviction-percentage=25
• cache.aclSharedCache.merge-policy=hz.ADD_NEW_ENTRY
Look for : WARN [cache.node.nodesTransactionalCache] Transactional update cache
‘org.alfresco.cache.node.nodesTransactionalCache’ is full (125000).
3 – Alfresco is running Slow (Where to Start)
• First we need to identify what/where is alfresco running Slow
• Is it Alfresco that is slow ?
• Page Rendering ?
• Dashboard takes a long time to render ?
• Login takes long ?
• Browsing the Repository is very slow (Permission evaluation ? )
• Uploading content performance (bulk import, migration, rules)
• Search is slow
• Workflow problems
• Cpu is 100%
• Memory is exhausted
• Cluster communication problem ?
3 – Alfresco is running Slow (Where to Start)
• Investigating, “Follow the Request”
• Is apache or a physical load balancer being used in front on Alfresco ?
• Are there enough connections/threads/workers available for the existing load.
• Any timeouts on the apache/lb logs ?
• Check overall performance of apache.
• What are the tomcat threads doing
• Use support tools, check real time thread dumps, see behaviors/actions.
• Run a series of jstack commands and check what the threads are doing
• What is consuming the memory
• Extract heapdumps and jstacks and check what is occupying memory
3 – Alfresco is running Slow (Where to Start)
• “Questioning the DB” – Key performance indicators
• Response time
• Blocked queries
• Top queries by frequency and / or time
• Slow Queries
• Average number of Transactions per second (during a peak period)
• Number of Connections (during a peak period)
• Database server health (Cpu, memory, IO, Network)
• Indexes Size and Health
• Inspect JDBC access to the database
• Jdbcspy
• Log4jdbc
• Javamelody
3 – Alfresco is running Slow (Where to Start)
• “Questioning the Storage” – Key performance indicators
• I/O performance (iometer, hdparm)
• Check both
• Alfresco Content Store storage
• Solr Indexes Storage(should be faster)
• Run EVT, last test will check the speed of the indexes disk storage and produce a
meaningful report.
• Checking Indexes disk free space (merging processes require at least 40% free)
3 – Alfresco is running Slow (Where to Start)
• “Questioning Alfresco” – Key performance indicators
• Cpu Usage, Memory Usage, Threads
• Check alfresco.log for ERRORS, WARN
• Can use elasticSearch to aggregate all relevant logs and do a common search
• Enable Transformations log, check for transformation ERRORS
• Verify transformation limits
• Enable GC logs on the alfresco JVM and analise GC performance
• Verify Content policies, rules, scheduled tasks, integrations and customizations
• Analyze use case, and identify the log classes can can produce relevant information
while in DEBUG mode. Use support tools for real time troubleshooting.
3 – Alfresco is running Slow (Where to Start)
• “Questioning Solr” – Key performance indicators
• Cpu Usage, Memory Usage, Threads
• Check solr.log for ERRORS, WARN
• Can use elasticSearch to aggregate all relevant logs and do a common search
• Enable Query logs, check for ERRORS
• Verify Solr statistics / cache usages
• Enable GC logs on the solr JVM and analyze GC performance
• Verify merging problems, slow disks, insufficient free space, configuration problem.
• Analyze search use case, blacklist some mime-types, keep your index small, only
index what you will search for.

Mais conteúdo relacionado

Mais procurados

Discovering the 2 in Alfresco Search Services 2.0
Discovering the 2 in Alfresco Search Services 2.0Discovering the 2 in Alfresco Search Services 2.0
Discovering the 2 in Alfresco Search Services 2.0Angel Borroy López
 
Alfresco Security Best Practices Guide
Alfresco Security Best Practices GuideAlfresco Security Best Practices Guide
Alfresco Security Best Practices GuideToni de la Fuente
 
From zero to hero Backing up alfresco
From zero to hero Backing up alfrescoFrom zero to hero Backing up alfresco
From zero to hero Backing up alfrescoToni de la Fuente
 
Guide to alfresco monitoring
Guide to alfresco monitoringGuide to alfresco monitoring
Guide to alfresco monitoringMiguel Rodriguez
 
Alfresco Share - Recycle Bin Ideas
Alfresco Share - Recycle Bin IdeasAlfresco Share - Recycle Bin Ideas
Alfresco Share - Recycle Bin IdeasAlfrescoUE
 
How to migrate from Alfresco Search Services to Alfresco SearchEnterprise
How to migrate from Alfresco Search Services to Alfresco SearchEnterpriseHow to migrate from Alfresco Search Services to Alfresco SearchEnterprise
How to migrate from Alfresco Search Services to Alfresco SearchEnterpriseAngel Borroy López
 
Sizing your alfresco platform
Sizing your alfresco platformSizing your alfresco platform
Sizing your alfresco platformLuis Cabaceira
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursJ V
 
Alfresco node lifecyle, services and zones
Alfresco node lifecyle, services and zonesAlfresco node lifecyle, services and zones
Alfresco node lifecyle, services and zonesSanket Mehta
 
Alfresco 5.2 REST API
Alfresco 5.2 REST APIAlfresco 5.2 REST API
Alfresco 5.2 REST APIJ V
 
Jose portillo dev con presentation 1138
Jose portillo   dev con presentation 1138Jose portillo   dev con presentation 1138
Jose portillo dev con presentation 1138Jose Portillo
 
Supporting Apache HBase : Troubleshooting and Supportability Improvements
Supporting Apache HBase : Troubleshooting and Supportability ImprovementsSupporting Apache HBase : Troubleshooting and Supportability Improvements
Supporting Apache HBase : Troubleshooting and Supportability ImprovementsDataWorks Summit
 
Alfresco Backup and Disaster Recovery White Paper
Alfresco Backup and Disaster Recovery White PaperAlfresco Backup and Disaster Recovery White Paper
Alfresco Backup and Disaster Recovery White PaperToni de la Fuente
 
HBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon
 
Moving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco RepositoryMoving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco RepositoryJeff Potts
 
Architectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondArchitectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondStefan Kopf
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public APIJeff Potts
 
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Henning Jacobs
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Databricks
 

Mais procurados (20)

Discovering the 2 in Alfresco Search Services 2.0
Discovering the 2 in Alfresco Search Services 2.0Discovering the 2 in Alfresco Search Services 2.0
Discovering the 2 in Alfresco Search Services 2.0
 
Alfresco Security Best Practices Guide
Alfresco Security Best Practices GuideAlfresco Security Best Practices Guide
Alfresco Security Best Practices Guide
 
From zero to hero Backing up alfresco
From zero to hero Backing up alfrescoFrom zero to hero Backing up alfresco
From zero to hero Backing up alfresco
 
Guide to alfresco monitoring
Guide to alfresco monitoringGuide to alfresco monitoring
Guide to alfresco monitoring
 
Alfresco Share - Recycle Bin Ideas
Alfresco Share - Recycle Bin IdeasAlfresco Share - Recycle Bin Ideas
Alfresco Share - Recycle Bin Ideas
 
How to migrate from Alfresco Search Services to Alfresco SearchEnterprise
How to migrate from Alfresco Search Services to Alfresco SearchEnterpriseHow to migrate from Alfresco Search Services to Alfresco SearchEnterprise
How to migrate from Alfresco Search Services to Alfresco SearchEnterprise
 
Sizing your alfresco platform
Sizing your alfresco platformSizing your alfresco platform
Sizing your alfresco platform
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy Behaviours
 
Alfresco node lifecyle, services and zones
Alfresco node lifecyle, services and zonesAlfresco node lifecyle, services and zones
Alfresco node lifecyle, services and zones
 
Alfresco 5.2 REST API
Alfresco 5.2 REST APIAlfresco 5.2 REST API
Alfresco 5.2 REST API
 
Jose portillo dev con presentation 1138
Jose portillo   dev con presentation 1138Jose portillo   dev con presentation 1138
Jose portillo dev con presentation 1138
 
Supporting Apache HBase : Troubleshooting and Supportability Improvements
Supporting Apache HBase : Troubleshooting and Supportability ImprovementsSupporting Apache HBase : Troubleshooting and Supportability Improvements
Supporting Apache HBase : Troubleshooting and Supportability Improvements
 
Alfresco Backup and Disaster Recovery White Paper
Alfresco Backup and Disaster Recovery White PaperAlfresco Backup and Disaster Recovery White Paper
Alfresco Backup and Disaster Recovery White Paper
 
HBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ Salesforce
 
Moving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco RepositoryMoving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco Repository
 
Architectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondArchitectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyond
 
The Impala Cookbook
The Impala CookbookThe Impala Cookbook
The Impala Cookbook
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public API
 
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
 

Destaque

Alfresco security best practices CHECK LIST ONLY
Alfresco security best practices CHECK LIST ONLYAlfresco security best practices CHECK LIST ONLY
Alfresco security best practices CHECK LIST ONLYToni de la Fuente
 
20130925 alfresco study18performancetuning
20130925 alfresco study18performancetuning20130925 alfresco study18performancetuning
20130925 alfresco study18performancetuningTakeshi Totani
 
Alfresco Security Best Practices 2014
Alfresco Security Best Practices 2014Alfresco Security Best Practices 2014
Alfresco Security Best Practices 2014Toni de la Fuente
 
10 things you need to know to deliver a successful Alfresco project
10 things you need to know to deliver a successful Alfresco project10 things you need to know to deliver a successful Alfresco project
10 things you need to know to deliver a successful Alfresco projectSymphony Software Foundation
 
Alfresco 4: Scalability and Performance
Alfresco 4: Scalability and PerformanceAlfresco 4: Scalability and Performance
Alfresco 4: Scalability and PerformanceAlfresco Software
 
Alfresco Day Roma 2015: Big Repository
Alfresco Day Roma 2015: Big RepositoryAlfresco Day Roma 2015: Big Repository
Alfresco Day Roma 2015: Big RepositoryAlfresco Software
 
Monitoring Alfresco with Nagios/Icinga
Monitoring Alfresco with Nagios/IcingaMonitoring Alfresco with Nagios/Icinga
Monitoring Alfresco with Nagios/IcingaToni de la Fuente
 
Alfrescoクラスタリング入門
Alfrescoクラスタリング入門Alfrescoクラスタリング入門
Alfrescoクラスタリング入門Ashitaba YOSHIOKA
 
Alfresco Tech Talk Live - REST API of the Future
Alfresco Tech Talk Live - REST API of the Future Alfresco Tech Talk Live - REST API of the Future
Alfresco Tech Talk Live - REST API of the Future Gavin Cornwell
 
Tech Talk Live - 5.2 REST APIs
Tech Talk Live - 5.2 REST APIsTech Talk Live - 5.2 REST APIs
Tech Talk Live - 5.2 REST APIsGavin Cornwell
 
Alfresco Day Roma 2015: Alfresco Activiti
Alfresco Day Roma 2015: Alfresco ActivitiAlfresco Day Roma 2015: Alfresco Activiti
Alfresco Day Roma 2015: Alfresco ActivitiAlfresco Software
 
Alfresco勉強会20120829: やさしいShareダッシュレットの作り方
Alfresco勉強会20120829: やさしいShareダッシュレットの作り方Alfresco勉強会20120829: やさしいShareダッシュレットの作り方
Alfresco勉強会20120829: やさしいShareダッシュレットの作り方linzhixing
 
Actions rules and workflow in alfresco
Actions rules and workflow in alfrescoActions rules and workflow in alfresco
Actions rules and workflow in alfrescoAlfresco Software
 
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...J V
 
Alfresco Tech Talk Live #92 - Model Management
Alfresco Tech Talk Live #92 - Model ManagementAlfresco Tech Talk Live #92 - Model Management
Alfresco Tech Talk Live #92 - Model ManagementMike Farman
 
Alfresco 4.0 - A Complete Introduction
 Alfresco 4.0 - A Complete Introduction Alfresco 4.0 - A Complete Introduction
Alfresco 4.0 - A Complete IntroductionAjeet Singh
 
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + Demo
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + DemoAlfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + Demo
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + DemoAlfresco Software
 

Destaque (19)

Storage and Alfresco
Storage and AlfrescoStorage and Alfresco
Storage and Alfresco
 
Alfresco security best practices CHECK LIST ONLY
Alfresco security best practices CHECK LIST ONLYAlfresco security best practices CHECK LIST ONLY
Alfresco security best practices CHECK LIST ONLY
 
20130925 alfresco study18performancetuning
20130925 alfresco study18performancetuning20130925 alfresco study18performancetuning
20130925 alfresco study18performancetuning
 
Alfresco Security Best Practices 2014
Alfresco Security Best Practices 2014Alfresco Security Best Practices 2014
Alfresco Security Best Practices 2014
 
10 things you need to know to deliver a successful Alfresco project
10 things you need to know to deliver a successful Alfresco project10 things you need to know to deliver a successful Alfresco project
10 things you need to know to deliver a successful Alfresco project
 
Alfresco 4: Scalability and Performance
Alfresco 4: Scalability and PerformanceAlfresco 4: Scalability and Performance
Alfresco 4: Scalability and Performance
 
Alfresco Day Roma 2015: Big Repository
Alfresco Day Roma 2015: Big RepositoryAlfresco Day Roma 2015: Big Repository
Alfresco Day Roma 2015: Big Repository
 
Monitoring Alfresco with Nagios/Icinga
Monitoring Alfresco with Nagios/IcingaMonitoring Alfresco with Nagios/Icinga
Monitoring Alfresco with Nagios/Icinga
 
Alfrescoクラスタリング入門
Alfrescoクラスタリング入門Alfrescoクラスタリング入門
Alfrescoクラスタリング入門
 
Alfresco Tech Talk Live - REST API of the Future
Alfresco Tech Talk Live - REST API of the Future Alfresco Tech Talk Live - REST API of the Future
Alfresco Tech Talk Live - REST API of the Future
 
Tech Talk Live - 5.2 REST APIs
Tech Talk Live - 5.2 REST APIsTech Talk Live - 5.2 REST APIs
Tech Talk Live - 5.2 REST APIs
 
Alfresco Day Roma 2015: Alfresco Activiti
Alfresco Day Roma 2015: Alfresco ActivitiAlfresco Day Roma 2015: Alfresco Activiti
Alfresco Day Roma 2015: Alfresco Activiti
 
Alfresco勉強会20120829: やさしいShareダッシュレットの作り方
Alfresco勉強会20120829: やさしいShareダッシュレットの作り方Alfresco勉強会20120829: やさしいShareダッシュレットの作り方
Alfresco勉強会20120829: やさしいShareダッシュレットの作り方
 
Actions rules and workflow in alfresco
Actions rules and workflow in alfrescoActions rules and workflow in alfresco
Actions rules and workflow in alfresco
 
Alfresco content model
Alfresco content modelAlfresco content model
Alfresco content model
 
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
 
Alfresco Tech Talk Live #92 - Model Management
Alfresco Tech Talk Live #92 - Model ManagementAlfresco Tech Talk Live #92 - Model Management
Alfresco Tech Talk Live #92 - Model Management
 
Alfresco 4.0 - A Complete Introduction
 Alfresco 4.0 - A Complete Introduction Alfresco 4.0 - A Complete Introduction
Alfresco 4.0 - A Complete Introduction
 
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + Demo
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + DemoAlfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + Demo
Alfresco Day Amsterdam 2015 - Alfresco One Product Suite Update + Demo
 

Semelhante a Alfresco tuning part2

Benchmarking Solr Performance at Scale
Benchmarking Solr Performance at ScaleBenchmarking Solr Performance at Scale
Benchmarking Solr Performance at Scalethelabdude
 
Solr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approachSolr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approachAlexandre Rafalovitch
 
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...Lucidworks
 
cache concepts and varnish-cache
cache concepts and varnish-cachecache concepts and varnish-cache
cache concepts and varnish-cacheMarc Cortinas Val
 
Overview of the ehcache
Overview of the ehcacheOverview of the ehcache
Overview of the ehcacheHyeonSeok Choi
 
[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching Solutions[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching SolutionsITviec
 
Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsDavide Carnevali
 
Strata London 2019 Scaling Impala.pptx
Strata London 2019 Scaling Impala.pptxStrata London 2019 Scaling Impala.pptx
Strata London 2019 Scaling Impala.pptxManish Maheshwari
 
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionColdFusionConference
 
JVM Garbage Collection Tuning
JVM Garbage Collection TuningJVM Garbage Collection Tuning
JVM Garbage Collection Tuningihji
 
Real time analytics using Hadoop and Elasticsearch
Real time analytics using Hadoop and ElasticsearchReal time analytics using Hadoop and Elasticsearch
Real time analytics using Hadoop and ElasticsearchAbhishek Andhavarapu
 
Caching principles-solutions
Caching principles-solutionsCaching principles-solutions
Caching principles-solutionspmanvi
 
Ippevent : openshift Introduction
Ippevent : openshift IntroductionIppevent : openshift Introduction
Ippevent : openshift Introductionkanedafromparis
 
Strata London 2019 Scaling Impala
Strata London 2019 Scaling ImpalaStrata London 2019 Scaling Impala
Strata London 2019 Scaling ImpalaManish Maheshwari
 
Supercharging Content Delivery with Varnish
Supercharging Content Delivery with VarnishSupercharging Content Delivery with Varnish
Supercharging Content Delivery with VarnishSamantha Quiñones
 
Centralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stackCentralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stackRich Lee
 
Container Performance Analysis Brendan Gregg, Netflix
Container Performance Analysis Brendan Gregg, NetflixContainer Performance Analysis Brendan Gregg, Netflix
Container Performance Analysis Brendan Gregg, NetflixDocker, Inc.
 
Understand oracle real application cluster
Understand oracle real application clusterUnderstand oracle real application cluster
Understand oracle real application clusterSatishbabu Gunukula
 

Semelhante a Alfresco tuning part2 (20)

Benchmarking Solr Performance at Scale
Benchmarking Solr Performance at ScaleBenchmarking Solr Performance at Scale
Benchmarking Solr Performance at Scale
 
Solr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approachSolr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approach
 
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
 
cache concepts and varnish-cache
cache concepts and varnish-cachecache concepts and varnish-cache
cache concepts and varnish-cache
 
Overview of the ehcache
Overview of the ehcacheOverview of the ehcache
Overview of the ehcache
 
[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching Solutions[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching Solutions
 
Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limits
 
Strata London 2019 Scaling Impala.pptx
Strata London 2019 Scaling Impala.pptxStrata London 2019 Scaling Impala.pptx
Strata London 2019 Scaling Impala.pptx
 
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
 
JVM Garbage Collection Tuning
JVM Garbage Collection TuningJVM Garbage Collection Tuning
JVM Garbage Collection Tuning
 
Real time analytics using Hadoop and Elasticsearch
Real time analytics using Hadoop and ElasticsearchReal time analytics using Hadoop and Elasticsearch
Real time analytics using Hadoop and Elasticsearch
 
Caching principles-solutions
Caching principles-solutionsCaching principles-solutions
Caching principles-solutions
 
Ippevent : openshift Introduction
Ippevent : openshift IntroductionIppevent : openshift Introduction
Ippevent : openshift Introduction
 
Strata London 2019 Scaling Impala
Strata London 2019 Scaling ImpalaStrata London 2019 Scaling Impala
Strata London 2019 Scaling Impala
 
CvmFS Workshop
CvmFS WorkshopCvmFS Workshop
CvmFS Workshop
 
Supercharging Content Delivery with Varnish
Supercharging Content Delivery with VarnishSupercharging Content Delivery with Varnish
Supercharging Content Delivery with Varnish
 
Centralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stackCentralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stack
 
Memory model
Memory modelMemory model
Memory model
 
Container Performance Analysis Brendan Gregg, Netflix
Container Performance Analysis Brendan Gregg, NetflixContainer Performance Analysis Brendan Gregg, Netflix
Container Performance Analysis Brendan Gregg, Netflix
 
Understand oracle real application cluster
Understand oracle real application clusterUnderstand oracle real application cluster
Understand oracle real application cluster
 

Último

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Último (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Alfresco tuning part2

  • 1. Tech Talk Live Alfresco Performance Tuning – Part 2
  • 2. Speaker Bio Luis Cabaceira – Principal Consultant at Alfresco
  • 3. Agenda 1 – Jvm tuning 2 – Garbage collection analisis 2 – Caches 3 - Alfresco is running slow.. where to start ?
  • 4. 1 – JVM Tuning • Tune the memory and garbage collection parameters for the JVM to be appropriate for your situation. Enable GC logs and analyze them. • Solr is more memory intensive than Alfresco • Alfresco consumes memory on the repository L2 Cache, Alfresco system memory. • Tuning will vary depending if you are running Alfresco and Solr on the same server and same Jvm. • General good settings for Alfresco (assuming a server with 16GB RAM) -Xms8000m –Xmx12000m -XX:MaxPermSize=512m -Xss1024K -XX:-DisableExplicitGC -XX:NewSize=2G -XX:+UseCodeCacheFlushing -Dsun.security.ssl.allowUnsafeRenegotiation=true -Djava.awt.headless=true • Extra Settings found on large Alfresco implementations (solr better with CMS) -XX:+UseConcMarkSweepGC –server -XX:+CMSIncrementalMode -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:+UseCompressedOops -XX:+CMSClassUnloadingEnabled
  • 5. 1 – Garbage Collector Tuning A regular analysis to the garbage collection logs is also a known best practice and the health of the Garbage collection engine is normally related with the overall effectiveness of memory usage across the system. This is valid for Alfresco, Solr and any possible client that is part of the deployment. The best practice is to choose an analysis timeframe which is know to be the period when the system is most heavily used and monitor the garbage collection operations that happened during that period. There are some available tools to analyze garbage collection logs, but the one I think generates a more accurate report is Censum from Jclarity. It’s possible to download a trial version of this tool as use it to analyze the GC logs during 7 days. You can also GCViewer, its opensource and a very useful tool. https://github.com/chewiebug/GCViewer
  • 6. 1 – Garbage Collector common problems 1 - Look for periodic calls to system.gc(); - add the -XX:+DisableExplicitGC flag 2 - Look for high pauses High pauses from garbage collection can be an indication of a number of problems. A High Percentage Of Time spent paused in GC may mean that the heap has been under-sized, causing frequent full GC activity. A high Longest Pause in Seconds may be an indication that the heap is too large, causing long individual garbage collections. 3 - Look for premature promotion of objects Premature promotion is a condition that occurs when objects that should be collected in a young generation pool (Eden or The Survivor "From" space) are instead promoted to Tenured (Old) space. A consequence of premature promotion is that this places additional pressure on Tenured space, which will result in more frequent collections of Tenured. More frequent collections in Tenured collector will interfere with your application's performance.Look for premature
  • 7. 2 – Caches (ehcache/hazzlecast) • Alfresco now uses hazelecast clustering and caching • Database is now used for cluster discovery • Removing a node from the cluster is now configured on the alfresco-global.properties • alfresco.cluster.enabled=false • The repository caches are separated in 2 different levels: • L1 = The transactional cache (TransactionalCache.java) • L2 = Hazelcast distributed Cache (>4.2.X) • The level 1 cache commits to L2 cache. • Tracing cache usage is very important for tuning • Adding the following options to your JVM will expose the jmx features of hazelcast. • -Dhazelcast.jmx=true -Dhazelcast.jmx.detailed=true
  • 8. 2 – Caches (ehcache/hazzlecast) • In Alfresco, hazelcast works with factories that allow the creation of caches • You can define your own caches
  • 9. 2 – Hazzlecast cache mechanisms With Hazelcast the cache is distributed across the clustering members, doing a more linear distribution of the memory usage. In the alfresco implementation you have more mechanisms available to define different cache cluster types. Fully Distributed This is the normal value for a hazelcast cache. Cache values (key value pairs) will be evenly distributed across cluster members. Leads to more remote lookups when a get request is issued and that value is present in other node (remote). Local cache Some caches you may not actually want them to be clustered at all (or distributed), so this option works as a unclustered cache. Invalidating This is a local (cluster aware) cache that sets up a messenger that sends invalidation messages messages to the remaining cluster nodes if you updated an item in the cache, much similar as the old eh-cache mechanisms.
  • 10. 2 – Tuning hazelcast To perform a cache tuning exercise we need to analyze 3 relevant factors : - type of data - how often it changes - number of gets compared to the number of writes If we can identify caches that the correspondent values do not change often, its worth to try and set them to invalidating, and check the performance results. Note that in distributed-caches, when we have a lot a remote gets, if the objects that are being stored are big, the remote get operation its going to be slow. This is mainly because the object is serialized and it needs to be un-serialized before its content is made available and that operation can take some time depending on the size of the object.
  • 11. 2 – Tuning hazelcast Caches values can be configured/overridden on alfresco-global.properties • cache.aclSharedCache.tx.maxItems=40000 • cache.aclSharedCache.maxItems=100000 • cache.aclSharedCache.timeToLiveSeconds=0 • cache.aclSharedCache.maxIdleSeconds=0 • cache.aclSharedCache.cluster.type=fully-distributed • cache.aclSharedCache.backup-count=1 • cache.aclSharedCache.eviction-policy=LRU • cache.aclSharedCache.eviction-percentage=25 • cache.aclSharedCache.merge-policy=hz.ADD_NEW_ENTRY Look for : WARN [cache.node.nodesTransactionalCache] Transactional update cache ‘org.alfresco.cache.node.nodesTransactionalCache’ is full (125000).
  • 12. 3 – Alfresco is running Slow (Where to Start) • First we need to identify what/where is alfresco running Slow • Is it Alfresco that is slow ? • Page Rendering ? • Dashboard takes a long time to render ? • Login takes long ? • Browsing the Repository is very slow (Permission evaluation ? ) • Uploading content performance (bulk import, migration, rules) • Search is slow • Workflow problems • Cpu is 100% • Memory is exhausted • Cluster communication problem ?
  • 13. 3 – Alfresco is running Slow (Where to Start) • Investigating, “Follow the Request” • Is apache or a physical load balancer being used in front on Alfresco ? • Are there enough connections/threads/workers available for the existing load. • Any timeouts on the apache/lb logs ? • Check overall performance of apache. • What are the tomcat threads doing • Use support tools, check real time thread dumps, see behaviors/actions. • Run a series of jstack commands and check what the threads are doing • What is consuming the memory • Extract heapdumps and jstacks and check what is occupying memory
  • 14. 3 – Alfresco is running Slow (Where to Start) • “Questioning the DB” – Key performance indicators • Response time • Blocked queries • Top queries by frequency and / or time • Slow Queries • Average number of Transactions per second (during a peak period) • Number of Connections (during a peak period) • Database server health (Cpu, memory, IO, Network) • Indexes Size and Health • Inspect JDBC access to the database • Jdbcspy • Log4jdbc • Javamelody
  • 15. 3 – Alfresco is running Slow (Where to Start) • “Questioning the Storage” – Key performance indicators • I/O performance (iometer, hdparm) • Check both • Alfresco Content Store storage • Solr Indexes Storage(should be faster) • Run EVT, last test will check the speed of the indexes disk storage and produce a meaningful report. • Checking Indexes disk free space (merging processes require at least 40% free)
  • 16. 3 – Alfresco is running Slow (Where to Start) • “Questioning Alfresco” – Key performance indicators • Cpu Usage, Memory Usage, Threads • Check alfresco.log for ERRORS, WARN • Can use elasticSearch to aggregate all relevant logs and do a common search • Enable Transformations log, check for transformation ERRORS • Verify transformation limits • Enable GC logs on the alfresco JVM and analise GC performance • Verify Content policies, rules, scheduled tasks, integrations and customizations • Analyze use case, and identify the log classes can can produce relevant information while in DEBUG mode. Use support tools for real time troubleshooting.
  • 17. 3 – Alfresco is running Slow (Where to Start) • “Questioning Solr” – Key performance indicators • Cpu Usage, Memory Usage, Threads • Check solr.log for ERRORS, WARN • Can use elasticSearch to aggregate all relevant logs and do a common search • Enable Query logs, check for ERRORS • Verify Solr statistics / cache usages • Enable GC logs on the solr JVM and analyze GC performance • Verify merging problems, slow disks, insufficient free space, configuration problem. • Analyze search use case, blacklist some mime-types, keep your index small, only index what you will search for.

Notas do Editor

  1. Tune the memory and garbage collection parameters for the JVM to be appropriate for your situation. Tuning and deeper inspection of the Java Virtual Machine is a very important activity for java-based applications. In an enterprise-class installation of Alfresco where often one or multiple clustered instances are running, huge amounts of data are stored with a lot of user access that cause often a http overload. Alfresco can be optimized by a careful and meticulous tuning of the hardware resources, specifically cpu and ram used by the JVM.
  2. There are some available tools to analyze garbage collection logs, but the one I think generates a more accurate report is Censum from Jclarity. It’s possible to download a trial version of this tool as use it to analyze the GC logs during 7 days. Censum is a nice tool that takes log files from the complex Java™ (JVM) garbage collection sub-system and gives you meaningful answers by providing clear infographics and making recommendations based on the analysis results. You can also use a completely free tool like GCViewer, it does not provide so the same recommendations but it’s still a very useful tool. https://github.com/chewiebug/GCViewer
  3. 1 ) Periodic calls to trigger a Full GC either via System.gc() or Runtime.gc() preempt the natural flow of GC and corrupt the numerous metrics that are used to help the collectors run as optimally as is possible. There are many possible sources for these calls, which may include: An RMI call from a remote JVM. A Timer, TimerTask or ScheduleExecutor thread. A cron or Quartz job. Some external trigger causing the Memory MXBean to trigger a Full GC. add the -XX:+DisableExplicitGC flag 3) There are a number of possible causes for this problem: The Eden and/or Survivor spaces may be too small. The -XX:MaxTenuringThreshold flag may have been set too low.   There are number of possible solutions for this problem:   Alter the size of the young space via the -XX:NewRatio property. Alter the size of Survivor Spaces (relative to Eden) via the -XX:SurvivorRatio=<N> property using the information provided by the Tenuring graphs. This flag works to divide Young into N + 2 chunks. N chunks will be assigned to Eden and 1 chunk each will be assigned to the To and From spaces respectively. Alter the -XX:MaxTenuringThreshold property.   Note: enlarging Survivor spaces takes will result in less space being assigned to Eden. The size of Eden times your allocation rate yields the frequency of collections in young generation. Be sure to increase the size of young so that Eden stays the same size in order to avoid increasing the number of young generational collections.
  4. Tracing Hazelcast usage Transactional Caches (Level 1) Alfresco version 5.0 introduced a way to trace the transactional cache usage (much similar to the previous ehcache tracing mechanism). Unfortunately that tracing is not available in version 4.2.X, one way to get this feature would be to open a support ticket requesting a back-port of this feature. HazelCast caches (Level 2) Using hazelcast mancenter you can trace the L2 cache usage, for more information check http://docs.alfresco.com/4.2/tasks/hazelcast-setup.html
  5. Cache-Factory - Allows for the creation of caches Messenger-Factory - Abstraction over the hazelcast topic (published subscribe messaging system) LockStore Factory - Where in-memory locks are kept You can define your own caches as per the example below   <bean name=“contentDataSharedCache" factory-bean=“cacheFactory" factory-method="createCache"> <constructor-arg value="cache.customContDataCache"/> </bean>   cache.customContDataCache.maxItems=130000 cache.customContDataCache.timeToLiveSeconds=0 cache.customContDataCache.maxIdleSeconds=0 cache.customContDataCache.cluster.type=fully-distributed cache.customContDataCache.backup-count=1 cache.customContDataCache.eviction-policy=LRU cache.customContDataCache.eviction-percentage=25 cache.customContDataCache.merge-policy=hz.ADD_NEW_ENTRY   Note that there is no corresponding hazelcast-tcp.xml entry for the custom cache, the factory does all the configuration programmatically using the name of the cache customContDataCache as a root to discover the remaining configuration properties.
  6. Invalidating Can be useful to store something that its not serializable, because all the values stored in a hazelcast cache must be serializable. That is the way hazlecast send the information to the member its going to be stored on. If you got a cache where there is an enormous number of reads and very rare writes, using a invalidating cache can be the best approach, very likely to the way ehcache used to work. This was introduced also because there were some non serializable values in alfresco that could not reside on a fully-distributed cache. The way we define the caches (on our cache.properties file is as follows) cache.aclSharedCache.tx.maxItems=40000 cache.aclSharedCache.maxItems=100000 cache.aclSharedCache.timeToLiveSeconds=0 cache.aclSharedCache.maxIdleSeconds=0 cache.aclSharedCache.cluster.type=fully-distributed cache.aclSharedCache.backup-count=1 cache.aclSharedCache.eviction-policy=LRU cache.aclSharedCache.eviction-percentage=25 cache.aclSharedCache.merge-policy=hz.ADD_NEW_ENTRY   Note the notion of cache backups (backup-count=??), that guarantees that a distributed cache has a specific number of backups, in case of a node holding that bit of the cache dies, those caches are still accessible. The more backups you have, the more memory will be consumed.
  7. We also need to consider, that in distributed caches, when there are a lot of remote gets the network traffic will increase. On the other hand, if we choose and invalidation cache mechanism and the caches are changing often, the Invalidation messages can also be a single point of network stress. So overall it’s all about analyzing the trade-offs of each mechanism and to choose the more appropriate for each use case.
  8. LRU = Least Recently Used LFU = Least Frequently Used For debugging purposes, you can disable the L2 cache. The database will keep working, but at a slower rate.The Level 2 (L2) cache provides out-of-transaction caching of Java objects inside the Alfresco system. The L2 cache objects are stored in memory attached to the application scope of the server. Sticky sessions must be used to keep a user that has already established a session on one server for the entire session. By default, the cache replication makes use of RMI to replicate changes to all nodes in the cluster using the Peer Cache Replicator. Each replicated cache member notifies all other cache instances when its content has changed, in case of invalidating cache types. Fully distributes is a different approach introduced with hazelcast. If you have issues with the replication of information in clustered systems, that is, the cache cluster test fails, you may want to confirm this by setting the following properties to true in the alfresco-global.properties file as follows : system.cache.disableMutableSharedCaches=true system.cache.disableImmutableSharedCaches=true An important indicator that you need to increase your caches is when you see messages like the ones below on your alfresco.log file indicating that some specific caches are full. 13:25:12,901 WARN [cache.node.nodesTransactionalCache] Transactional update cache ‘org.alfresco.cache.node.nodesTransactionalCache’ is full (125000). 13:25:14,182 WARN [cache.node.aspectsTransactionalCache] Transactional update cache ‘org.alfresco.cache.node.aspectsTransactionalCache’ is full (65000). 13:25:14,214 WARN [cache.node.propertiesTransactionalCache] Transactional update cache ‘org.alfresco.cache.node.propertiesTransactionalCache’ is full (65000).
  9. Let’s follow the money  , In this case we “Follow the Request”
  10. jstack prints Java stack traces of Java threads for a given Java process or core file or a remote debug server. For each Java frame, the full class name, method name, 'bci' (byte code index) and line number, if available, are printed. Your repository can get easier maxed out if you are setting the application server to process more connections/threads than the machine can handle it. Consider first “bottlenecking”/reducing the number of application server connector’s threads in order each call gets CPU and memory resources needed to perform properly, so that your system gets a more stable response time over peak usages (scale the database connection pool maximum accordingly as mentioned before). You may need to scale up (or scale out your cluster) for handling a bigger number of calls during peak usages in place of just increasing the number of threads of one node application server.
  11. Alfresco (like all Java applications) uses JDBC to access the database, inspecting JDBC can yield useful information for developers, the tools below can be used to inspect JDBC.   jdbcspy Log4jdbc – more active development, easier to configure (IMHO) Regular maintenance and tuning of the Alfresco database is necessary. Specifically, all of the database servers that Alfresco supports require at the very least that some form of index statistics maintenance be performed at frequent, regular intervals to maintain optimal Alfresco performance.   Index maintenance can have a severe impact on Alfresco performance while in progress, hence it needs to be discussed with your project team and scheduled appropriately. Make sure your database is tuned for your usage patterns: high throughput, long running queries, decision support, mixed usage. Finally check that the specific supported database being used is configured properly and according to Alfresco documentation. In regards to latency in communication, the golden rule is that the response time from the DB in general, should be around 4ms or lower. If the amount of nodes and the expected concurrency increases, for example when the database grows to more than 20 million nodes and the number of concurrent users increase considerably we suggest adopting an active-active database cluster approach.  
  12. Understand JMX configuration and priority Alfresco allows for setting most of its configuration through JMX (or the Share admin console) in hot without need to restart and in a cluster aware mode. This is very handy for solving issues in hot and testing in general. But beware that those settings are stored in the database and have priority over the static settings (the file configurations on your server in general in alfresco-global.properties) will be active again when you restart the system.   This has a drawback, which is the fact that your static configuration may not reflect the real configuration state of your system what can make life complicated for system administrators in certain circumstances (especially newcomers). Keep your static configuration up to date You should consider as a best practice keeping the static files up to date with your configuration and also try to make sure they are as much as possible the ones being actively configuring your system. This would include in general reverting any configuration setup through JMX as soon as possible in order the system uses again the static configuration with whatever values you find appropriate.