CQ Response Time Analysis




Performance Tuning


Response Time Analysis

In order to find issue with response time, good starting point is CQ request log, that can be found under /crx-quickstart/logs/request.log.

request.log looks like as follows:

22/May/2013:09:51:26 -0700 [2881] -> GET /crx/packmgr/endorsed/extjs-theme/images/crx/tree/elbow-minus-nl.gif HTTP/1.1
22/May/2013:09:51:26 -0700 [2881] <- 200 image/gif 1ms
22/May/2013:09:51:26 -0700 [2882] -> GET /crx/packmgr/endorsed/extjs-theme/images/crx/qtip/tip-sprite.gif HTTP/1.1
22/May/2013:09:51:26 -0700 [2882] <- 200 image/gif 1ms
22/May/2013:09:51:26 -0700 [2883] -> GET /crx/packmgr/endorsed/extjs
22/May/2013:09:51:26 -0700 [2883] <- 200 image/gif 2ms

It contains following information:
  • Date and time when request and response is made
  • ID of request (2881 in above example)
  • Arrow indicating request or response (-> mean request and <- mean response)
  • Then request line which contains 
    1. METHOD (GET, POST or HEAD) 
    • REQUESTED_RESOURCE 
    • PROTOCOL
  • Response Line contains 
In order to analyze response time you can either use any script to parse request log or use rlog analyzer that comes with CQ. You can find it under /crx-quickstart/opt/helpers/rlog.jar

Rlog syntax


java -jar rlog.jar 
Request Log Analyzer Version 21584 Copyright 2005 Day Management AG

Usage:
  java -jar rlog.jar [options] <filename>

Options:
  -h               Prints this usage.
  -n <maxResults>  Limits output to <maxResults> lines.
  -m <maxRequests> Limits input to <maxRequest> requests.
  -xdev            Exclude POST request to CQDE.

Using request log you can find top 10 slow request

Top Slow Request using rlog

java -jar rlog.jar logs/request.log
*Info * Parsed 986 requests.
*Info * Time for parsing: 48ms
*Info * Time for sorting: 2ms
*Info * Total Memory: 81mb
*Info * Free Memory: 79mb
*Info * Used Memory: 1mb
------------------------------------------------------
     60320ms 23/May/2013:11:01:26 -0700 302 POST /crx/packageshare/login.html text/html; charset=utf-8
     17027ms 23/May/2013:19:52:13 -0700 200 POST /etc/citrixreports/damreport/_jcr_content.html text/html
      6505ms 23/May/2013:23:14:36 -0700 200 POST /crx/packmgr/service.jsp text/plain; charset=utf8
      5943ms 23/May/2013:14:14:38 -0700 200 POST /crx/packmgr/service.jsp text/plain; charset=utf8
      4777ms 23/May/2013:11:02:26 -0700 200 GET /crx/packageshare/index.html text/html; charset=utf-8
      4507ms 23/May/2013:14:44:15 -0700 200 POST /crx/packmgr/service.jsp text/plain; charset=utf8
      4016ms 23/May/2013:14:45:27 -0700 200 POST /crx/packmgr/service.jsp text/plain; charset=utf8
      3689ms 23/May/2013:15:13:27 -0700 200 POST /crx/packmgr/service.jsp text/plain; charset=utf8
      3574ms 23/May/2013:23:20:18 -0700 200 POST /crx/packmgr/service.jsp text/plain; charset=utf8
      3534ms 23/May/2013:15:55:28 -0700 200 POST /crx/packmgr/service.jsp text/plain; charset=utf8
      3512ms 23/May/2013:15:19:53 -0700 200 POST /crx/packmgr/service.jsp text/plain; charset=utf8
      3114ms 23/May/2013:14:45:45 -0700 200 POST /etc/citrixreports/damreport/_jcr_content.html text/html

With this you can find slow requests and then work on that to find why response time is slow.


                                                                                          
 
          
 
  
Comments