Merge branch 'master' of gburri.org:minecraft_web into master
authorGreg Burri <greg.burri@gmail.com>
Fri, 8 Apr 2022 15:23:05 +0000 (17:23 +0200)
committerGreg Burri <greg.burri@gmail.com>
Fri, 8 Apr 2022 15:23:05 +0000 (17:23 +0200)
1  2 
backend/src/minecraft_controller.rs

@@@ -142,8 -142,8 +140,8 @@@ pub fn get_minecraft_executable_informa
  \r
          Some(\r
              MinecraftExe {\r
-                 memory: process.memory(),\r
+                 memory: process.memory() / 3, // Because the Java garbage collector ZGC reports three times more the real memory usage: https://stackoverflow.com/a/62934057/212675\r
 -                load_average_5min: system.get_load_average().five / system.get_processors().len() as f64 * 100.,\r
 +                load_average_5min: system.load_average().five / system.processors().len() as f64 * 100.,\r
                  uptime: std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_secs() - process.start_time(),\r
                  world_size,\r
                  active_players: status_from_rcon.players,\r