healthcheck: report real amount of memory allocated by beam
authorrinpatch <rinpatch@sdf.org>
Fri, 8 May 2020 20:51:59 +0000 (23:51 +0300)
committerrinpatch <rinpatch@sdf.org>
Sat, 9 May 2020 23:11:33 +0000 (02:11 +0300)
as opposed to memory currently in use

lib/pleroma/healthcheck.ex

index 8f7f43ec24d0e2e93fc5c4dbf6f61b241bf45465..92ce83cb7ba6669397b467d01799aaa0bb72e257 100644 (file)
@@ -29,7 +29,7 @@ defmodule Pleroma.Healthcheck do
   @spec system_info() :: t()
   def system_info do
     %Healthcheck{
-      memory_used: Float.round(:erlang.memory(:total) / 1024 / 1024, 2)
+      memory_used: Float.round(:recon_alloc.memory(:allocated) / 1024 / 1024, 2)
     }
     |> assign_db_info()
     |> assign_job_queue_stats()