[FIX] Possible fix for lagspikes and other peformance issues on quadc(or more) CPU's


Well, my other Mods using SDK2007 are running fine !

No more room in hell for example doesnt have these Stuttering issues as far as i can tell.
So it must be a BMS specific problem…

Selecting all but Core0 and all the other “fixes” doesnt work !
Is there anyone who can play the game “WITHOUT ANY STUTTERING/LAG ISSUES” ?


Yup, me :stuck_out_tongue:

Im surprised at the number of issues people are having. I’ve had ZERO problems, only fps dropping to about 40 during QE which I think is simply due to the level of detail the developers achieved. My specs:

Q6600 OCed to 3.6
Radeon 5800

I also experienced no performance changes when adjusting affinity/cores for BM. Unless I disabled cores of course.


Me too, have had no stuttering, lag issues at all! Im too surprised about the issues people are facing, I had zero issues during the course of my 3 playthroughs (one playthrough for each difficulty, lol)

Phenom II X4 945 @ 3Ghz
8gigs of RAM @ 1333Mhz
HD 5770 1GB @ 20% OC


Are you kidding me ?!
So you had no stuttering issues like people with even better rigs ?
For example if you shoot the Magnum after some Loading/new level you dont get a second stuttering ?
Go ahead and proof your statement, record a short video and upload it.
Otherwise you just lie… or your 2 lazy to recognize stuttering …
I watched like 10 Lets play videos and all had this stuttering issue.

Do you even know what “stuttering” is and what we are talking about here ?


For the lazy ones: There’s a tool that I know from Thief II (also some beef with multi CPU), called WinLauncherXP.

find it at MajorGeeks: http://www.majorgeeks.com/download870.html

Adding a config => see here

Adding the executable und setting priority => see here
Steam users just place the image-path for “steam.exe” others the image page to “hl2.exe”

core affinity => see here

If you have to rely on commandline options than you might encouter probs. In this case you’ll have to alt-tab out. Cheers


Oh with delight I do that on <Cybertrance’s> behalf:


my rig (on which the video was recorded):
AMD Phenom II X2 [email protected] GHz
Zotac GTX260
8 GIG of RAM

Blur: disabled (i hate blur, so it’s off, but it might also be a reason for stuttering, didn’t test that)
Hdr: on (when possible)

see … i’ve been programming games, game engines and core-junk around games for almost the last 20 years now. There are many things in BlackMesa that don’t work as they should or are glitchy or whatever.

In nearly ALL cases the reason is the underlying SourceEngine, and just to be clear: BlackMesa did an incredible job dealing with it. And also to be clear: the SourceEngine is nevertheless a beautiful engine.

I realize that one of the most aggravating things you can encounter, when you have a problem with software is that other users jump up and wave “not here, matey!”. They maybe try to be supportive to the guys who gave us this masterpiece, or they might try to tell to you that maybe some config has gone awry.

I do not expect that the average gamer understands every technical reason for every problem, but - in case the video above was what you wanted to see - I only expect you to show some Gentleman-ship and apologize to <Cybertrance’s> for your cough statements.

Forgot to mention, when dealing with lags and cpu-spikes, pls always make sure your taskbar isn’t laden with all the “friendly” apps, that gather there over time.
a) kill all messengers like Skype, YM, ICQ … before playing (if you can on don’t need them for team-speak)
those can be unpredictable CPU-hogs, especially when you have plugins installed.
b) kill every friggin updater, push service cr**, and cloud synchronizers while you play (restart them afterwards if you must)
c) “park” or pause all “heavy weight” anti-virus proggies
only prog i have found to not interfere in the slightest is MSE. then again: don’t really test other packages as I hated Symantec already when it was still called Norton.
maybe it helps - ciao


Changed audio from stereo to 7.1 and that fixed the lag for the last scene for me.
I have stereo speakers and 7.1 surround hooked at the same time.
mat_queue_mode 0 also seemed to help.


A “better rig” does not guarantee system resources are being utilized efficiently.


Every time i’ve played BMS the first kill in the game provides a very strange lag. (caused by gibs/physics ?)
And it is only by killing an enemy and only the first one!

My System are:

Asus M4A78-EM
AMD Phenom II X4 940
HD5770 1GB DDR5 RAM (driver 12.1)
4 GB DDR2-800 RAM
Windows 7 Ultimate x64

I’ve used these commands in autoexec.cfg but it didn’t work for me!

mem_max_heapsize "3000" cl_forcepreload "1" snd_mix_async "1 snd_async_fullyasync "1" mat_queue_mode "0" r_dynamiclighting "0"

I’ve changed heapsize to every number, the sound settings from 2 Speakers to 7.1, the Affinity to Core 2, 3 and 4
(used Windows Taskmanager, WinLauncherXP, CPU-Control)
but it has no effect in the game!


Okay new information …
the lags occur only when I select a resolution, which is not 4 : 3

[COLOR=‘Red’]And now even the right Multi-Core commands, god damn!

mat_queue_mode -1/0/1/2
threads 1/2/3/4
snd_mix_async 1
r_threaded_renderables 1
r_threaded_particles 1
ai_expression_optimization 1

cl_forcepreload 1
sv_forcepreload 1

I don’t know who said mat_qeue_mode must set to 0.
If someone has a Multi Core CPU, you have to use -1 (game use system defaults)
0 uses synchronous single thread, 1 uses queued single threaded mode,
and value of 2 (caused crashes) uses multi-threaded mode.

[COLOR=‘DarkRed’]source: http://www.tweakguides.com/HL2_8.html

And Thank you for answers and help! Egos


I can run black mesa with everything maxed out and no lag, but its the load times which annoy me.

I have pretty much the same hard drive setup as you. I tried to do this with normal windows 7 shortcuts, but steam doesnt understand them

I understand the “mklink /D D\Steam…” part, but how do i actually create the symbolic link?

Dont worry i got it sorted, you have to type this into command prompt to create the link.


I had an incredible fps drop there, from 100+ to 7fps while I was with that monster.

BUT I’ve tested many of the suggestions here (affinity changes does nothing in my case) but looking into the “cmd mat_queue_mode” I’ve found this

"mat_queue_mode" = "2" ( def. "-1" )
- The queue/thread mode the material system should use: 
 0=synchronous single thread, 
 1=queued single thread, 
[U][B] 2=queued multithreaded[/B][/U]

I set that command to 2 and now I have 60+ FPS in that level and I don’t have any FPS drop anymore, BUT it comes with a price.
[COLOR=‘Red’]Setting this to 2 (queued multithreaded) causes random crashes, only use it where you see you are having a hugh fps drop and makes it unplayable.

r_dynamiclightning 0 also helped me a few times.


  • CPU: Intel Core2 Quad Q6600 @3,2 Ghz
  • MEM: 4GB DDR2 @800 Mhz
  • GPU: ATi Raedon HD 4890 @980 Mhz
  • Settings: Everything max with NOAA and VSync disabled (same fps with AAx4).


That’s because source engine 2007 doesn’t support multicore rendering or at least Black Mesa doesn’t.


Those game u all don’t want to hear (so the Source version of HL) has multi cpu support, u can choose if u want to activate it or not


Nope, Source SDK 2007 dont havve multicore support and u cannot choose it.
But hen u write command mat_queue_mode 2 in console game crashes.


Well, then those game is built on older engine, cause I could place a check mark to it


Didn’t work for me… running a quadcore


Didn’t work for me either. I did notice a slight improvement when I oc’ed the Q6600 quad from 2.4 to 2.5 ghz.


I just noticed something! I apologize if this has already been mentioned!

When I look at the task manager, there is one core (CPU 0 I believe) that is constantly maxed out. The rest are just kinda… doing a teeny, tiny bit. As expected, this is the same case when changing the affinity to use only CPU 0.

Here’s the interesting thing. When I change the affinity back to using all 4 cores, the CPU usage is now distributed almost evenly among each core! I am going to test it a bit more, but I was not getting frame drops in places I normally would! Could this be a bug? Well, maybe not a bug… but it’s definitely odd to me.

Mat_queue mode is still set to -1 after resetting the affinity, so it doesn’t seem to be changing that somehow… I haven’t seen any crashes yet either, and I usually get them quite consistently when using mat_queue 2.


I’ve found that this works with No More Room in Hell!


all this (core 0 100% usage bug) is because multi-threaded exe’s don’t run(at all) on single cores and Valve wants to keep support for single cores for as long as possible


This solution appeared to work at first, but failed shortly thereafter. I doubt it, but I wonder if it could be attributable to having loaded a saved game (since such sw and hw matters should/would be mutually exclusive).