How to: Performance tweak guide

Status
Not open for further replies.
Messages
6,894
Reaction score
17,921
Points
1,200
Location
North Rhine-Westphalia, Germany
Please note that I have abandoned this thread by quite some time now. Bit outdated but should still work for the most of you.
Wow, here is a 2018 edit for ya lads because I noticed a random guest looking at this thread: This is old and outdated stuff. Don't use it. DM me for anything performance related instead as PERP has changed a lot and I have a lot more knowledge of whitelisted cvars for the server that can improve your performance. I have a autoexec.cfg for grabs so you can have all the benefits without too much fiddling to do by yourself so hit me up if you need it. Feels weird looking back at this though but just remember=Source is CPU dependant. Your GPU will do jack shit and maybe hit 40% usage max which is the case for my RX 580 and then fuck back off to 0%. If you're a sweaty PERP nerd upgrade your CPU and do some research, you can also always ask me for advice.


Introduction
I've created this guide to help other people out with their poor overall FPS in Gmod or in this gamemode.As we all may know, the Source engine is old and outdated enough as it is and tweaking is needed to get the best performance out of it.You've may already seen it in many Steamcommunity guides but I've decided to create my own one here, in the guide section of this lovely forum.
____________________________________________________________________________________________
In-game video settings
These are the most optimal settings for my Garrys Mod, outside Perp I get around a stable 45-60FPS, PERP is around 20-30 when its around the busiest of days in the server. (And in most cases it can even drop below 10FPS with a bunch of car headlights in a car accident, those are generally nightmares)
This is the advanced video settings menu with my options.Fiddle around with these and see which options give you the best performance for you
9UqqQi1.png

(Note that you HAVE to set model details to High, unless you want glitchy car artifacts like these)

Another thing you should look at is the main video menu of the options.
fU2fCOe.png

A general FPS killer is the resolution.My native resolution is 1600 x 900, normal for a laptop display which I currently use.I've lowered it to 1280 x 720 and gives me a great boost in performance while letting everything look great and not pixelated at really low resolutions like 800 x 600.Just remember:The higher your resolution, the more resource demanding it is for the game.
____________________________________________________________________________________________
Launch options
Outside of Garry's mod you can access the launch options menu which can execute various of useful commands.
They are pretty easy to use and access, just follow the instructions below:


Go into your Steam Library
SNADsCC.png


Right click on Garry's Mod
xwztlQe.png


Click on Properties
t47aG1B.png


And then finally click on Set launch options
Zld2Rtv.png


As you can already see, I've added quite some commands in there.I will explain every single one of them down here.(And as you've just seen, its a little mess, forgot to remove a - after the -threads 4 and a duplicate mat_queue_mode, just ignore those)

-console
Should do what it says, activates the console which can be used to enter commands like retry, connect, quit, kill, say, act etc.

-nojoy
Disables the use of joysticks, frees up slight amount of ram which doesn't really affect that much performance.
-high
Sets hl2.exe (gmod) into high priority, just like in Taskmanager.Some say this doesn't help your performance at all, some say it does.Test it out for yourself and let that option stay inside your launch options.
-threads x
Basically, put the number of threads/CPUs where x is.Quad core users should put in 4, Dual core 2, etc.
+mat_queue_mode x
This is something called mutlicore rendering, which just takes advantages of multiple cores which result in better performance.
Replacing the x with a -1 or a 2 enables mutlicore rendering.
Replacing the x with a 0 or a -2 disables multicore rendering.
Simple.
-nod3d9ex
Now, this one is the best one by far.This command simply disables DirectX DLL for DirectX9 which gives you a nice FPS boost, but using this will make alt tabbing into Garry's Mod alot longer.And another thing is, it disabled my Steam Overlay you can access trough Shift+Tab, but this might not be the case for you as the Steam Overlay still worked for me in CS:GO while using this command also in the launch options of CS:GO.
+r_hunkalloclightmaps 0
This command prevents lightmaps from loading into to the hunk memory.Pretty nifty to avoid any unwanted Hunk Overflow problems, while you're playing, might increase performance.
-dxlevel 90
Basically, uses different DirectX Levels.Here is a small list of all available DirectX Levels.
-dxlevel 96-99 = Directx 9.0 (Maxed Quality)
-dxlevel 95 = Directx 9.0 (Higher Quality)
-dxlevel 90 = Directx 9.0
-dxlevel 81 = Directx 8.1 (Medium Quality)
-dxlevel 80 = Directx 8.0 (S'medium Quality)
It is recommended that you use the 90 option, to avoid any problems and graphical artifacts.And if I recall correctly, you may not even be able to join the server, on any DirectX Level below 90, feel free to prove me wrong on this one.
-window
Start's the game in windowed mode.
-noborder
//combine this with -window
Makes the ugly border's in windowed mode go away.
Now, does -window and -noborder do something special?
Yes.Atleast for some, as some user's on Reddit reported, that if you put the -window and -noborder option in your launch options you might notice a performance boost.Test this out for yourself, I could not confirm this at the moment for myself as I did not see any difference at all.

____________________________________________________________________________________________
autoexec.cfg
Inside your Garry's Mod folder there is the following folder called cfg.To find your cfg folder of your Garry's Mod, simply browse trough C:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod\cfg .If you do not have a cfg called autoexec located inside that folder, then simply create an empty text file and save it as autoexec.cfg and set the file types to "All files".Congratulations, you now have a cfg that executes everytime you startup your Garry's Mod!
You can enter many useful commands in there, for example r_lod 0 (r_lod controls level of detail falloff, i.e. how detailed are objects when looking at them from a distance.) -1 is the standard value, this means it uses the default settings of level of detail.Setting it to 0 will completly disable level of detail and it will always use the highest level of detail.Now, some useful ones that you may want to use:
-mat_picmip x
Replacing the x with a -1 basically increases the texture quality on models while 4 is the worst and is basically lets say good ol' potato quality.I myself have yet not experimented with this option, feel free to fiddle around with it and see if it increases anything in performance related stuff.
Disabling shadows
mat_shadowstate 0
r_shadowmaxrendered 0
r_shadows 0
(nb_shadow_dist 400 changing this number sets at which distance shadows are being rendered at)
Shadows are generally an annoyance to performance, especially smooth and good looking ones.Disabling them can give you a nice boost in your performance but do keep in mind that you can no longer see those floating shadows like from an invisible noclipping Moderator/Admin)
snd_noextraupdate 1
This setting should disable the extra updating of sounds which can reduce stutter or increase performance, as a again, feel free to fiddle around with this one.
r_fastzreject x
Activate/deactivates a fast z-setting algorithm to take advantage of hardware with fast z reject. Use -1 to default to hardware.
Nvidia cards should have this activated by default, ATI has it disabled.ATI users should have this set to 1, and as always fiddle around with it and tell me if it changed anything.
r_3dsky x
1 Enables the skybox, 0 disables it, gives a nice boost to your FPS.This can simply also be done trough the console or disabling the distance rendering option inside the PERP F1 menu under the option tab.


Consider using a 'maxframes' config
There are many hidden graphic options hidden within the Source engine.This .cfg file contains them, paste all the text inside the .cfg into your autoexec.cfg or just rename the whole .cfg into autoexec.I suggest you look trough some of them, especially the FPS Cap, Shadows and Facial features section of the .cfg.I suggest only using these kinds of .cfg files if your PC is absolute low-end and cannot keep up a stable 20 frames per second in a game.

DON'T USE THIS ANYMORE UNLESS YOU WANT TO FACTORY RESET YOUR GARRY'S MOD. IF THIS DOES HAPPEN THEN CONGRATS, USE THE RESET.BAT FOUND IN YOUR ROOT FOLDER OF GARRYSMOD WHERE HL2 AND BIN IS AND EXECUTE IT ASWELL AS ENTERING -AUTOCONFIG INTO THE LAUNCH OPTIONS OF YOUR GARRY'S MOD. DON'T FORGET TO REMOVE THE LAUNCH OPTION ONCE YOU STARTED GARRY'S MOD.

____________________________________________________________________________________________
Nvidia user's
Do you have an Nvidia graphic's card and it's not running in full performance? follow these step's then, fam:
Right click on your desktop and go to "Nvidia Control Panel"
s2RJ4j3.png

Once opened up, look to the left and click on "Manage 3D Setting's".Then make sure that you have the "Global Setting's" tab open.And for the last step, scroll down until you find "Power Management".Click on it and set it to "Maximum Performance".Apply and exit.
t4dgwJ2.png

(Be sure read and follow the yellow/orange looking marked text too!)
____________________________________________________________________________________________
End of the guide
Any improvments or suggestions or other performance related tips you have to tell me? comment below or simply contact me @Creepis .
As for (Razer)GameBooster:Try it out for yourself, I haven't gained any special performance boost out of it but I do recommend checking it out.
____________________________________________________________________________________________
Changelog

21st of December, 2014 4:29PM: Added "Consider using a 'maxframes' config" section.
4th of January, 2015 9:07PM: Added some more launch options (Thanks, @Belg Lmfao !)
28th of February, 2015 6:42PM: Added 2 more launch options and a "Nvidia user's" section.
 
Last edited:
Messages
889
Reaction score
2,934
Points
360
Location
England
Another note for laptop users:

CHECK YOUR BATTERY SETTINGS.
In Win8 you can set your battery to High Performance, Balanced or Power Saver. For optimal performance use the... you guessed it High Performance option. Try not to use balanced and for the love of god dont use power saver
 
Messages
512
Reaction score
478
Points
340
Location
Italy
just a question: my computer has 8cores, but only 4 are physical. Would it work if i write -threads 8?
 
Messages
21
Reaction score
2
Points
20
Thanks for this helped a ton, it anyone has problem with textures such as missing player models, crashing you can also contact me.
 
Messages
100
Reaction score
167
Points
290
Nothing of this actually helps, just do -high and then r_3dsky 0
 
Last edited:
Messages
255
Reaction score
105
Points
320
Location
Denmark
Creepis, you are my lord!

I've had issues with performance since my start, and always wondered if I could change it but didn't make an attempt lol. Gonna save this guide, thanks a lot. :)
 
Messages
1,313
Reaction score
3,077
Points
760
Location
Belgium
I finally managed to make myself proper launch options, I'll explain what my launch options do:

Code:
+r_hunkalloclightmaps 0 -heapsize 3145728 +cl_cmdrate 100 +myinfo_bytes 2000 +cl_updaterate 101 +rate 30000 -dxlevel 90 +mat_antialias 8 +mat_forceaniso 16

+r_hunkalloclightmaps 0 = fix for engine hunk overflow

-heapsize 3145728 = Set how much memory in kb Garry's Mod is allowed to use. This is in my case 50% of my 6GB ram

+cl_cmdrate 100 +myinfo_bytes 2000 +cl_updaterate 101 +rate 30000 = Settings to fix most buffer overflow crashes.

-dxlevel 90 = reducing graphical appearance for more performance and stability really important

+mat_antialias 8 = Set antialias to 8x, since dxlevel 80 doesn't remember my settings for some reason

+mat_forceaniso 16 = Set filtering mode to 16
 
Last edited:
Messages
6,894
Reaction score
17,921
Points
1,200
Location
North Rhine-Westphalia, Germany
I finally managed to make myself proper launch options, I'll explain what my launch options do:

Code:
+r_hunkalloclightmaps 0 -heapsize 3145728 +cl_cmdrate 100 +myinfo_bytes 2000 +cl_updaterate 101 +rate 30000 -dxlevel 90 +mat_antialias 8 +mat_forceaniso 16

+r_hunkalloclightmaps 0 = fix for engine hunk overflow

-heapsize 3145728 = Set how much memory in kb Garry's Mod is allowed to use. This is in my case 50% of my 6GB ram

+cl_cmdrate 100 +myinfo_bytes 2000 +cl_updaterate 101 +rate 30000 = Settings to fix most buffer overflow crashes.

-dxlevel 90 = reducing graphical appearance for more performance and stability really important

+mat_antialias 8 = Set antialias to 8x, since dxlevel 80 doesn't remember my settings for some reason

+mat_forceaniso 16 = Set filtering mode to 16
Just a "For Your Information", -heapsize does not nothing in Gmod,CS:GO,TF 2 etc., as this was used for Half-Life 1 and the -heapsize command got removed after some time in the Source code, as it caused many problems (e.g crashing the game), its better that you remove that line just to avoid any problems.Also, I've added some of your launch options in my thread, if you don't mind :)
 
Messages
135
Reaction score
173
Points
310
Location
Ireland
Is there a command to do the resolution? Because I put in the command line and every time I open up GMod, my resolution is the lowest one! I have to change it to 1366x768 EVERY TIME!?! Is there a command like +res 1366x768 or something like that?
 
Messages
6,894
Reaction score
17,921
Points
1,200
Location
North Rhine-Westphalia, Germany
Update:
28th of February, 2015 6:42PM: Added 2 more launch options and a "Nvidia user's" section.

Sorry for the bump, but I think that this one should be seen for those that have a Nvidia card.Look at the Nvidia user's section, it helped me when I simply forgot to set my Nvidia graphics card to maximum performance after a complete Window's reinstall.

Have fun!
 
Last edited:
Messages
64
Reaction score
62
Points
170
Location
Ireland
I can't do the nvidia part. I do have an Nvidia grahics card and the updated version of nvidia driver but when i open the Control Panel and i go to Manage 3D Settings i don't have the Yellow section that you have in this picture:
t4dgwJ2.png


Here is a picture of what i have:
e8de7eeb1578062df078e0ee10952506.png
 
Status
Not open for further replies.
Top