Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (542)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (604)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  FPS issue - alt-tab boosts performance  (Read 10897 times)
0 Members and 1 Guest are viewing this topic.
Offline Donald_W

Senior Newbie





« Posted 2012-04-03 12:32:18 »

I have a weird issue (on Linux, haven't tested it on Windows yet) with FPS.
When I start my application I get about 40 FPS. But when I switch to another application (alt-tab) and back again I get performance boost up to 120 FPS.

Any ideas what have I done wrong?
Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #1 - Posted 2012-04-03 12:52:26 »

I have a small hunch... Do you have an NVidia card? If so, can you check the CPU usage before and after it speeds up?

Myomyomyo.
Offline Donald_W

Senior Newbie





« Reply #2 - Posted 2012-04-03 13:15:29 »

Graphics card: nVidia Corporation GF108 [Quadro NVS 4200M]

Before alt-tab I have like 100% core usage on one core, after switching off and back again all cores are under 40% (I have lots of stuff running so it is ok, I guess Smiley).
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 849
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2012-04-03 13:39:58 »

Recent nVidia drivers toggle multithreaded and singlethreaded implementations of their driver at will. The minimize/maximize action probably triggers the switch. It's likely that theagentd can fill you in on the details.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #4 - Posted 2012-04-04 11:26:41 »

Recent nVidia drivers toggle multithreaded and singlethreaded implementations of their driver at will. The minimize/maximize action probably triggers the switch. It's likely that theagentd can fill you in on the details.
Exactly. Open up the NVidia Control Panel and disable Multithreaded optimization. My hunch was right! =D

Myomyomyo.
Offline gimbal

JGO Knight


Medals: 25



« Reply #5 - Posted 2012-04-04 18:58:12 »

I'm on the fence about this fact really. It seems nVidia has made the jump to making something which should be as dumb as possible (a driver) into something which is trying to be clever which adds unpredictability. I don't approve even if it provides a performance boost (40 - 120 is a bit absurd really), the means don't always justify the end...
Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #6 - Posted 2012-04-04 19:08:28 »

Nonono, you got me wrong! From my experience the driver multithreading reduces performance. For me the driver enabled the "optimization" at when I started my game and disabled it after a while when it realizes that it's actually hurting performance. Therefore disabling it instead of setting it to Auto in the control panel gave me consistent good performance. You can of course also set it to always on to test which one it is.

It might also be good to not do too many draw calls each frame. =)

Myomyomyo.
Offline gimbal

JGO Knight


Medals: 25



« Reply #7 - Posted 2012-04-06 13:22:13 »

I see. The question is: what is the default setting? If its auto -> I stick to my opinion Wink
Offline sproingie

JGO Kernel


Medals: 202



« Reply #8 - Posted 2012-04-06 15:54:29 »

I suspect the multithreading optimization boosts response for multiple contexts at the expense of performance of any single one.  As for video drivers being "dumb", I think we lost that fight ages ago.  Now every OpenGL driver has to include a fully optimizing compiler, among other nonsense.

Gallium to the rescue ... whether that happens within my lifetime remains to be seen.
Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #9 - Posted 2012-04-07 09:19:57 »

I see. The question is: what is the default setting? If its auto -> I stick to my opinion Wink
o_O Okay, tell me your address and I'll fly over to your house, open the NVidia control panel, check it for you and then fly back to Japan. You'll pay for the tickets, right?

The Linux driver can't be that much different from the Windows driver, right? >_>

Myomyomyo.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gimbal

JGO Knight


Medals: 25



« Reply #10 - Posted 2012-04-16 09:14:15 »

I see. The question is: what is the default setting? If its auto -> I stick to my opinion Wink
o_O Okay, tell me your address and I'll fly over to your house, open the NVidia control panel, check it for you and then fly back to Japan. You'll pay for the tickets, right?

The Linux driver can't be that much different from the Windows driver, right? >_>

Not everyone has an nVidia card dude Sad
Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #11 - Posted 2012-04-16 09:36:28 »

I see. The question is: what is the default setting? If its auto -> I stick to my opinion Wink
o_O Okay, tell me your address and I'll fly over to your house, open the NVidia control panel, check it for you and then fly back to Japan. You'll pay for the tickets, right?

The Linux driver can't be that much different from the Windows driver, right? >_>

Not everyone has an nVidia card dude Sad

Then you don't have the problem since as far as I know, it's something Nvidia came up with...

Myomyomyo.
Offline gimbal

JGO Knight


Medals: 25



« Reply #12 - Posted 2012-04-16 12:14:35 »

I see. The question is: what is the default setting? If its auto -> I stick to my opinion Wink
o_O Okay, tell me your address and I'll fly over to your house, open the NVidia control panel, check it for you and then fly back to Japan. You'll pay for the tickets, right?

The Linux driver can't be that much different from the Windows driver, right? >_>

Not everyone has an nVidia card dude Sad

Then you don't have the problem since as far as I know, it's something Nvidia came up with...

No? I do want my stuff to run properly on nVidia hardware even though I don't currently own a board myself Wink Hence my interest.
Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #13 - Posted 2012-04-16 13:01:45 »

Not much to do except tell people to disable it manually. My computer's dead now, so I can't tell you how right now. Sorry for being so mean there...

Myomyomyo.
Offline gimbal

JGO Knight


Medals: 25



« Reply #14 - Posted 2012-04-16 13:12:38 »

Not much to do except tell people to disable it manually. My computer's dead now, so I can't tell you how right now. Sorry for being so mean there...

No worries. If this has any kind of serious impact, it will be seen in critical games like Skyrim and the like as well so if nVidia handles it badly it will likely be reverted to a more sane default setup.
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 849
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #15 - Posted 2012-04-16 13:16:35 »

Not much to do except tell people to disable it manually. My computer's dead now, so I can't tell you how right now. Sorry for being so mean there...

No worries. If this has any kind of serious impact, it will be seen in critical games like Skyrim and the like as well so if nVidia handles it badly it will likely be reverted to a more sane default setup.
Unfortunately, it's been like this for almost a year, IIRC.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #16 - Posted 2012-04-16 14:00:47 »

Not much to do except tell people to disable it manually. My computer's dead now, so I can't tell you how right now. Sorry for being so mean there...

No worries. If this has any kind of serious impact, it will be seen in critical games like Skyrim and the like as well so if nVidia handles it badly it will likely be reverted to a more sane default setup.
Unfortunately, it's been like this for almost a year, IIRC.

Yeah. It becomes even worse with heavily threaded programs...

Myomyomyo.
Offline gimbal

JGO Knight


Medals: 25



« Reply #17 - Posted 2012-04-17 07:59:23 »

Unbelievable :s

I retract my previous statement also. I've been scouting around some forums and I see plenty of evidence that people are willing to dive into the settings to make manual changes and accept that as a reasonable fix to a problem. I should have reasoned that any gamer that still plays on the PC today is likely to be a bit more tech-savvy. Better to keep these kind of occurrences in the back of the head so it can be offered as advice I guess :/
Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #18 - Posted 2012-04-17 08:48:36 »

I need at least 8x MSAA + alpha to coverage if I'm to play on my 24' screen or the shimmering is way too annoying. Preferably also some supersampling for specular antialiasing. On my laptop I can hardly notice aliasing with 2x MSAA only. Higher pixel density, ridiculous ghosting and view angle dependant gamma makes more AA unnecessary. Still, once you start using that control panel you won't be able to live without it.

Myomyomyo.
Offline princec

« JGO Spiffy Duke »


Medals: 439
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #19 - Posted 2012-04-17 09:04:58 »

I prefer to avoid games that try to be photorealistic and go for more stylised experiences that lead to more stimulation of my imagination Smiley

That said, I am rather enjoying BF3. Shame I'm so rubbish at it.

Cas Smiley

Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #20 - Posted 2012-04-17 09:18:07 »

I've never heard of jaggies, shimmering and Moire patterns being part of the style... >_>

Myomyomyo.
Offline Roquen
« Reply #21 - Posted 2012-04-17 09:46:21 »

I'd assume this is like the power management options...they assume that kids playing games know how to muck around with stuff, while your average number cruncher may not (say Mathematica + some CUDA/OpenCL/etc processes).
Offline princec

« JGO Spiffy Duke »


Medals: 439
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #22 - Posted 2012-04-17 10:22:37 »

I've never heard of jaggies, shimmering and Moire patterns being part of the style... >_>
Ah bless, too young to remember  Roll Eyes

Cas Smiley

Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #23 - Posted 2012-04-17 11:44:10 »

I've never heard of jaggies, shimmering and Moire patterns being part of the style... >_>
Ah bless, too young to remember  Roll Eyes

Cas Smiley
I force supersampling in old 2D games to reduce shimmering. Is there a problem? :s

Myomyomyo.
Offline princec

« JGO Spiffy Duke »


Medals: 439
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #24 - Posted 2012-04-17 12:32:32 »

Ah those games are just made wrong then Wink

Cas Smiley

Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #25 - Posted 2012-04-18 06:16:34 »

Indeed. They were obviously made before before texture filtering was invented, let alone mipmaps. (Yes, I'm looking at you, Minecraft)

Nearest neighbor filtered sprites look so much better with 8x SSAA. XD

Myomyomyo.
Offline Roquen
« Reply #26 - Posted 2012-04-18 13:49:34 »

Texture filtering? Antialiasing?  You didn't need any of that kinda stuff with fantastic TV's (Big fat and deep CRTs if you've ever seen one) as a display device.  PAL/NTSC (never twice the same color) auto-magically antialiased for you with the most pleasing blur any 70s/80s kid could imagine. As an added bonus, it seemed like there were more colors than the hardware actually supported.
Offline gimbal

JGO Knight


Medals: 25



« Reply #27 - Posted 2012-04-18 14:39:24 »

(Big fat and deep CRTs if you've ever seen one)

Sony Trinitron ftw. Best TV I've ever owned and probably will ever own and I nearly broke my back lugging it up to the attic (with help; its too big to hold for one person only). Such audio quality also, I need to buy a darned good speaker setup to match it nowadays!
Offline BoBear2681

JGO Coder


Medals: 19



« Reply #28 - Posted 2012-04-18 15:14:54 »

You haven't lived until you've played Super Mario Bros. on an original NES on a 60+" LED TV.
Offline theagentd

« JGO Bitwise Duke »


Medals: 366
Projects: 2
Exp: 8 years



« Reply #29 - Posted 2012-04-18 17:31:13 »

Strange. My eyes mentally hurt.

Myomyomyo.
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (15 views)
2014-12-27 22:38:51

Mr.CodeIt (13 views)
2014-12-27 04:03:04

TheDudeFromCI (17 views)
2014-12-27 02:14:49

Mr.CodeIt (25 views)
2014-12-23 03:34:11

rwatson462 (56 views)
2014-12-15 09:26:44

Mr.CodeIt (46 views)
2014-12-14 19:50:38

BurntPizza (92 views)
2014-12-09 22:41:13

BurntPizza (113 views)
2014-12-08 04:46:31

JscottyBieshaar (86 views)
2014-12-05 12:39:02

SHC (97 views)
2014-12-03 16:27:13
How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!