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

Outdated system requirements? #3053

Closed
Mika56 opened this issue May 15, 2024 · 3 comments
Closed

Outdated system requirements? #3053

Mika56 opened this issue May 15, 2024 · 3 comments

Comments

@Mika56
Copy link

Mika56 commented May 15, 2024

Self-Hosted Version

24.4.1

CPU Architecture

x86_64

Docker Version

26.1.0

Docker Compose Version

2.26.1

Steps to Reproduce

Install Sentry

Expected Result

Sentry works properly with 4-16GB of RAM

Actual Result

Sentry uses 14GB on its own, add a few system services and you're maxing out on RAM, and the host will crash if you don't have any swap configured.
Our instance doesn't feel very big to me, about 2k errors per day and 16k transactions. However, with all the consumers and services, my 16GB host is struggling to keep running.
Sentry now comes with 54 containers (!), half of which (27) being "consumers", 17 being snuba consumers specifically.

root@cloud-2:/opt/sentry(24.4.1○) # docker compose stats -a --no-stream
CONTAINER ID   NAME                                                                CPU %     MEM USAGE / LIMIT     MEM %     NET I/O           BLOCK I/O         PIDS
4a0ad5ad003e   sentry-self-hosted-nginx-1                                          0.00%     5.449MiB / 14.68GiB   0.04%     128MB / 130MB     9.93MB / 4.1kB    5
bd402a192960   sentry-self-hosted-relay-1                                          11.58%    1.482GiB / 14.68GiB   10.10%    99.9MB / 2.3GB    180MB / 139MB     34
9ba78956b411   sentry-self-hosted-metrics-consumer-1                               0.60%     330.5MiB / 14.68GiB   2.20%     15MB / 10.2MB     655kB / 35.6MB    21
993c3012b959   sentry-self-hosted-web-1                                            0.04%     721.3MiB / 14.68GiB   4.80%     291MB / 213MB     104MB / 12.6MB    35
a48169b38ecc   sentry-self-hosted-cron-1                                           5.57%     195.6MiB / 14.68GiB   1.30%     3.34MB / 27.4MB   139MB / 28.8MB    3
f3b71eb0e9a5   sentry-self-hosted-worker-1                                         4.39%     596.7MiB / 14.68GiB   3.97%     2.4GB / 3.06GB    161MB / 80.7MB    80
e331c9170be4   sentry-self-hosted-billing-metrics-consumer-1                       0.36%     161.3MiB / 14.68GiB   1.07%     36.7MB / 11.7MB   1.29MB / 15.3MB   9
fe139f6993eb   sentry-self-hosted-attachments-consumer-1                           0.39%     478.6MiB / 14.68GiB   3.18%     14.9MB / 10.1MB   1.46MB / 46.9MB   19
3887144f185e   sentry-self-hosted-transactions-consumer-1                          0.33%     369.6MiB / 14.68GiB   2.46%     1.1GB / 1.11GB    13.7MB / 17.9MB   17
897cd9e99c8c   sentry-self-hosted-ingest-occurrences-1                             0.48%     356.3MiB / 14.68GiB   2.37%     18.3MB / 26.6MB   4.55MB / 35.3MB   17
90a5d908e088   sentry-self-hosted-generic-metrics-consumer-1                       0.41%     439.4MiB / 14.68GiB   2.92%     126MB / 212MB     6.64MB / 52MB     21
eb55978c1e81   sentry-self-hosted-subscription-consumer-generic-metrics-1          0.24%     318.6MiB / 14.68GiB   2.12%     15.6MB / 10.6MB   27.2MB / 39.2MB   13
ed3c638269aa   sentry-self-hosted-sentry-cleanup-1                                 0.00%     1.316MiB / 14.68GiB   0.01%     65.3kB / 0B       10.7MB / 217kB    1
6d6c62e8490d   sentry-self-hosted-ingest-replay-recordings-1                       0.29%     151.8MiB / 14.68GiB   1.01%     15.1MB / 10.2MB   184kB / 22.8MB    6
85aa2c07aa46   sentry-self-hosted-subscription-consumer-transactions-1             0.26%     321.8MiB / 14.68GiB   2.14%     15.4MB / 10.6MB   6.05MB / 37.2MB   13
b35ab72588e4   sentry-self-hosted-post-process-forwarder-transactions-1            0.58%     341.4MiB / 14.68GiB   2.27%     333MB / 32.2MB    1.3MB / 34.3MB    22
a606746a3c9c   sentry-self-hosted-ingest-profiles-1                                0.27%     156.9MiB / 14.68GiB   1.04%     14.6MB / 9.66MB   2.1MB / 16.1MB    6
bd04cd6aed87   sentry-self-hosted-subscription-consumer-metrics-1                  0.31%     318.7MiB / 14.68GiB   2.12%     15.3MB / 10.5MB   2.13MB / 38.4MB   13
cf5916778586   sentry-self-hosted-post-process-forwarder-errors-1                  0.61%     333.3MiB / 14.68GiB   2.22%     22.9MB / 12.7MB   3.88MB / 30.8MB   21
71679e9f2b62   sentry-self-hosted-subscription-consumer-events-1                   0.26%     327.8MiB / 14.68GiB   2.18%     15.2MB / 10.4MB   2.71MB / 31.3MB   13
00cd8cb52359   sentry-self-hosted-events-consumer-1                                0.31%     329.5MiB / 14.68GiB   2.19%     26MB / 21.7MB     193kB / 29.9MB    17
658689f89c7a   sentry-self-hosted-ingest-monitors-1                                0.28%     163.3MiB / 14.68GiB   1.09%     15.2MB / 11.6MB   3.74MB / 15.8MB   8
67dac68427fe   sentry-self-hosted-post-process-forwarder-issue-platform-1          0.56%     327.6MiB / 14.68GiB   2.18%     31.9MB / 20.6MB   12.2MB / 33.5MB   18
fcd6fd0dad24   sentry-self-hosted-snuba-replacer-1                                 0.36%     102.5MiB / 14.68GiB   0.68%     14.9MB / 9.87MB   1.36MB / 25.2MB   5
43fcc66ceefc   sentry-self-hosted-snuba-profiling-profiles-consumer-1              0.22%     139.8MiB / 14.68GiB   0.93%     21.3MB / 17MB     2.5MB / 65.4MB    26
c6bc3f905850   sentry-self-hosted-snuba-metrics-consumer-1                         0.46%     144.6MiB / 14.68GiB   0.96%     27.7MB / 25MB     123kB / 32.1MB    34
fad3f7753238   sentry-self-hosted-snuba-generic-metrics-sets-consumer-1            0.50%     154.8MiB / 14.68GiB   1.03%     50MB / 29.7MB     1.13MB / 37.9MB   34
2f99ea193563   sentry-self-hosted-snuba-transactions-consumer-1                    2.32%     257.6MiB / 14.68GiB   1.71%     150MB / 81.3MB    14.7MB / 79.3MB   37
b7d9fdf41aec   sentry-self-hosted-snuba-subscription-consumer-metrics-1            0.42%     127.7MiB / 14.68GiB   0.85%     15.2MB / 10.3MB   36.7MB / 47.3MB   9
523d1589f6e7   sentry-self-hosted-snuba-outcomes-billing-consumer-1                0.42%     143.2MiB / 14.68GiB   0.95%     32.4MB / 27.5MB   1.71MB / 50.8MB   26
8ffb990c35ed   sentry-self-hosted-snuba-spans-consumer-1                           0.47%     147.9MiB / 14.68GiB   0.98%     108MB / 1.51GB    8.42MB / 42.4MB   26
8225ff16f224   sentry-self-hosted-snuba-subscription-consumer-transactions-1       0.49%     124.2MiB / 14.68GiB   0.83%     17.3MB / 11.1MB   1.34MB / 18.8MB   9
3768b63d120b   sentry-self-hosted-snuba-api-1                                      0.01%     144.8MiB / 14.68GiB   0.96%     23.3MB / 47.8MB   12.8MB / 7.72MB   6
05bf411bab23   sentry-self-hosted-snuba-group-attributes-consumer-1                0.57%     173.9MiB / 14.68GiB   1.16%     27.5MB / 24.1MB   1.21MB / 39.1MB   37
05ac722a5f3d   sentry-self-hosted-vroom-1                                          0.00%     9.75MiB / 14.68GiB    0.06%     65.7kB / 422B     69.1MB / 217kB    9
493489a0c819   sentry-self-hosted-snuba-replays-consumer-1                         0.43%     146.1MiB / 14.68GiB   0.97%     27.8MB / 24.7MB   209kB / 28.7MB    30
a26639b687e2   sentry-self-hosted-snuba-outcomes-consumer-1                        0.31%     140MiB / 14.68GiB     0.93%     27.4MB / 24.3MB   6.21MB / 44.3MB   26
813cf37d7118   sentry-self-hosted-snuba-generic-metrics-counters-consumer-1        0.50%     149.8MiB / 14.68GiB   1.00%     50.1MB / 30.4MB   6.52MB / 50.5MB   34
abd102f1b9d1   sentry-self-hosted-snuba-profiling-functions-consumer-1             0.27%     148.5MiB / 14.68GiB   0.99%     21.4MB / 17.5MB   2.36MB / 39.6MB   26
6955ca855cb0   sentry-self-hosted-snuba-issue-occurrence-consumer-1                0.55%     244.4MiB / 14.68GiB   1.63%     28.5MB / 24.9MB   65.9MB / 77.3MB   41
c22b67f373b3   sentry-self-hosted-snuba-generic-metrics-distributions-consumer-1   0.59%     136.6MiB / 14.68GiB   0.91%     50.8MB / 170MB    6.39MB / 44.6MB   34
9bcf8e936750   sentry-self-hosted-snuba-errors-consumer-1                          0.62%     119.1MiB / 14.68GiB   0.79%     30.6MB / 28.1MB   3.28MB / 77.9MB   34
5f3ea410e329   sentry-self-hosted-snuba-subscription-consumer-events-1             0.45%     132.1MiB / 14.68GiB   0.88%     15MB / 10MB       1.16MB / 26.7MB   9
8bd1b0342298   sentry-self-hosted-kafka-1                                          3.62%     709.9MiB / 14.68GiB   4.72%     4.07GB / 2.37GB   253MB / 1.93GB    74
c1c86e2a4a8a   sentry-self-hosted-redis-1                                          1.07%     26.65MiB / 14.68GiB   0.18%     2.84GB / 2.33GB   111MB / 431MB     5
d0afb7f7890c   sentry-self-hosted-symbolicator-1                                   0.01%     44.56MiB / 14.68GiB   0.30%     316kB / 67.6kB    160MB / 79.7MB    15
82a8b13e5b76   sentry-self-hosted-symbolicator-cleanup-1                           0.00%     1.117MiB / 14.68GiB   0.01%     66.4kB / 0B       11.6MB / 12.3kB   1
77f1ae56ed87   sentry-self-hosted-vroom-cleanup-1                                  0.00%     880KiB / 14.68GiB     0.01%     66.2kB / 0B       1.41MB / 12.3kB   1
5b9db773d43f   sentry-self-hosted-geoipupdate-1                                    0.00%     0B / 0B               0.00%     0B / 0B           0B / 0B           0
b15333955208   sentry-self-hosted-memcached-1                                      0.11%     21.11MiB / 14.68GiB   0.14%     48.5MB / 99.2MB   1.99MB / 1.17MB   10
eb2cff5f0415   sentry-self-hosted-smtp-1                                           0.00%     1.508MiB / 14.68GiB   0.01%     66.2kB / 0B       16.4MB / 4.1kB    2
a8f46d3a9271   sentry-self-hosted-postgres-1                                       1.98%     224.6MiB / 14.68GiB   1.49%     346MB / 267MB     343MB / 724MB     39
2e21450392d2   sentry-self-hosted-zookeeper-1                                      0.07%     95.85MiB / 14.68GiB   0.64%     524kB / 321kB     156MB / 34.3MB    48
10285ccec720   sentry-self-hosted-clickhouse-1                                     19.27%    392.6MiB / 14.68GiB   2.61%     1.88GB / 173MB    1.34GB / 24.8GB   208

Relay uses 1.5GB by its own. Snuba consumers are using a total of 2.75GB, the other ones 3.56GB. 5.47GB are used by the other services, most of which are web, kakfa, worker and clickhouse.

Is this a normal RAM utilization for an instance this size?

Event ID

No response

@aldy505
Copy link
Collaborator

aldy505 commented May 16, 2024

Hello!

Yeah, sadly the excessive resource consumption is a known problem and everyone's not happy about it. There's an issue already about it though #1763. You can also see this issue if you're interested: #2539.

But, some status update:

Relay uses 1.5GB by its own.

The engineers behind relay is aware of this... horrifying RAM usage. Pinging @Dav1dde since he said he wants to work on this after Metrics' done.

Snuba consumers are using a total of 2.75GB, the other ones 3.56GB.

There's a ongoing work to migrate Snuba from Python into Rust. You can see some rust-consumer on the Docker Compose file nowadays, but sadly it's just a Python runtime that executes Rust via FFI, all of us wanted to see an actual Rust app without Python runtime. Hopefully that'll happen soon (but don't take my word for it -- I'm not an employee).

5.47GB are used by the other services, most of which are web, kakfa, worker and clickhouse.

The one that usually takes up much RAM resource is Kafka + Zookeeper, there's an ongoing work to migrate into Kafka with KRaft (see #2501) which removes the Zookeeper. But for my own instance at office, I replaced Kafka and Zookeeper with Redpanda, it works, but if something goes wrong, you gotta figure it out yourself.

I'm going to close this issue, you may continue your rant on the issues I linked above, or continue it here. I can reopen this issue if you want to, unless the Github bot locked this issue, as I don't have enough power to unlock it.

Oh, additional note: If you wish for any changes that you think does not align with your experience on setting up Sentry, feel free to add a comment here on this issue, or on this issue: #2267. We're (or basically I am) working on making the docs better and not confusing.

@aldy505 aldy505 closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
@Mika56
Copy link
Author

Mika56 commented May 16, 2024

I'm sorry if this felt like a rant, that is not what I wanted.

What I wanted to know is if these RAM usage are what is expected, and, if so, if this chapter (Self-Hosted Sentry: Recommended system resource) can be updated?

GitLab has a nice page where they list reference architectures, and what instance(s)/resources are needed at some users count: https://docs.gitlab.com/ee/administration/reference_architectures/

@aldy505
Copy link
Collaborator

aldy505 commented May 16, 2024

I'm sorry if this felt like a rant, that is not what I wanted.

No, don't be sorry. I also occasionally rant about how cumbersome sentry's deployment is, and I'm helping maintain the self-hosted repo lol.

What I wanted to know is if these RAM usage are what is expected, and, if so, if this chapter (Self-Hosted Sentry: Recommended system resource) can be updated?

GitLab has a nice page where they list reference architectures, and what instance(s)/resources are needed at some users count: https://docs.gitlab.com/ee/administration/reference_architectures/

Yes, we could update it. I like how GitLab does it, I used to handle my previous company's Gitlab instance as well. But for me, usually the proper ones comes with something along the line of: For AWS, it's recommended to use m5.xlarge, for GCP it's recommended to use ..., since I'm currently running sentry on my company's VMware and on a Contabo instance.

I'm thinking of reopening this issue and make it as one of the stuff that needs to be documented (by adding a "Documentation" issue label). What do you think about that?

@github-actions github-actions bot locked and limited conversation to collaborators Jun 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Archived in project
Development

No branches or pull requests

2 participants