From 183841a021a14076ac2421ef39596eb97b1374dc Mon Sep 17 00:00:00 2001 From: Robert Cheramy Date: Fri, 14 Jun 2024 10:13:55 +0200 Subject: [PATCH] document git gc Closes: #3121 --- CHANGELOG.md | 1 + docs/Outputs.md | 2 ++ docs/Troubleshooting.md | 15 +++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f21d46f0..39a1b0b80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - fixed prompt for vyos/vyatta to allow logins with non-priviliged accounts. Fixes #3111 (@h-lopez) - fixed power consumption included in ArubaOS-CX diffs starting with FL.10.13.xxx. Fixes #3142 (@terratalpi) - fixed oxidized-web getting "version not found" when fetching a version from git and no group is defined. Fixes #2222 (@robertcheramy) +- docs: run Git garbage collection to address performance issues. Fixes #3121 (@robertcheramy) ## [0.30.1 – 2024-04-12] diff --git a/docs/Outputs.md b/docs/Outputs.md index 86b20ea00..3d1cdae1b 100644 --- a/docs/Outputs.md +++ b/docs/Outputs.md @@ -63,6 +63,8 @@ output: ``` +Over time, your Git repository will expand, potentially leading to performance issues. For instructions on how to address this, see [git performance issues with large device counts](Troubleshooting.md#git-performance-issues-with-large-device-counts). + ## Output: Git-Crypt This uses the gem git and system git-crypt interfaces. Have a look at [GIT-Crypt](https://www.agwa.name/projects/git-crypt/) documentation to know how to install it. diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md index 50d757e74..14a720ad8 100644 --- a/docs/Troubleshooting.md +++ b/docs/Troubleshooting.md @@ -1,4 +1,8 @@ # Troubleshooting +## Table of contents +1. [Connects but no/partial configuration collected](d#oxidized-connects-to-a-supported-device-but-no-or-partial-configuration-is-collected) +2. [No push to remote git repository](#oxidized-does-not-push-to-a-remote-git-repository-hook-githubrepo) +3. [Git performance issues with large device counts](#git-performance-issues-with-large-device-counts) ## Oxidized connects to a supported device but no (or partial) configuration is collected @@ -80,3 +84,14 @@ If you are running oxidized in a container, you need to map /home/oxidized/.ssh container to a local repository and save the known_hosts in the local repository. You can find an example how to do this under [examples/podman-compose](/examples/podman-compose/) +## Git performance issues with large device counts +When you use git to store your configurations, the size of your repository will +grow over time. This growth can lead to performance issues. To resolve these issues, you should perform a Git garbage collection on your repository. + +Follow these steps to do so: + +1. Stop oxidized (no one should access the git repository while running garbage collection) +2. Make a backup of your oxidized data, especially the Git repository +3. Change directory your oxidized git repository (as configured in oxidized configuration file) +4. Execute the command `git gc` to run the garbage collection +5. Restart oxidized - you're done!