High constant CPU usage #287

Closed
opened 2022-11-18 09:58:30 +00:00 by marc0s · 9 comments

I'm observing a high (+100%) constant CPU usage in my akkoma instance. This is a personal instance, so the activity is mainly due to interactions with other servers.

I'm running the OTP release 3.4.0-0-gf91b89673.

It's a brand new deployment, I've seen another issue regarding CPU usage when migrated from Pleroma develop, but it shouldn't be my case.

In the attached graph, the peak corresponds to a restart of the instance and you can see that it stays at 100% immediately after restarting it.

Ask for whatever you need from logs or phoenix's live dashboard.

Thanks!

I'm observing a high (+100%) constant CPU usage in my akkoma instance. This is a personal instance, so the activity is mainly due to interactions with other servers. I'm running the OTP release 3.4.0-0-gf91b89673. It's a brand new deployment, I've seen another issue regarding CPU usage when migrated from Pleroma develop, but it shouldn't be my case. In the attached graph, the peak corresponds to a restart of the instance and you can see that it stays at 100% immediately after restarting it. Ask for whatever you need from logs or phoenix's live dashboard. Thanks!

You might be able to get /phoenix/live_dashboard/processes?limit=50&search=&sort_by=reductions_diff&sort_dir=desc, which should tell you what processes are taking more resources than is usual

You might be able to get `/phoenix/live_dashboard/processes?limit=50&search=&sort_by=reductions_diff&sort_dir=desc`, which should tell you what processes are taking more resources than is usual
Author

Hi, these are the numbers:

image

Thanks

Hi, these are the numbers: ![image](/attachments/224dfefe-f388-44ca-838a-6893023e8381) Thanks

nothing seems amiss here

what sort of machine are you running on?

nothing seems amiss here what sort of machine are you running on?
Author

It's a VPS in hetzner with 2xEPYC@2.5GHz, 2GiB RAM and 40GiB SSD.

It's a VPS in hetzner with 2xEPYC@2.5GHz, 2GiB RAM and 40GiB SSD.

that should be plenty

do you know which process is taking up the CPU? postgres or beam?

that _should_ be plenty do you know which process is taking up the CPU? postgres or beam?
Author

It's the beam. And I see in htop that TIME+ is 349h. May the systemd restart akkoma have not actually stopped and started the beam process? Seems strange but... Should I try systemd stop akkoma and systemd start akkoma instead?

It's the beam. And I see in htop that TIME+ is 349h. May the `systemd restart akkoma` have not actually stopped and started the beam process? Seems strange but... Should I try `systemd stop akkoma` and `systemd start akkoma` instead?

that should be fine to do - do the logs show anything curious? systemctl status it

that should be fine to do - do the logs show anything curious? systemctl status it
Author

Uhm, I've just checked and it was some other beam process, akkoma related, probably from the setup process as per the cmd I see in ps:

akkoma     50624 99.9  2.4 2111056 48940 ?       Sl   Nov03 21001:16 /opt/akkoma/erts-12.3.2.5/bin/beam.smp -- -root /opt/akkoma -progname erl -- -home /opt/akkoma -- -elixir ansi_enabled true -noshell -s elixir start_cli -setcookie REDACTED==== -config /opt/akkoma/releases/3.3.1-0-g9038da01c-develop/sys -boot /opt/akkoma/releases/3.3.1-0-g9038da01c-develop/start_clean -boot_var RELEASE_LIB /opt/akkoma/lib -- -extra --eval Pleroma.ReleaseTasks.run("instance gen --output /etc/akkoma/config.exs --output-psql /tmp/setup_db.psql")

I kill -15ed it and the current beam process for the running akkoma instance is back to normal CPU usage <2%.

Sorry for the noise! :(

Uhm, I've just checked and it was some other beam process, akkoma related, probably from the setup process as per the cmd I see in ps: ``` akkoma 50624 99.9 2.4 2111056 48940 ? Sl Nov03 21001:16 /opt/akkoma/erts-12.3.2.5/bin/beam.smp -- -root /opt/akkoma -progname erl -- -home /opt/akkoma -- -elixir ansi_enabled true -noshell -s elixir start_cli -setcookie REDACTED==== -config /opt/akkoma/releases/3.3.1-0-g9038da01c-develop/sys -boot /opt/akkoma/releases/3.3.1-0-g9038da01c-develop/start_clean -boot_var RELEASE_LIB /opt/akkoma/lib -- -extra --eval Pleroma.ReleaseTasks.run("instance gen --output /etc/akkoma/config.exs --output-psql /tmp/setup_db.psql") ``` I `kill -15`ed it and the current beam process for the running akkoma instance is back to normal CPU usage <2%. Sorry for the noise! :(

heh, well good that it's back to normal now~

heh, well good that it's back to normal now~
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#287
No description provided.