Skip to content

Latest commit

 

History

History
73 lines (51 loc) · 3.05 KB

Simulate-DB-Lock.md

File metadata and controls

73 lines (51 loc) · 3.05 KB

Simulate DB Lock

English Korean

This article describes how to simulate and monitor DB update lock with Scouter environment. Installation and configuration guide is here.

Installation Guide

  1. JDK7 Installation ( Getting Started )

  2. HSQLDB Installation ( Getting Start Profile SQL )

  3. Tomcat Installation ( Getting Started )

  4. JMeter Installation ( Getting Start Profile SQL )

  5. Scouter Installation ( Getting Started )

  6. Tomcat Configuration

  7. Startup all together

    • HSQLDB
     runServer.bat --database.0 file:mydb --dbname.0 xdb
  • Tomcat
set JAVA_HOME=c:\java7
set JAVA_OPTS=-javaagent:c:\scouter\agent\scouter.agent.jar
startup.bat
  • Scouter Server
  • Scouter Client
  1. Scouter Client monitoring

Run JMeter (Generating load)

Do load test about sql.jsp via JMeter.

Left Window >> Test Plan (right mouse button) >> Add >> Threads(Users) >> SetUp Thread group

Set Users

setUp Thread group(right mouse button) >> Add >> Sampler >> HTTP Request

HTTP Request

Input these parameters,

  • server ip : 127.0.0.1
  • port : 8080
  • Path : /sql.jsp

You can see the screen like below after clicking run button on JMeter. Scouter

JMeter plugins : http://jmeter-plugins.org

Simulate DB Update Lock

DB update lock will occur on lock.jsp page. Call this page with parameter 't' value to determine locking time.

lock.jsp

You can see DB lock information at XLog and other chart on Scouter Client.

Scouter

There are two steps to identify which business is making DB lock problem. First is checking active service list on left bottom on Client. Two is analyzing detailed transaction information of running service. After double clicking red bar, the detailed transaction information popup is displayed.

active list

active detail

After the termination of service, profiles of tested transaction will be displayed on XLog chart. profile