Author Topic: Quake runs 100% CPU, why?  (Read 6871 times)

Offline PalaceGerbil

  • ShortBus
  • Newbie
  • *
  • Posts: 30
  • a reality type show
    • View Profile
  • Rated:
Quake runs 100% CPU, why?
« on: January 26, 2014, 03:02:22 AM »
Quake 2 runs at 100% CPU for me :alien:.  Server and client.  Urban Terror and Q3 also run like this.

The only way I've been able to reduce the CPU usage is by running an init.d script that backgrounds the execution.  At which point it it leaves the CPU rather cold.  I can't say that it ran better like that.  Oh yeah, I couldn't jump up on top of a box.  Like as if I were somehow shrunken by 10% -- but there was something I rather liked about it.  I cannot be playing with a disability.  :ohlord:

It's always 100% and it does not let go.  It looks very similar to RAM benchmarking.

Why is this?

I have a linux relatively up to date.
« Last Edit: January 26, 2014, 03:07:48 AM by PalaceGerbil »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline The Happy Friar

  • Opulent Member
  • *
  • Posts: 2089
    • View Profile
    • Fuzzy Logic Inc
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #1 on: January 26, 2014, 06:04:11 AM »
Strange, I didn't know Q2 was multithreading.  :?  Mine never runs @ 100% on windows.  In Lunix can you change the affinity of a program to use less cores?  You could use that to see if it really needs all your cores or not.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
q2server.fuzzylogicinc.com
d3server.fuzzylogicinc.com
l33t hacz over yonder.  ;) :)

Offline |iR|Focalor

  • Irrepressibly Profuse Member
  • *
  • Posts: 15766
  • Help Destroy America: VOTE DEMOCRAT
    • View Profile
    • Focalor's Horrible Website: We Rape You Til The Room Stinks
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #2 on: January 26, 2014, 09:24:56 AM »
Quake 2 runs at 100% CPU

That... makes sense. :D My old computer started having cooling problems not long after I started playing Q2 online regularly. When I first got the machine, it was pretty quiet. I played a few offline games on it like the Return to Castle Wolfenstein thing that I was never able to play on my older Win98 machine. But when I started playing Q2 online, it wasn't very long after that when the fans started sounding like god damn leaf blowers. Part of it was just the noisy shitty fan on the video card, but part of it was also the CPU fan. At some point the fan at the rear of the case failed and I didn't know about it, and that caused the other two fans to run much heavier than they should've, and ended up damaging several different components. I remember people used to call me on the phone while I'd be playing and would ask me to turn off the vacuum cleaner while I'm talking to them. I was always like, "Dude, thats my computer.... I know, right?" :D
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline haunted

  • Irrepressibly Profuse Member
  • *
  • Posts: 10149
  • I am hollywood.
    • View Profile
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #3 on: January 26, 2014, 12:33:23 PM »
Install Windows ME and use the new holywater version. All issues should be resolved.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline quadz

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5352
    • View Profile
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #4 on: January 26, 2014, 01:23:46 PM »
It's always 100% and it does not let go.  It looks very similar to RAM benchmarking.

R1Q2 server on Linux uses close to 0% CPU when idle. And even during rare events with 40 players on the server (like the Q2 15th anniversary FFA bash) it still uses less than 50% of a single core.

Which version of Q2 are you running on your server?


:exqueezeme:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
"He knew all the tricks, dramatic irony, metaphor, bathos, puns, parody, litotes and... satire. He was vicious."

Offline ex

  • Carpal Tunnel Member
  • ******
  • Posts: 1349
  • :>
    • View Profile
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #5 on: January 27, 2014, 09:34:38 PM »
Long shot, but... maybe try a virus/rootkit scan?  Sometimes when you get some bug on your PC, its goal is just to fuck up your computer in any way it can.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Quote
VaeVictis:
i find it funny that you even consider grammar a sign of intelligence, that itself is a very uneducated claim

http://alldeadmormonsarenowgay.com/

Offline The Happy Friar

  • Opulent Member
  • *
  • Posts: 2089
    • View Profile
    • Fuzzy Logic Inc
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #6 on: January 28, 2014, 05:22:28 AM »
Virtually all Q2 clients and servers are single threaded. I have never heard of anyone making a multi-threaded version.

That's why I thought doing something with the affinity might show it's not a Quake issue.  It shouldn't be using more then 50/33/25/etc. of CPU usage on a multicore system.  No system specs presented though, so he COULD have a Pentium MMX, 2, etc.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
q2server.fuzzylogicinc.com
d3server.fuzzylogicinc.com
l33t hacz over yonder.  ;) :)

Offline PalaceGerbil

  • ShortBus
  • Newbie
  • *
  • Posts: 30
  • a reality type show
    • View Profile
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #7 on: February 27, 2014, 02:00:44 PM »
When I say %100 cpu I refer to one logical processor unit.  On my single core its one hyperthread.

The only thing I could get out of strace that seems to occupy the majority is

"gettimeofday ({##,##}, {###,###})" = 0

# being numbers.  Which is very similar to KDE traces which are usually filled with those gettimeofdays.  KDE is C++ but I think it is the libc time getting function.  KDE does not run 100% but then again the gettimeofday's are slightly less frequent and they subside to some extent eventually.  Makes it very difficult to trace bugs.

In Q2 they appear in blocks of about 20 gettimeofday's.  There is also a

clock_gettime(CLOCK_MONOTONIC, {###,###}) = 0

also in blocks of 10-20, interspersed in the trace that does appear to be overtly connected with the gettimeofday.


When I run on the run level daemon, the daemon handler probably some how puts a check on the  gettimeofday  function through libc.  It probably running in between the program and the libc.  Its job is to handle these things after all.

Which may explain why when I run under the daemon -- I can't jump very high.  Sort of.


Urban terror also runs in a similar fashion.


All this is fine by me anyways, I was just wondering if there was conclusively a rational for running consecutive calls to the time.  Which if you did not know happens during server client sync.  Maybe in other instances.  Perhaps several functions all call for time and the time calls all get executed at once.  Which would mencingly  suggest its ease of aggregation in one single time call with 0 rewrite.   No?


Other interesting things in strace.... when handswitching, you can see the array search of the the config settings for the static change on the local client.  It searches until it finds it.  So if this and other game action sets where on top it would perhaps leave open the possibility of slightly optimized usage.  Although the overhead for that array is nearly nil it is getting stronger everyday.

  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline |iR|Focalor

  • Irrepressibly Profuse Member
  • *
  • Posts: 15766
  • Help Destroy America: VOTE DEMOCRAT
    • View Profile
    • Focalor's Horrible Website: We Rape You Til The Room Stinks
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #8 on: February 27, 2014, 03:09:44 PM »
If you are seeing 100% CPU usage in Windows on an idle Q2 server then you have screwed up your Windows scheduling or messed with the code in Q2 to cause it. Either that, or your running a computer from 1986.

Yeah. What he said.

Bottom line, if your computer is having problems running Quake2... take a big fucking hand cannon of a  pistol, shoot your computer 3 or 4 times, toss it out the back door as far as you can, then go buy another computer. And then try not to fuck the new one up like you obviously did the last one. Because if your computer can't run Quake2, then chances are real good that it can't run a lot of other shit either, in which case it's an outdated and useless fucking paperweight.

You can actually get a decent brand new modern computer for pretty cheap these days. Used to, you'd be looking at 2 grand or more for something up to date. You can find one now for 500 or less. It might not have the special doo-dads and outrageous specs that give nerds raging boners, but for everyday home use, it'll get the job done. And it's a helluva lot better than pulling your hair out for hours and days on end trying to fix something that refuses to cooperate.
« Last Edit: February 27, 2014, 03:15:46 PM by |iR|Focalor »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1372
    • View Profile
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #9 on: February 27, 2014, 10:06:50 PM »
When I say %100 cpu I refer to one logical processor unit.  On my single core its one hyperthread.

The only thing I could get out of strace that seems to occupy the majority is

"gettimeofday ({##,##}, {###,###})" = 0

# being numbers.  Which is very similar to KDE traces which are usually filled with those gettimeofdays.  KDE is C++ but I think it is the libc time getting function.  KDE does not run 100% but then again the gettimeofday's are slightly less frequent and they subside to some extent eventually.  Makes it very difficult to trace bugs.

In Q2 they appear in blocks of about 20 gettimeofday's.  There is also a

clock_gettime(CLOCK_MONOTONIC, {###,###}) = 0

also in blocks of 10-20, interspersed in the trace that does appear to be overtly connected with the gettimeofday.


When I run on the run level daemon, the daemon handler probably some how puts a check on the  gettimeofday  function through libc.  It probably running in between the program and the libc.  Its job is to handle these things after all.

Which may explain why when I run under the daemon -- I can't jump very high.  Sort of.


Urban terror also runs in a similar fashion.


All this is fine by me anyways, I was just wondering if there was conclusively a rational for running consecutive calls to the time.  Which if you did not know happens during server client sync.  Maybe in other instances.  Perhaps several functions all call for time and the time calls all get executed at once.  Which would mencingly  suggest its ease of aggregation in one single time call with 0 rewrite.   No?


Other interesting things in strace.... when handswitching, you can see the array search of the the config settings for the static change on the local client.  It searches until it finds it.  So if this and other game action sets where on top it would perhaps leave open the possibility of slightly optimized usage.  Although the overhead for that array is nearly nil it is getting stronger everyday.

Oh. You're on Linux. I didn't notice that fact before but I don't think you mentioned it originally.

Build a non-debug version of your client and run it outside KDE. Strace uses lots and lots of CPU to trace your program and isn't intended to be running except for detailed debugging. Asking why your client uses 100% CPU in strace mode is like asking why is the sun hot... answer: it does that.

As for the rest of the above quoted text. WTF are you talking about, dude?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline yahoo

  • Opulent Member
  • *
  • Posts: 2291
  • Quake II | Powered by SMF 1.0.9.
    • View Profile
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #10 on: February 28, 2014, 12:46:29 AM »
just use winxp as a server or client.

Should you insist, why not run a dedicated Linux server? would be more efficient that way.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Quake II | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

Offline Jay Dolan

  • Swanky Member
  • *****
  • Posts: 644
    • View Profile
    • Quetoo.org
  • Rated:
Re: Quake runs 100% CPU, why?
« Reply #11 on: February 28, 2014, 04:53:50 AM »
So.. a couple of things here:

1) The Quake2 client should use 100% CPU if you're spawned and playing. Especially older clients. Almost all of them have a busy-wait loop (that gettimeofday() thing that PalaceGerbil mentioned). Basically, Quake2 only has millisecond precision for frame intervals. Therefore, if your machine is capable of > 1000fps, the main loop in Quake2 will sit on gettimeofday() until 1 millisecond has elapsed since the previous frame. Almost all modern computers can easily hit 1000fps in Quake2.

2) 100% CPU utilization is not a bad thing when playing a game. You're not gonna hurt your computer's feelings, it's not gonna get tired and walk off the job. Basically, don't sweat it. It's doing precisely what the fuck it was built to do. And yea, remember, we're talking 100% of one core, because Q2 engines are not multithreaded.

3) Except Quake2World, which actually does use as many cores as you have. Unfortunately, there's only so much work that can be parallelized in Quake, and so YMMV in terms of performance gain. On some maps, especially those with weather effects, having at least 2 threads is helpful. And having 2-4 threads never results in a lower framerate.

4) If your Quake2 *server* is using 100% CPU when idle, it may be starving for I/O. You mentioned something about backgrounding the process. Try running it through `screen`. That will give it proper stdin/stdout/stderr file descriptors while you can detach from it, logout, whatever. It's been the preferred way to run Quake servers since NetQuake.

 

El Box de Shoutamente

Last 10 Shouts:

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 22, 2024, 06:52:56 AM

Login with username, password and session length