I would not edit these config files, instead use the ‘Advanced Settings’ UI of the lightning app. Both these options are listed there under ‘Optimization’.
If you don’t want to compact on each restart, look for ‘Database Re-compaction Delay’ and set how many hours need have passed before the next compaction is permitted (on reboot).