Question Serious lag and FPS on all settings, very decent desktop

aurifelix

New Member
Intel i7-4770 CPU @ 3.40 GHz

16GB RAM DDR3 4000MHz

GIGABYTE NVIDIA GTX 770

Intel 240GB SSD

Windows 7 Ultimate 64 bit


So I've tried all the graphic preset settings, and a few individual ones yet nothing seems to help the bad lag.

Sorry if there has been resolved but I couldn't find a solution.


Is there one?
 

manu3d

Active Member
Contributor
Architecture
Hi aurifelix,

indeed your system should be perfectly capable of handling the graphic aspect of the game: I have an inferior system (slower CPU, slower GPU) and I can get reasonably good performance (30fps) even with all graphic settings maxed out. Can you use the F3 and F4 buttons to bring out some statistics? In particular frame per second (F3) and with the F4 you might be able to see if something is taking an inordinate amount of time, measured in milliseconds. If you do not see any change in frame rate while changing the graphic settings though, it might be a sign the problem is elsewhere. Checking the logs might also shed some light on the problem.

Also, any chance that your system also has an integrated GPU? Sometimes you need to make sure that a program is NOT using it, so that your GTX 770 is used instead. That would certainly explain very poor performance.
 

aurifelix

New Member
It goes between 10 and 20 FPS mostly, occaisionally rising to 60, but lagging back down to 20 when rendering, which seems to be taking upwards of 19ms.

I don't have a laptop so I don't really know how to check to see if the program is using my dedicated GPU, as a desktop it should automatically do that shouldn't it? Laptops have the weird Optimus switching preference features.

Is there a way which I can check if Terasology is using my integrated GPU?
 

prestidigitator

New Member
Contributor
I'm currently working on a PR for better management of threads, which could help here. There are currently a few different thread pools sprinkled throughout the game, with a rather large number of active threads in them (one pool has 16, I think another has 8, another 4, and there are a few around that start up their own threads for various reasons). It shouldn't be too much work to switch this to using a single pool-based ExecutorService that can be tuned for your system (e.g. with commands to set the number of core and maximum threads). Then individual schedulers (TaskMaster objects) can limit the number of active tasks they queue to execute and dynamically prioritize them within their own "pool".

EDIT: Actually, it's worse than that. There are a number of unbounded thread pools created in some places. Hmm.
 
Last edited:

manu3d

Active Member
Contributor
Architecture
@prestidigitator: Hmmm... aurifelix's problem seems unusual, in the sense that a system like his should provide a better performance. The issue you are mentioning is certainly worth looking into, but I imagine it affects everybody, not just aurifelix.

@aurifelix: 19 ms for rendering wouldn't be too bad on its own as it would correspond to a respectable 50+ fps. I'd be interested in seeing the numbers you get for rendering when the frame rate is down to 10-20 fps. Also, I imagine you waited until all chunks have been loaded? If you press F3 there's a little counter, vus. If you keep the player still, when that number stops I think all chunks have been loaded. Before that point the loading process might temporarily reduce performance. To wait less, reduce the view distance in the video settings. Concerning integrated GPUs, I thought also desktops could have them, to reduce energy consumption during low loads. But maybe I'm wrong. Rather than checking what Terasology is using I'd use the nvidia tools to force the specific application to use nvidia GPU.

Bottom line is: with the elements I have right now I'm struggling to find an explanation. I have not been around much but I haven't heard too many reports of poor rendering performance. This would cautiously hint to something else being at play. Pinging @Cervator for more general checks to do.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Hey @aurifelix thanks for posting :)

Getting a hold of the log files and a screen capture with both F3 + F4 output visible would indeed be helpful, especially during heavier lag.

Are you by chance running a very high view distance? The top two are practically just there for testing, we should really put better disclaimers on them, they can bring pretty much any system to its knees.
 

manu3d

Active Member
Contributor
Architecture
Getting a hold of the log files and a screen capture with both F3 + F4 output visible would indeed be helpful, especially during heavier lag.
@aurifelix: Terasology has a screenshot-taking feature on F12. However it only captures the image of the rendered world, without the UI layer or the debug info / performance metrics. To capture those too you might need to use the system screenshot (Prt Scrn key - copies the screen into the clipboard) or an external screenshot-grabbing program. Sorry about that... =(
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Yep, good point, I forget about that. I use F12 when I just want screenies and PrintScreen triggering Greenshot, a nice little screen capture gadget :)
 
Top