Presentation Title
Download
Report
Transcript Presentation Title
Inspecting Alfresco – Tools and
Techniques
Nathan McMinn
Technical Consultant - Alfresco
#SummitNow
The Alfresco Stack
#SummitNow
#SummitNow
Inspection Targets
Alfresco
repository
statistics
HTTP requests,
responses
Search
performance
Cache hit
ratios, load and
active caches
Database query
performance,
blocking
JVM metrics,
CPU / GC,
threads
Index contents
/ health
#SummitNow
#SummitNow
Monitoring vs. Inspection
Certain inspection targets have overhead
when they are being inspected. These
targets might not be appropriate for longterm monitoring or may require tuning to
minimize impact.
#SummitNow
#SummitNow
The Database
Database tools will vary by vendor, but all of
Alfresco’s supported databases have tools
that can tell you the following:
1. Blocked queries
2. Top queries by frequency and / or time
#SummitNow
#SummitNow
The Database (MySQL
Examples)
MySQL has a number of great tools for
monitoring the database performance:
1. innotop
2. mytop
For other DBs, check with your DBA or
vendor, similar tools exist!
#SummitNow
#SummitNow
The Database (JDBC)
Alfresco (like all Java applications) uses
JDBC to access the database. Inspecting
JDBC can yield useful information for
developers
1. jdbcspy
2. Log4jdbc – more active development,
easier to configure (IMHO)
#SummitNow
#SummitNow
The Index
A word about the index:
It does not matter if you are using the
legacy Lucene index subsystem (pre-4.x)
or SOLR (4.x+), the underlying index is
still a Lucene index, and the same tools
can be used
#SummitNow
#SummitNow
The Index (using Luke)
1. ALWAYS work against a copy of your
index, never the actual running index
2. Luke versions can be important
#SummitNow
#SummitNow
The Index (using Luke,
continued)
What can we learn from our index w/ Luke?
1. Most common terms in our index
2. Total document count and size
3. Is the index optimized?
4. How are properties tokenized?
5. What properties are stored in the index?
6. GREAT tool for Lucene query development
#SummitNow
#SummitNow
The Index (using CheckIndex)
CheckIndex is bundled with each Lucene
distribution
1. May take time for a large index
2. -fix option may result in deleted
documents from index, re-index or restore
from backup is usually a better strategy
#SummitNow
#SummitNow
The JVM (JMX)
JMX – Java Management Extensions
Provides a way to get information about a
running JVM
Applications can expose managed beans
that provide additional information
#SummitNow
#SummitNow
JMX Monitoring Tools
JMX has broad support among Java tool
vendors:
1. jconsole / VisualVM (bundled w/Java)
2. Splunk (Via JMX Plugin)
3. SolarWinds
4. Wily Introscope
#SummitNow
#SummitNow
The Alfresco Repository
Alfresco exposes some useful information
via JMX:
1. Logged in users
2. Active and total authentication tickets
3. Database pool statistics
#SummitNow
#SummitNow
SOLR
SOLR provides more than what can be
discovered by looking at the index itself:
1. JMX bean attributes
1. Search performance
2. Cache performance
2. Health report
#SummitNow
#SummitNow
The JVM (Other Tools)
1.
2.
3.
4.
Jps
jstack
Jvmtop
HotThread (uses JMX)
#SummitNow
#SummitNow
Cache
Cache performance is important to
Alfresco’s overall performance.
Cache information can also be used to verify
that an Alfresco cluster is functioning
properly
#SummitNow
#SummitNow
Cache (EHCache)
Multiple ways to monitor EHCache metrics:
1. Alfresco EHCacheTracerJob
2. EHCache probes and monitor application
#SummitNow
#SummitNow
Cache (Hazelcast)
Hazelcast (4.2+) can be monitored much like
EHCache:
1. JMX can gather information about the
cluster from a single node
2. Hazelcast Management Center
#SummitNow
#SummitNow
HTTP Requests / Responses
Debugging proxies!
1. Charles (Windows, Mac, Linux)
2. Fiddler (Windows. Mac + Linux in Alpha)
Browser consoles (Firebug / Chrome)
#SummitNow
#SummitNow
When to Monitor
Production:
1. Ongoing polling of key performance
indicators for trend analysis
2. Specific production issue analysis
3. Configuration verification
#SummitNow
#SummitNow
When to Monitor
Test:
1. Detailed polling of key performance indicators
during load testing
2. Deeper inspection of specific points during
development and extension testing
3. Development of a deeper understanding of
Alfresco as a whole
#SummitNow
#SummitNow
What to Monitor
Production
1. Alfresco statistics (# of logged in users,
DB pool used / free connections)
2. JVM statistics (memory / CPU, GC time)
3. SOLR statistics (queries / sec, response
time)
#SummitNow
#SummitNow
Contact Info
Nathan McMinn – Technical Consultant
[email protected]
Twitter: @ntmcminn
nathanmcminn.com
#SummitNow
#SummitNow