ATTENTION! The process of updating WiKi to version Eco 10.x has begun. Those wishing to participate can find out more Information on our ECO Contribution Wiki Discord.

Server Profiling: Difference between revisions

From Eco - English Wiki
[checked revision][checked revision]
m (compliment -> complement)
(Updated profiling instructions)
 
Line 1: Line 1:
[[File:In-Game Profiling Commands.png|thumb|595x595px|In-game Admin commands that can be used to invoke profiling sessions|alt=]][[File:EcoServer Profiling Menu.png|thumb|595x595px|Various profiling options as seen in Server UI (Windows only)|alt=]]The profiling tools allow [[Server|Server Owners]] and [[Admin|Admins]] to run profiling sessions to gather diagnostic data that is especially useful when server is experiencing performance problems.
[[File:In-Game Profiling Commands.png|thumb|595x595px|In-game Admin commands that can be used to invoke profiling sessions|alt=]][[File:EcoServer Profiling Menu.png|thumb|595x595px|Various profiling options as seen in Server UI (Windows only)|alt=]]The profiling tools allow [[Server|Server Owners]] and [[Admin|Admins]] to run profiling sessions to gather diagnostic data that is especially useful when the server is experiencing performance problems.
You can use this generated data to complement issue reports for [[Strange Loop Games|SLG]].
You can use this generated data to complement issue reports for [[Strange Loop Games|SLG]].


'''Introduced in version 9.5.'''
'''These instructions are valid for Update 9.6.4 and higher.'''
==Requirements==
==Requirements==
For profiling to work, you need 2 [https://docs.microsoft.com/en-us/dotnet/core/diagnostics/#net-core-diagnostic-global-tools .NET Core diagnostic global tools] installed on your system:
For profiling to work, you need several prerequisites installed on your server:
*[https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dump <code>dotnet-dump</code>] - to take memory dumps
#[https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dump <code>dotnet-dump</code>] - to take memory dumps (see [https://docs.microsoft.com/en-us/dotnet/core/diagnostics/#net-core-diagnostic-global-tools .NET Core diagnostic global tools] and note that we don't use dotnet-trace, it doesn't provide useful output)
*[https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace <code>dotnet-trace</code>] - to profile CPU
#<code>[https://www.jetbrains.com/help/profiler/Performance_Profiling__Profiling_Using_the_Command_Line.html#install-and-use-the-command-line-tool-as-a-net-core-tool dotTrace]</code> - to profile CPU
You have to make sure both of the tools are installed globally or available on your [[wikipedia:PATH_(variable)|systems PATH]] so the server can run them.
You have to make sure these are installed globally or available on your [[wikipedia:PATH_(variable)|systems PATH]] so the server can run them.
==Memory dumps==
== Memory dumps ==
For when the server is consuming too much memory.
For when the server is consuming too much memory.


Line 18: Line 18:
For when the server is consuming too much CPU.
For when the server is consuming too much CPU.


CPU profiling can be initiated by:
CPU profiling can be initiated by:  
*As an admin, by issuing <code>/profiler cpu</code> command
*As an admin, by issuing <code>/profiler cpu</code> command
*Invoking <code>Profiler -> Profile CPU</code> via Server UI Menu (Windows only)
*Invoking <code>Profiler -> Profile CPU</code> via Server UI Menu (Windows only)
CPU profiling will start the <code>dotnet-trace</code> process, running it for '''1 minute''', capturing everything going on with the process for the time being.
CPU profiling will start the <code>dotTrace</code> process, running it for '''1 minute''', capturing everything going on with the process for the time being.
==Full profile==
==Full profile ==
Full profile will simply take memory dump followed by CPU profiling, as if they were invoked in succession.
Full profile will simply take memory dump followed by CPU profiling, as if they were invoked in succession.

Latest revision as of 12:36, 15 November 2022

In-game Admin commands that can be used to invoke profiling sessions
Various profiling options as seen in Server UI (Windows only)

The profiling tools allow Server Owners and Admins to run profiling sessions to gather diagnostic data that is especially useful when the server is experiencing performance problems.

You can use this generated data to complement issue reports for SLG.

These instructions are valid for Update 9.6.4 and higher.

Requirements[edit | edit source]

For profiling to work, you need several prerequisites installed on your server:

  1. dotnet-dump - to take memory dumps (see .NET Core diagnostic global tools and note that we don't use dotnet-trace, it doesn't provide useful output)
  2. dotTrace - to profile CPU

You have to make sure these are installed globally or available on your systems PATH so the server can run them.

Memory dumps[edit | edit source]

For when the server is consuming too much memory.

Memory dumps can be initiated by:

  • As an admin, by issuing /profiler dump command
  • Invoking Profiling -> Take memory dump via Server UI Menu (Windows only)

Memory dump will start the dotnet-dump process, taking a full snapshot of current memory as used by the server process and the file size will be proportional to that. For example, a server that is utilizing 2GB of RAM, the dump file generated will be also 2GB.

CPU profiling[edit | edit source]

For when the server is consuming too much CPU.

CPU profiling can be initiated by:

  • As an admin, by issuing /profiler cpu command
  • Invoking Profiler -> Profile CPU via Server UI Menu (Windows only)

CPU profiling will start the dotTrace process, running it for 1 minute, capturing everything going on with the process for the time being.

Full profile[edit | edit source]

Full profile will simply take memory dump followed by CPU profiling, as if they were invoked in succession.