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.
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.
- Checkout
- Build/Assemble
- 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
The instructions for the IDE setup can be found in the official micronaut documentation.
- Micronaut - The central framework
- Gradle - Build and Dependency Management
- Kotlin - The programming language
External contribution are welcome.
This project is licensed under the MIT License - see the LICENSE file for details.