Skip to content
dbraga edited this page Dec 16, 2014 · 2 revisions

WikiInstallation & Setup

Prerequisites

  • Thoth running

Generating artifact and war

  1. Clone the project
  2. Use maven to generate artifact and war
mvn clean install

Run Application

  1. Copy war file inside a web server/container like Jetty or Tomcat
  2. Create a configuration file named application.properties and place it in the resource folder of your container.

Configuration

The application.properties file must contain:

  • thoth.sampling.enabled : Enable or Disable the sampling from Thoth index
  • thoth.sampling.schedule : Scheduler for the sampling
  • thoth.sampling.dir : A sampling file from each server will be temporary stored into this folder
  • thoth.merging.maxLineCount : The merged sample file will always contain not more than maxLineCount
  • thoth.merging.dir : The merged sample file will be stored into this folder
  • thoth.index.url : Url of Thoth index
  • train.dataset.location : Model train data sets will be stored into this file
  • test.dataset.location : Test data set will be stored into this file
  • model.location : Models and model threshold files will be stored in this location
  • thoth.predictor.slowquery.threshold : Threshold that determines if a query should be considered

Here's a dummy example

# Enable or Disable the sampling from Thoth index
thoth.sampling.enabled = false
# Schedule the sampling
thoth.sampling.schedule = 0 * * * * ?
# A sampling file from each server will be temporary stored into this folder
thoth.sampling.dir = /tmp/thoth/thoth-sampling/

# The merged sample file will always contain not more than maxLineCount
# it behaves like a FIFO buffer, old lines will be discarded if limit is reached
thoth.merging.maxLineCount = 50
# The merged sample file will be stored into this folder
thoth.merging.dir = /tmp/thoth/thoth-demo-merged/

# Url of thoth index
thoth.index.url=http://thoth:8983/solr/

# Model train and test data sets will be stored into these files
train.dataset.location = /tmp/thoth/thoth-model/trained
test.dataset.location = /tmp/thoth/thoth-model/tested

# Models and model threshold files will be stored in this location
model.location = /tmp/thoth/thoth-model/

thoth.sampling.ignored.servers = name-of-the-host;123456;name-of-the-core;name-of-the-pool

# Threshold that determines if a query should be considered
# fast or slow, in ms.
# QTime(Fast queries) < thoth.predictor.slowquery.threshold
# QTime(Slow queries) > thoth.predictor.slowquery.threshold
thoth.predictor.slowquery.threshold = 100