LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: Hardware acceleration boosts with other background applications  (Read 151 times)

jamiro

  • Newbie
  • *
  • Offline Offline
  • Posts: 3

Hi,

I'm using LWJGL for a program I'm currently writing, and I've had a frame drop happening frequently, which I figured it would be due to the fact that I'm using java and it would be normal. Currently my frames were about 40/50 fps for rendering the same scene, and I have a huge stability decrease when using other threads, their timings were getting sparse on each call. But the strange thing happened after I opened a youtube tab and while having a video playing in the background I noticed a huge increase in the fps (100+) and my thread timings were normalized as if I had a better performance on my program. So I decided to do some research and came to the conclusion that youtube videos use video codecs that require Hardware Acceleration which in turn help improving my program, giving my like 50% more performance than what I had before. Every time I paused the youtube video, the performance would decrease returning to the initial state. So I can only conclude that there are still some tweaks I can do somewhere to boost up my performance without the need to be listening to ramstein all the time. If so, I really wanted to know how. I've searched for all my hardware settings and haven't found anything that could be switched on windows, so I hope it would be only in LWJGL.

I appreciate any help on this topic as it seems a bit weird, and I'm really enjoying this lib.

Regards,

James
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1908
Re: Hardware acceleration boosts with other background applications
« Reply #1 on: November 25, 2017, 12:59:32 »

Please share more information about your system. OS? GPU? Driver version? Java version? How are threads used in your application?
Logged

jamiro

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Re: Hardware acceleration boosts with other background applications
« Reply #2 on: November 25, 2017, 13:27:17 »

The threads I'm refererring to are mainly 2, the one I use to play sounds which are triggered by the render thread, and the render thread itself, the one that progress all the information each step.

Info:

- OS:    Win 8.1 / 64x
- MEM: 12 mB ram
- GPU:  Geforce 840m
- Driver:333.02
- CPU:  i7-4510U 2.00GHz
- java:  1.7.0_10

and here is a debug info with the 2 cases


and for the left side, you can't see, but there seems to be having a low range of fps (between 29 and 59) whereas on the other case it ranges between 60 and 100+ (no fps limitiation on both cases)

and it also messes with other threads as I've seen and registered that their sleep timing isn't fixed, it changes a lot, so when I play sound clips on the first case I get a lot of desync sounds whereas on the other case the sounds play in harmony.

let me know if you need more info or anything more I can help you out.

hasn't this ever happened to anyone? did anyone tried to run a game with and without other Hardware acceleration running in the back to see what happens?
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1908
Re: Hardware acceleration boosts with other background applications
« Reply #3 on: November 25, 2017, 15:26:51 »

Try installing a tool that displays CPU/GPU clocks. Do the frequencies change significantly after opening youtube?
Logged

jamiro

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Re: Hardware acceleration boosts with other background applications
« Reply #4 on: November 25, 2017, 20:33:21 »

I can't seem to find any significantly differences between the 2 cases, maybe a little bit on the CPU at most, but in both cases they keep changing:

Before youtube


After youtube


Logged