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

High CPU constantly (OpenBSD vmm machine) #3359

Open
matrixbot opened this issue Nov 2, 2024 · 7 comments
Open

High CPU constantly (OpenBSD vmm machine) #3359

matrixbot opened this issue Nov 2, 2024 · 7 comments

Comments

@matrixbot
Copy link
Collaborator

This issue was originally created by @gonzalo- at matrix-org/dendrite#3359.

Background information

  • Dendrite version or git SHA: 0.13.5
  • SQLite3 or Postgres?: postgresql-server-16.2
  • Running in Docker?:
  • go version: go-1.22.1
  • Client used (if applicable): Element

Description

  • What is the problem: 90% of the CPU usage constantly.
  • Who is affected: Since 0.13.5 I can see this problem
  • How is this bug manifesting: Just right after start the service.
  • When did this first appear: Never, well if I stop it :)

Steps to reproduce

I just upgrade the package, the previous version has no issue.

I got some logs from PPROF here

Disabled presence{enable_inbound,enable_outbound} doesn't fix the issue.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @S7evinK at matrix-org/dendrite#3359 (comment).

The provided pprof log is a bit difficult to read.
Can you get a CPU profile using wget -O 'profile.pprof' 'http://localhost:65432/debug/pprof/profile?seconds=10' (change port accordingly)?

Also, if you can, try updating to 0.13.7.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @gonzalo- at matrix-org/dendrite#3359 (comment).

@S7evinK thanks for replied:

Profile file here

I will try to update to the latest.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @S7evinK at matrix-org/dendrite#3359 (comment).

From what I can tell so far, the majority is spent in runtime/sys_openbsd3.go, which seems to be called from bleve (the fulltextsearch engine we use) and the underlying database bbolt

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @gonzalo- at matrix-org/dendrite#3359 (comment).

@S7evinK any recommendation or possible fix?

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @gonzalo- at matrix-org/dendrite#3359 (comment).

@S7evinK I can confirm that with 0.13.7 still the same behaviour.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @S7evinK at matrix-org/dendrite#3359 (comment).

Assuming you have fulltext search enabled, can you try disabling it? i.e. by setting sync_api.search.enabled to false in your Dendrite config.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @gonzalo- at matrix-org/dendrite#3359 (comment).

@S7evinK yes, that drops the CPU usage to 2%

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