Warcraft II Forum

Warcraft II => Server.War2.ru => Topic started by: iL on February 15, 2015, 06:04:51 PM

Title: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: iL on February 15, 2015, 06:04:51 PM
The problem: war2 always uses 100% of 1 core CPU.

Based on the same project by R1CH for StarCraft.
Thanks to xboi209 for idea and link to that project.
My research for war2 addresses in memory.

The only problem is still active is in chat CPU highload (inherited from starcraft project). In other menus and in game CPU usage reduced to almost 0.

Start this console application before or during the game. It will wait until you run war2 and injects into it when it's running. Don't close it until exiting war2. It will close itself after war2 is closed.
That's just an alpha version. Test it, report if it works fine or any existing bugs and i'll include it to the next loader version probably.

Here's the link: ftp://ftp.war2.ru/war2/utils/cpusavior_il.rar
Updated. Version 2 is here:
ftp://ftp.war2.ru/war2/utils/cpusavior_cmd.rar
Title: Re: War2 100% of 1 core CPU load - CPU Savior
Post by: SmurfKinG on February 15, 2015, 06:21:48 PM
didnt quite get what this thing does...

speeds things up?
Title: Re: War2 100% of 1 core CPU load - CPU Savior
Post by: Teron-Gorefiend on February 15, 2015, 11:34:32 PM
Wow. I will definetely try it il....War2 is such a core hogger. Eats up 100% CPU on single core and 50% on a dual core uselessly....At times, I have to close the game if I'm doing some heavy lifting on my PC (100+tabs open, video encoding etc)

Thank you for the great work.
Title: Re: War2 100% of 1 core CPU load - CPU Savior
Post by: iL on February 15, 2015, 11:45:16 PM
didnt quite get what this thing does...

speeds things up?
War2 is such a core hogger. Eats up 100% CPU on single core and 50% on a dual core uselessly....
this. And this thing fixes it (everywhere except chat)
Title: Re: War2 100% of 1 core CPU load - CPU Savior
Post by: Teron-Gorefiend on February 16, 2015, 12:10:00 AM
This means if I want to have lower CPU resources used when not gaming/afk, I must create a private game and stay there?
Title: Re: War2 100% of 1 core CPU load - CPU Savior
Post by: iL on February 16, 2015, 01:23:36 AM
This means if I want to have lower CPU resources used when not gaming/afk, I must create a private game and stay there?
Probably yes...
Not sure, someone told that that CPU highload in chat resolved for starcraft already also. Let me know if someone find the source code, i hope i'll be able to port it to war2 then to resolve the problem totally...
Title: Re: War2 100% of 1 core CPU load - CPU Savior
Post by: Teron-Gorefiend on February 16, 2015, 09:09:49 AM
@il: Does not work in chat screen
Works in game chat screen mode. HOWEVER, it creates a micro lag with mouse which results in some jittery mouse movements....
Title: Re: War2 100% of 1 core CPU load - CPU Savior
Post by: shesycompany on February 19, 2015, 09:49:08 AM
lots of single core programs utilize 100% of a core.
back in my tinkering 2006-08 days i got war2.ru to do online with a 386 33 mhz.  editing the sprites to framskip in a mpq editor and making the tileset all black. so anyone with a old comp and want to mess with it there is some fun to be had :) .

sory had a flashback  :'(  (edit) pre 2000 programs maybe be more correct i know lots of my old games do but the newer single seem to throttle. would be a nice fix
Title: Re: War2 100% of 1 core CPU load - CPU Savior
Post by: iL on February 19, 2015, 03:35:48 PM
Updated. Version 2 is here:
ftp://ftp.war2.ru/war2/utils/cpusavior_cmd.rar

Thanks a lot to R1CH again, i contacted to him and he published his lastest version source code and also described how it works.
That helped me to release this new version also.

@il: Does not work in chat screen
Fixed this.

Works in game chat screen mode. HOWEVER, it creates a micro lag with mouse which results in some jittery mouse movements....
Probably fixed this also.
I have no idea how to check that mirco lag, but i think it should be fixed. Teron-Gorefiend, can you check that?

Tell me about any other bugs you found.
Title: Re: War2 100% of 1 core CPU load - CPU Savior, updated
Post by: GaNzTheLegend on February 19, 2015, 10:04:44 PM
if you have cpu problems with war2, you have a shitty computer
Title: Re: War2 100% of 1 core CPU load - CPU Savior, updated
Post by: xboi209 on February 20, 2015, 01:24:11 AM
if you have cpu problems with war2, you have a shitty computer
You obviously don't understand what's happening. WarCraft 2, like other Blizzard games, runs through an infinite loop with no throttling. This means that the faster your processor can work, the more loops per second the game is running through.
It's highly unnecessary to run the loop a hundred times per second for example(especially when the FPS is locked to a number <30) and it'll shorten the lifetime of your processor if you make it work at 100% capacity for long periods of time.

So based on your logic, having a fast processor means you have a shitty computer, which I disagree.
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: GaNzTheLegend on February 20, 2015, 08:23:06 AM
dude I have an I7-3930k 6 core processor and war2 only uses 7%.
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: xboi209 on February 20, 2015, 10:53:00 AM
Well, I'm quite curious about your computer then. I can assure you however, 100% cpu usage is not uncommon and many people have had the same problem even with good processors.
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: shesycompany on February 21, 2015, 09:46:23 PM
100 / 6 = 16% it probably should use less than 7%, nice proc man.   good work il :)
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: tolsty on February 22, 2015, 11:45:01 AM
i7-3770K CPU 3.5 GHz (junk - three years)
100/8=13%
f... fuel resources economy )))
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: EviL~Ryu on February 22, 2015, 01:10:53 PM
Why you use a bot to idle in chat instead of cilent.

Sent from my Motorola DynaTAC 8000X

Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: shesycompany on February 23, 2015, 02:23:49 PM
lol tolsty, i love my amd e processors saving the enviroment.
u can have your smog infested cpu's!
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: iL on February 24, 2015, 05:44:29 AM
i7-3770K CPU 3.5 GHz (junk - three years)
100/8=13%
f... fuel resources economy )))
Yes, 8 cores is fine!
I don't think there's a lot of people with such workstation configuration used to war2 now.

Well, i just tried it on win 8.1 and win 10 - it crashes war2. Looks like different addressing under win8+ or w/e...
I'll fix that when i have time.
I'd hope on your help for testing this thing for different configurations.
I think such CPU savior would be great to include to war2 loader, but need some more alpha-testing before that.
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: LUSTB1TCH on February 28, 2015, 11:45:27 AM
THIS IS AN ISSUE I ALWAYS WONDERED ABOUT. IL FINALLY GOT THE SOLUTION! NO MORE 100% CPU UTILIZATION. NOW, V2 IS INDEED AN IMPROVEMENT OVER V1. I HAVE PLAYED MANY GAMES ON IT. HOWEVER SOME LAG REMAINS. LOOKING FORWARD TO V3!!!
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: Teron-Gorefiend on February 28, 2015, 11:49:15 AM
THIS IS AN ISSUE I ALWAYS WONDERED ABOUT. IL FINALLY GOT THE SOLUTION! NO MORE 100% CPU UTILIZATION. NOW, V2 IS INDEED AN IMPROVEMENT OVER V1. I HAVE PLAYED MANY GAMES ON IT. HOWEVER SOME LAG REMAINS. LOOKING FORWARD TO V3!!!

Hi lustbitch. NO lag on a dual core. Works absolutely perfectly. Try increasing war2 priority ...?
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: LUSTB1TCH on March 01, 2015, 02:57:33 PM
HEY TERON! INCREASING PRIORITY DOESN'T SEEM TO MAKE ANY DIFFERENCE ON MY SYSTEM... SO V3 !!!! AND SO THAT I CAN ENJOY LAG-FREE, LOW CPU WORKLOAD ON MY VERY LATEST AMD ATHLON XP SYSTEM!!
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: O4L on July 09, 2015, 08:32:15 PM
Just now trying this, and seems like its doing wonders! This makes the game so much more enjoyable for me again to actually play without freezes.
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: Warchief Lightbringer- on April 04, 2016, 06:22:50 AM
Heh il great work man! I just started using it while streaming. Allows me to do other stuffs too on my PC with war2 minimised :)

If people have a Win8/10 system, there is less of a possibility that they might need it (powerful enough system)!
Title: Re: War2 100% of 1 core CPU load - CPU Savior, version 2
Post by: iL on April 06, 2016, 06:42:18 AM
Source code and development discussions splitted there: http://forum.war2.ru/index.php/topic,2093.0.html (http://forum.war2.ru/index.php/topic,2093.0.html)