Resource:Performancebrowser

From Multi Theft Auto: Wiki
Revision as of 08:11, 30 July 2010 by Ccw (talk | contribs) (Created page with '=Introduction= Performance browser is used to monitor the performance of resources on the server. Specifically, it shows how much CPU time and memory each resource is consuming.…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

Performance browser is used to monitor the performance of resources on the server. Specifically, it shows how much CPU time and memory each resource is consuming. It is useful for finding out which resources are slow, and which ones are leaking memory.

Performance browser only works with MTA:SA 1.0.4 server build 1885 and up. You can check your server build number by using the console command 'sver'.

Lua timings

Select Lua timings from the Category drop down to view timing information for each resource:

Perfbrow-lua-time.png


By default, there are three blocks of columns, each one representing a different sample period. In the picture below, block A represents samples taken in the last 5 seconds, block B represents samples taken in the last 60 seconds, and block C represents samples taken in the last 300 seconds.

Perfbrow-lua-time-abc.png


The columns in each block are:

  • name - Name of the resource
  • cpu - Amount of CPU time taken (in percent)
  • time - Amount of CPU time taken (in seconds)
  • calls - The number of times the function was called
  • avg - The average time spent in the function
  • max - The maximum time spent in the function

Note: To keep the display as clear as possible, anything that has taken less than 0.01% of CPU time is not be displayed.

Options

Use the d option to display the timings for specific events and functions in the resource. If a function name cannot be determined, it will display the @ sign followed by the file name and line number the function starts. You can then locate that function by looking in the source file.

Use the 5, 60, 300 and 3600 options to select what sample periods to show. For example, the option string 5,60,300,3600 will show all 4 sample periods. (If no sample periods are chosen, the default of 5,60,300 is used.)

Perfbrow-lua-time-d-admin.png


Use the Filter setting to view a smaller range of resources.


Lua memory

Select Lua memory from the Category drop down to view memory consumption of each Lua resource:

Perfbrow-lua-mem.png


The columns are:

  • name - Name of the resource
  • change - The change in memory use since the last refresh
  • current - The amount of memory the resource is using now
  • max - The most memory the resource has ever used
  • XMLFiles - The number of open XML files
  • refs - The number of callback functions
  • Timers - The number of active Timers
  • Elements - The number of Elements
  • TextDisplays - The number of Text Displays
  • TextItems - The number of Text Items

Options

Use the a option to show more accurate memory usage. Note: This calls the Lua garbage collector before each refresh, which could slightly reduce server performance.

Use the Filter setting to view a smaller range of resources:

Perfbrow-lua-mem-race.png


Lib memory

Select Lib memory from the Category drop down to view memory consumption of the appropriate library (.dll or .so)
Note: This information is only available if the library has been compiled with WITH_ALLOC_TRACKING set to 1

Perfbrow-lib-mem.png


The columns are:

  • name - Name of the library
  • change - The change in memory use since the last refresh
  • current - The amount of memory the library is using now
  • max - The most memory the library has ever used

Options

Use the i option to show more information:

Perfbrow-lib-mem-i.png