Monitoring Nuxeo
JVM Garbage collector
The garbage collector attempts to reclaim memory used by objects that are no longer in use by the application.
Monitoring the garbage collector can be very useful when tuning the JVM or setting the initial heap size.
Edit $NUXEO_HOME/bin/nuxeo.conf and uncomment the following options titled "Log Garbage Collector informations into a file":
JBoss
The JBoss LoggingMonitor service can monitor specific attributes of a MBean periodically and log their value to the filename specified.
More info on the LoggingMonitor:http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossLoggingMonitor
Edit $NUXEO_HOME/bin/nuxeo.conf and add "monitor" to the nuxeo.templates parameter (uncomment it if needed).
The logging-monitor jar file is deployed by default in $JBOSS_HOME/server/default/lib.
JBoss JVM information
The "monitor" template will deploy a file named jvm-monitor-service.xml which will produce a jvm.log file.
JBoss thread pool
The "monitor" template will deploy a file named webthreads-monitor-service.xml which will produce a webthreads.log file.
Nuxeo unified datasource connection pool
The "monitor" template will deploy a file named default-ds-monitor-service.xml which will produce a nuxeo-ds.log file.
PostgreSQL
The PostgreSQL logs can be setup like in the pgFouine tutorial:
http://pgfouine.projects.postgresql.org/tutorial.html
For instance to log only request slower than 100ms change your postgresql.conf file:
After a test you can catch the vacuum output like this:
OS
The sysstat utilities are a collection of performance monitoring tools for Linux that is easy to setup.
You can monitor the system activity like this:
This will monitor the activity every 5s during 1h.
For more information on systat, visit http://pagesperso-orange.fr/sebastien.godard/.
Log analysis
logchart
This is a small script that process the following log files:
- Garbage collector logging (
gc.log) - Java Virtual Machine logging (
jvm.log) - JBoss threads logging (
webthreads.log) - NuxeoDS Data source usage (
nuxeo-ds.log) - Sysstat sar logging, cpu and disk activity (
sysstat-sar.log) - PostgreSQL logs (
pgsql.log) - PostgreSQL vacuum output (
vacuum.log)
to generate an html report with charts:
http://public.dev.nuxeo.com/~ben/logchart/monitor.html
More information on logchart can be found on the README.txt of the project:
https://hg.nuxeo.org/tools/logchart
Other reporting tools
- GCViewer a tool to visualize data produced by the garbage collector logs: http://www.tagtraum.com/gcviewer.html
- kSar a sar grapher that can produce detail PDF report of your system activity: http://ksar.atomique.net/linux.html
- pgfouine the PostgreSQL log analyzer which is used by logchart: http://pgfouine.projects.postgresql.org/