Doom Comic
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Vsync = 100% CPU usage
 
Author
All times are GMT. The time now is 01:00. Post New Thread    Post A Reply
entryway
Forum Staple


Posts: 2733
Registered: 01-04


VSync = 100% CPU core usage even on MAP01. Why does it happen?

On 2 cores system:
PrBoom-Plus without VSync -> 1500fps -> 50% CPU usage
PrBoom-Plus + VSync -> also 50% CPU usage :(
PrBoom-Plus + VSync + forcing one core with SetProcessAffinityMask -> 5% CPU, lol

GZDoom with VSync -> 50% CPU

Forcing one core 'fixes' high CPU usage. WTF?

Simple test application also works as intended when VSync is enabled - about 5% loading

Old Post 02-17-13 20:19 #
entryway is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 7769
Registered: 01-03


My guess is it's a driver issue. Maybe it actively waits inside the driver if it runs on multiple cores.

Old Post 02-17-13 20:59 #
Graf Zahl is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
entryway
Forum Staple


Posts: 2733
Registered: 01-04



Graf Zahl said:
My guess is it's a driver issue. Maybe it actively waits inside the driver if it runs on multiple cores.

But it does not affect my simple application. Only 1-2% CPU usage there.

This code also does not help.
code:
D_Display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SDL_GL_SwapBuffers(); }

Last edited by entryway on 02-17-13 at 21:20

Old Post 02-17-13 21:05 #
entryway is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
entryway
Forum Staple


Posts: 2733
Registered: 01-04



entryway said:
But it does not affect my simple application. Only 1-2% CPU usage there.

By some reasons now it also takes 50%, heh.

Old Post 02-17-13 21:44 #
entryway is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 12655
Registered: 07-06


AFAIK, unless your application does nothing but passive OS event dispatching/handling, it WILL use all the power of a core unless you include a command explicitly yielding thread control back to the OS.

Now, VSYNC waiting might or might not do just that depending on the implementation at the driver or even at the SDL-driver interaction level.

Old Post 02-18-13 09:58 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06


Does lack of vertical synchronization get noticed by the human eyes?

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 02-18-13 13:09 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Mr. T
Senior Member


Posts: 1486
Registered: 12-03



printz said:
Does lack of vertical synchronization get noticed by the human eyes?


Vsync off = https://en.wikipedia.org/wiki/Screen_tearing

Old Post 02-18-13 13:28 #
Mr. T is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
schwerpunk
Senior Member


Posts: 2067
Registered: 05-12


I actually like the horizontal banding effect (from lack of Vsynch) that goes on during a sustained earthquake.

As an aside, the lack of Vsynch is very noticeable in the ZDoom map I'm presently working on for the monochrome project, where I've made a damage sector that flashes between 255 and 32 light level in 1 tic (!). I'd take a screenshot, but well, screenshots don't work that way. :P

Old Post 02-18-13 13:51 #
schwerpunk is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 01:00. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Vsync = 100% CPU usage

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.