My Postgres is behaving badly – how can I tune it?
If you have a large JON environment or are collecting a lot of metric data, you may want to turn on auto-vacuum to ensure the database utilizes its available disk space efficiently. You do this by performing the following steps: • Shutdown JON Server • If you are using the embedded Postgres, take note that “jon-server.[sh,bat] stop” also shuts down the Postgres DB • Execute the following SQL using a Postgres tool like pgAdmin (this may take a very long time to run): • If you are using the embedded Postgres, start the DB via bin/db_start.sh and then use bin/db_psql.sh • vacuum full verbose; • Shutdown your Postgres database so you can reconfigure it • If you are using the embedded Postgres, its bin/db_stop.sh but stopping the JON Server stops the DB for you automatically • Edit the postgresql.conf file in order to turn on auto vacuum: • If you are using the embedded Postgres, this file is located at hqdb/data/postgresql.conf • autovacuum = on • Edit the postgresql.conf file and bump up