/pgtune-1

pgTune - Tune your PostgreSQL up to eleven

Primary LanguageKotlinMIT LicenseMIT

pgtune

Pgtune - tuning PostgreSQL config by your hardware. Based upon pgtune.

Unlike pgtune this project provides an REST interface and so can be used for automated setups.

Usage

This project is deployed at https://pgtune.sainth.de/api/ and the OpenAPI specificaction can be reached at https://pgtune.sainth.de/api/swagger/pgtune-1.0.yml.

To use pgtune send the input parameters as JSON object, for example:

curl -d '{"dbVersion": "V11", "osType": "Linux", "dbApplication": "WEB", "ram": { "memory" : 4, "unit" : "GB"}, "dataStorage": "SSD"}' -H "Content-Type: application/json" -X POST https://pgtune.sainth.de/api/configuration

The used formulas can be found in the wiki.

Getting Started

  1. Checkout
  2. Build/Assemble
  3. Start
git clone https://github.com/sainth-/pgtune.git
cd pgtune
./gradlew assemble
java -jar ./build/libs/pgtune-1.0-all.jar

pgtune runs typically on port 8080. To change this add the following lines to src/main/resources/application.yml:

micronaut:
  server:
    port: 8081

Or to change this during runtime add these lines in an files e.g. config.yml and add these config.yml as start parameter: java -Dmicronaut.config.files=config.yml -jar pgtune.jar

IDE Setup

The instructions for the IDE setup can be found in the official micronaut documentation.

Built With

  • Micronaut - The central framework
  • Gradle - Build and Dependency Management
  • Kotlin - The programming language

Contributing

External contribution are welcome.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments