Mistrick / MapManagerModular

28 stars 22 forks source link

performance issue warnings?! #40

Closed fred0r closed 1 year ago

fred0r commented 1 year ago

dont know if thats important, but enabled debug and get some performance issue warnings in amxx logs:

L 11/11/2022 - 01:31:12: -------- Mapchange to aim_ak-colt --------
L 11/11/2022 - 01:31:13: [map_manager_core.amxx] performance issue. Function plugin_cfg executed more than 12.0ms.
L 11/11/2022 - 01:31:13: [map_manager_core.amxx] performance issue. Function native_load_maplist_to_array executed more than 15.3ms.
L 11/11/2022 - 01:31:13: [map_manager_core.amxx] performance issue. Function native_load_maplist_to_array executed more than 105.4ms.
L 11/11/2022 - 01:31:13: [map_manager_adv_lists.amxx] loaded new maplist "fun-aim.ini"
L 11/11/2022 - 01:31:13: [map_manager_core.amxx] performance issue. Function native_load_maplist executed more than 15.1ms.
L 11/11/2022 - 01:31:13: [map_manager_adv_lists.amxx] loaded new maplist "maps.ini"
L 11/11/2022 - 01:31:13: [map_manager_blocklist.amxx] performance issue. Function mapm_maplist_loaded executed more than 1.1ms.
L 11/11/2022 - 01:31:13: [map_manager_core.amxx] performance issue. Function native_load_maplist executed more than 112.0ms.
L 11/11/2022 - 01:31:13: [map_manager_adv_lists.amxx] performance issue. Function plugin_cfg executed more than 248.2ms.

using latest amxmodx 1.10.x / metamod-r/ rehlds/ regamedll_cs on linux and the last git-version of mapmanagermodular. these messages are shown in the logs after every mapchange.

Mistrick commented 1 year ago

How many entries are in your config files? One of the most expensive actions is reading files, if you have a lot of entries in files, then this can take longer than other actions. I don't think this is an issue, the files are only read once at server start. To disable performance logs use amx_perflog_ms cvar (set to zero).

fred0r commented 1 year ago

the maps.ini contains about 400 maps, with configured min/max/priority - fun-aim.ini about 50 maps and these messages appear after every mapchange.

infamanious commented 1 year ago

The fact that there is an indicator to show performance issue is good imho. Every map manager i've used has always had performance issues ( Galileo, Deagles Map Manager,, and one of the main problems of this is reading the maps list, and then outputting that to the client. From what i gather if the map count is over 600+, then server performance issues start to become apparent. After 900 maps theres a noticeable hang while connecting to the server, and after map change or a server start. If im not mistaken, the server lag/hang is only obvious during server start. This problem was temporarily circumvented via this : https://forums.alliedmods.net/showpost.php?p=2784331&postcount=264 , however this introduced other problems. For the most part though, it certainly stopped the server hang with 900+ maps.