Skip to content
Oleksandr Sviridenko edited this page Aug 28, 2013 · 9 revisions

Config

The Groningen API is defined by ProgramConfiguration in src/main/protobuf/groningen_config.proto and GroningenParams in src/main/protobuf/params.proto. See protocols for details how to create your own Groningen config. The simple config file my_config.txt may have the following view:

// Sample user groningen config
user: "john"
cluster {
  cluster: "localhost"
  subject_group {
    subject_group_name: "1234" // process group ID (PGID)
    exp_settings_files_dir: "my_exp_settings" // experiment settings dir
  }
}
param_block {
  input_log_name: "STDOUT" // parse as input
  number_of_executor_threads: 3 // number of threads to monitor subjects
  duration: 30 // time in minutes that experiment is run in prod
  restart: 4 // restart threshold
  latency_weight: 100
  throughput_weight: 200
  memory_weight: 50000
  num_crossovers: 1
  mutation_prob: 0.2
  stagnant_gens: 24
  elite_count: 2
}
jvm_search_restriction: {
  gc_mode: USE_CONC_MARK_SWEEP
}

Subject group name is represented by process group identifier or PGID. All the system processes with selected PGID parameter will be tuned by Groningen. These processes have to be daemons so the tool will be able to restart them by sending SIGHUP signal.

Build and Run

Build Groningen as follows:

  1. $ java assembly:assembly
  2. $ java assembly:single

Review available command-line arguments, build config file (e.g. my_config.txt) and run Groningen. In case use you like to pass config file from command line in text format, you can do this as follows:

$ java -jar target/groningen-1.0-SNAPSHOT-jar-with-dependencies.jar
    --eventLogPrefix=groningen.log
    --configFileNames=proto:txtfile:my_config.txt

Command-Line Arguments

The groningen jar file takes a set of options:

  • --configFileNames=proto:[binfile|txtfile]:[refresh=:]<STR>[,...]

    Comma-separated list of fully-qualified paths to the configuration files (one per pipeline).

  • --datastore=<STR>

    Datastore class to use. The default is org.arbeitspferde.groningen.datastore.MemoryDatastore.

  • --eventLogPrefix=<STR>

    The path along with base string prefix for the Groningen event log.

  • --eventLogRotateBytesSize=<INT>

    The quantity in bytes that the Groningen event log may grow before being rotated. The default is 524288000.

  • --eventLogFlushIntervalSeconds=<INT>

    The number of seconds that may transpire between Groningen event log flushing. The default is 60.

  • --numShards=<INT>

    Total number of shards in this Groningen deployment. The default is 1.

  • --port=<INT>

    The port on which to service HTTP requests. The default is 80.

  • --shardIndex=<INT>

    Index of this server instance's shard in this Groningen deployment. The default is 0.

  • --startupSubservicesDeadlineSeconds=<INT>

    How long Groningen will wait at most for its subservices to start (seconds). The default is 60.

  • --shutdownSubservicesDeadlineSeconds=<INT>

    How long Groningen will wait at most for its subservices to stop (seconds). The default is 60.

Clone this wiki locally