Diagnose Client/Server Side Lag: Using FProfiler

August 31, 2018

A common to-do Garry’s Mod server owners face is understanding what and where lag/stuttering is coming from on the client-side and server-side of their game server. There’s tools out there little do most know which will help you identify your main performance issues such as FProfiler. In this article we’ll be breaking down and teaching you how to use the very effective (if used correctly) tool.

Downloading and installing FProfiler

  1. Download the latest version from the GitHub page.
  2. Extract the contents of “FProfiler-master” into a lowercase folder named of your choice
    • It’s always best to use lowercase due to some file-system capabilities
  3. Drag and drog this folder into your /garrysmod/addons folder
  4. Give your server a restart

Understanding the basics

  • Client-side FPS has nothing to do with what hardware your server is running on
    • This isn’t to say addons/content rendered client-side won’t take effect on your FPS
  • You’ll need some sort of Admin Mod such as ULX and be able to set yourself to superadmin to be able to debug server-side lag
  • In order to see FProfiler, you’ll simply need to type “FProfiler” in console
  • FProfiler is split into two “realms” these are:
    1. Client-side: This will depict FPS issues and identify intensive parts of client-side code
    2. Server-side: This will monitor server-side intensive snippets of code

Debugging client-side lag

  1. Click the “Client” realm from the FProfiler menu and click “Start Profiling”
    1. Make sure to leave it running for however long the intervels are you’re feeling the FPS drops for example
    2. If it’s an entity for example, look at that and profile this
  2. Click “Stop Profiling” after you’ve experienced your client-side issue
  3. The main colums we should be paying attention to is:
    1. Average time in ms (inclusive)
    2. Total time in ms (inclusive)
  4. You should now investigate the “Bottlenecks” tab and sort it first by “Average time in ms (inclusive)”

Diagnosing server side lag is the same as client-side lag but you select “Server” from the dropdown box at the top. You should get the point now – but in case you’re feeling slightly confused, we made a video to help fill in anything we might have failed to clearly explain here.