Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU Usage #481

Open
beatreichenbach opened this issue Apr 4, 2024 · 1 comment
Open

CPU Usage #481

beatreichenbach opened this issue Apr 4, 2024 · 1 comment

Comments

@beatreichenbach
Copy link

beatreichenbach commented Apr 4, 2024

Hello,

I'm running hound from a Docker container on an alpine image based on the docker file in this repo. I have a 92 repos being indexed.
My docker container is showing medium cpu usage compared to some other containers that I have running. It's nothing bad but I'm wondering why is it constantly running at this level?

I figured if I set the ms-between-poll to 10m it wouldn't really use any cpu until it starts polling for changes. But the container is constantly sitting at that medium usage. Is there a difference between having 100 small repos indexed vs one large one?

Here's my config:

{
  "max-concurrent-indexers": 1,
  "title": "Codebase",
  "dbpath": "/hound/data",
  "vcs-config": {
    "git": {
      "ms-between-poll": "10m",
      "detect-ref": true
    }
  },
  "repos": {
    "<repo>": {
      "url": "[email protected]:<user>/<repo>.git",
      "url-pattern": {
        "base-url": "https://{url}/src/main/{path}{anchor}",
        "anchor": "#lines-{line}"
      },
      "vcs-config": {
        "ref": "main"
      }
    },
    ...
  }
}

Thank you,
Beat

@beatreichenbach
Copy link
Author

The issue seems to be the ms-between-poll key in the config that is not supported on a global level.
Neither of these configs seem to work:

{
  "vcs-config": {
    "git": {
      "ms-between-poll": "10m"
    }
  },
  ...
}
{
  "ms-between-poll": "10m",
  ...
}

I was only able to make it work by specifying the poll time per repo, even though the docs say:

You can override this value by setting the ms-between-poll key on a per repo basis in the config.

It seems like the key is only supported on a per repo level and not on a global level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant