Raised This Month: $12 Target: $400
 3% 

100% CPU - What Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
scorpius2k1
Senior Member
Join Date: Feb 2016
Old 10-06-2018 , 18:54   100% CPU - What Plugin
Reply With Quote #1

Is there a way to detect which plugin is causing 100% CPU usage? I believe one (or more) may be stuck in a loop or something. When this happens, I cannot even issue console commands (locally), but they will work remotely strange enough.

I looked at 'sm prof' from the post here, and that seems like the place to start, but not sure how to read the generated report (i can link a copy if anyone wants to try and read it)

https://forums.alliedmods.net/showthread.php?t=248581

The other thing that is odd to me, is I can unload all plugins, change the map, and the CPU still stays at 100%...I have to restart the server to remedy it. I am not sure what else it could cause it SourceMod is the only thing running on my server addon-wise.

Thanks for any insight...
__________________
{__ PIRATES COVE __} ● HIGH-KILL Community | Stats ●
Half-Life 2: Deathmatch
66.151.244.149:27016 => CONNECT
scorpius2k1 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 10-07-2018 , 10:38   Re: 100% CPU - What Plugin
Reply With Quote #2

If a plugin is only running SP code (e.g. a loop is actually taking a long time to run), then it couldn't peg the CPU at 100% without causing the server to at least stutter. The server and SP are mostly just one thread, so SP running something prevent the server from processing game frames or running console commands. Something like that happening would clearly show on a client's netgraph.

It's possible to call something in the server or an extension that could take up all your extra frame time, I guess. It doesn't seem likely.

On the profiler output (while I haven't looked at in a long time, so I might be misremembering how it looks), you'd probably want to look at the average frame time and peak columns. SP-related things will have the .smx filename in the name. Things with peaks over 1 / tickrate are slow enough to be a problem.

If you can start the server with no plugins and it will eventually use 100% CPU, then it's pretty clearly not a plugin's problem, so you should see if that happens.
Fyren is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode