{"id":4201,"date":"2017-06-12T05:51:09","date_gmt":"2017-06-12T00:21:09","guid":{"rendered":"\/?p=4201"},"modified":"2020-08-17T11:45:56","modified_gmt":"2020-08-17T06:15:56","slug":"performance-troubleshooting","status":"publish","type":"post","link":"https:\/\/www.argildx.us\/technology\/performance-troubleshooting\/","title":{"rendered":"Optimize Your AEM Website with Performance Troubleshooting Tips"},"content":{"rendered":"

During the initial development phase of a website, not much attention is given to the performance of a website i.e. how the website will respond to millions of requests. Performance means the time your website takes to respond to visitors’ requests. In the later stages of implementation you need to optimize the website to maximize the performance goals. In this article, we will discuss some measures to optimize your AEM website, which is to increase the page load time so as to provide good experience to users.<\/p>\n

Performance Optimization Methodology<\/h5>\n

Five rules that should be followed to avoid performance issues in AEM sites.<\/p>\n

    \n
  1. \n
    Planning for Optimization<\/h5>\n

    A project should first be soft-launched to a limited audience in order to gather real-life experience. When the website is live, it is the time when you experience real load on your system.<\/li>\n

  2. \n
    Simulate Reality<\/h5>\n

    After the launch of your website, if there are some performance issues, it means load and performance tests<\/u><\/a> did not simulate reality closely enough. \u201cReal\u201d means real traffic, real content size and real code.<\/li>\n

  3. \n
    \u00a0Establish Solid Goals<\/h5>\n

    Establishing good performance goals is a tough task. It is often best to collect real life logs and benchmarks from a comparable website.<\/li>\n

  4. \n
    Stay Relevant<\/h5>\n

    Only optimize one thing at a time. If you try to do things in parallel without validating the impact of the one optimization, later it will be difficult to figure out which optimization actually helped.<\/li>\n

  5. \n
    Agile Iteration Cycles<\/h5>\n

    Performance tuning is an iterative process that involves measuring, analysis, optimization and validation until the goal is reached.<\/li>\n<\/ol>\n

    Page Loading Time<\/h5>\n
      \n
    1. 70% of the requests for pages should be responded to in less than 100ms.<\/li>\n
    2. 25% of the requests for pages should get a response within 100ms-300ms.<\/li>\n
    3. 4% of the requests for pages should get a response within 300ms-500ms.<\/li>\n
    4. 1% of the requests for pages should get a response within 500ms-1000ms.<\/li>\n
    5. No pages should respond slower than 1 second.<\/li>\n<\/ol>\n
      Performance Guidelines<\/h5>\n
        \n
      1. Mostly dispatcher caching inefficiency and use of queries in normal display templates leads to performance issues.<\/li>\n
      2. JVM and OS level tuning does not impact the performance much. Therefore, it should be performed at the very end of the optimization cycle.<\/li>\n<\/ol>\n
        AEM Website Performance Monitoring<\/h5>\n

        To optimize your AEM website performance, you need to monitor various attributes of the instance and its behavior.<\/p>\n

          \n
        1. Backup plan and Disaster recovery plan should be there.<\/li>\n
        2. An error tracking system(like bugZilla, JIRA) should be available for reporting problems.<\/li>\n
        3. File systems, Log files and Replication agents should be monitored.<\/li>\n
        4. Regularly purge workflow instances.<\/li>\n<\/ol>\n
          INTERPRETING THE REQUEST.LOG<\/h5>\n
            \n
          1. To analyze a bigger request.log, it is recommended to use rlog.jar which allows you to sort and filter according to response times.<\/li>\n
          2. AEM includes various helper tools located in : <cq-installation-dir>\/crx-quickstart\/opt\/helpers<\/li>\n
          3. One of these, rlog.jar, can be used to quickly sort request.log so that requests are displayed by duration, from longest to shortest time.<\/li>\n<\/ol>\n
            Basic Commands<\/h5>\n
              \n
            1. To open request.log in terminal :\u00a0less request.log or more request.log<\/li>\n
            2. java -jar ..\/opt\/helopers\/rlog.jar -xdev request.log | less<\/li>\n<\/ol>\n

              \"Result<\/p>\n