PC Strange performance issues. Random, frequent lag spikes.

MurderousMincePie

Skeletron Prime
When I play the game it runs fine at a silky smooth 60FPS with no issues, but quite frequently this changes. I get massive lag spikes that render the game unplayable at points, the whole game slows down to a grinding halt and plays in slow motion. This makes it almost impossible to defeat high-end bosses as they start to jolt around the map. I have searched every corner of the internet for a solution but I have found none. Here are some solutions I found and tried along with my system specifications:

1. Changing the power management mode in the nvidia control panel to "prefer maximum performance".
This has worked for me in other 2D games such as Insanely Twisted Shadow Planet and whilst it did get my game to the silky smooth frame rate I mentioned previously it did not fix the sudden slowdowns.

2. Enabling "frame skip" in the Terraria settings.
This changed nothing in my game and I still got the sudden slowdowns.

3. Disabling the background in the Terraria settings.
This made my FPS more stable however it also didn't stop the slowdowns.

4. Forcing VSYNC off in the nvidia control panel for Terraria.
This was rather amusing as my game ran in fast motion but funnily enough still got the dreaded random slowdowns.

5. Forcing "Triple buffering" on in the nvidia control panel for Terraria.

Lowered my FPS and the slowdowns persisted.

This is all the attempts I can recall from memory of me trying to fix this. However now oddly after meddling with these 'fixes' I am now locked at 50FPS despite me restoring Terraria to it's original settings in the nvidia control panel, and yes there are still frequent slowdowns.

System specs:
Operating System:
Windows 7 Ultimate 64-bit (6.1, Build 7601) Service Pack 1
Language: English (Regional Setting: English)
Processor: AMD FX(tm)-8350 Eight-Core Processor (8 CPUs), ~4.0GHz
Memory: 16384MB RAM (DDR3 1833MHz)
Video card: NVIDIA GeForce GTX 750 Ti (2GB GDDR5 ver) (I also run dual monitors if that is a potential issue, both at 1440x900)

From what I have seen in various forums it seems to be that most people who have this issue have a nvidia GTX graphics card. Also sorry if this thread is in the wrong place I wasn't sure as it is a persistent issue and could be considered a bug.
 
I'll be straight with you, I have the exact same specs just GTX 660, and I never get 60 FPS flawless, certain lighting, blocks, events in the game cause drops. They are unavoidable. This is part of the engine, I don't think you are any issues that can be fixed. I do not use NVidia panel to set the graphic settings, I let all aspects controlled by the application.

You should too.
 
We've got a similar issue, and think we've found the cause.

When son hosts on his laptop, it soon becomes unplayable for him. The clients connecting are fine.
While it is an cheap laptop, this slowness was unexpected.

Looking at task manager, it showed terraria and terriaserver hovering and the 20% CPU usage mark. So their not hammering the CPU event though that is how it appeared.

Going to the Performance tab however revealed that CPU was being hammered, well one core at least. Both terraria and terriaserver were being executed on the same single core.

Right clicking on terraserver in the Processes tab of TaskManager and clicking Set Affinity, I forced it to use one of the untaxed cores.

Son's computers returned to full speed.

It might be worth looking to see if this is the cause of your issues.

I've not had a full look through the forum yet to see if this issue has been found by anyone else.
 
I suggest you defrag your hard drive. This usually makes games run a lot faster. If you do have Windows 7 or higher, then this is done once a week unless you told the system to not do so. Guide for it is found here.

If that doesn't work, re-installing Terraria may help. This will not delete any characters or worlds as long as the My Games folder isn't deleted. I do suggest you back them up just in case.
 
I have a AMD R9 390x Intel i5 game on a SSD and also have performance issues. Never had them until the later updates started to come out. Haven't seen anything solid to really fix it.
 
Everything i tried did no worked, i just want to play terraria! Maybe is my PC, it's from a brazilian company.
 
This bug is still an issue. Why? They've ported this game to pretty much every single platform on planet Earth. We'll probably see it on the Apple Pippin soon.

And this bug is still an issue.

I'm on the same system except this time I'm on Linux. The slowdowns are still a thing. Seems to affect all PC platforms.
[doublepost=1523652453,1523652194][/doublepost]
I suggest you defrag your hard drive. This usually makes games run a lot faster. If you do have Windows 7 or higher, then this is done once a week unless you told the system to not do so. Guide for it is found here.

This doesn't make sense. Hard drive fragmentation very rarely causes stability issues in games. Plus I'm on an SSD and they don't fragment like a hard drive, so is TheBootyPop.
 
This bug is still an issue. Why? They've ported this game to pretty much every single platform on planet Earth. We'll probably see it on the Apple Pippin soon.

And this bug is still an issue.

I'm on the same system except this time I'm on Linux. The slowdowns are still a thing. Seems to affect all PC platforms.
[doublepost=1523652453,1523652194][/doublepost]

This doesn't make sense. Hard drive fragmentation very rarely causes stability issues in games. Plus I'm on an SSD and they don't fragment like a hard drive, so is TheBootyPop.
This post is nearly 3 years old, what does that have to do with anything?
 
I have many issues similar to yours, OP. I get frequent micro-stuttering issues and what-not, but haven't been able to find a solution. It may just be the game showing it's age, let's hope the next patch can address some of these nasty performance issues. As fun as this game is, it just doesn't seem to be well optimized in its current state.
 
I have many issues similar to yours, OP. I get frequent micro-stuttering issues and what-not, but haven't been able to find a solution. It may just be the game showing it's age, let's hope the next patch can address some of these nasty performance issues. As fun as this game is, it just doesn't seem to be well optimized in its current state.

Yeah I've just come back to the game after, well, nearly 2 years. It's the exact same issue that I remember. I'm trying to play expert mode but the Eye of Cthulhu is nearly impossible. When it switches to it's second state (with the teeth) it fires out loads of servants. This causes the game to have a massive slow-motion lag spike spike.

Because of the lag, you aren't able to move about properly and your character kind of stutters about. Then all the servants surround you and take out a large portion of your health, leaving you vulnerable to the rapid dash attacks it does on expert mode.

I mean the lag spikes add an extra challenge, but I'd rather they weren't a feature :).
 
Exactly, I am actively trying to search for these performance bugs, and will then post them in the bug reports section. This is something the developers need to know about, and it's much more urgent than new content! However, the mods on these forums make it kind of difficult, because they don't like 'duplicate posts', even if said post has new information.

I recently upgraded my CPU, and noticed that my performance issues were vastly improved, but not absent. Even with a much more powerful CPU (I used to have an FX 8350, just like you, but upgraded to an i5 4750), I still get some strange bugs, such as lag when entering new biomes, and just random lag spikes in the first 5 minutes after joining a world. I really think it's just a case of optimization, Terraria really isn't a demanding game, and shouldn't be, even at higher resolutions. I think it would help if the devs made the game multi-threaded so that not just one CPU core could be taken advantage of, that could be a limiting factor in many cases.

And I completely understand how lag can ruin boss fights, it's happened to me all too much at this point. I just want a locked 60fps, should that really be much to ask for from Terraria, when games such as DOOM 2016 can run that way?
 
Wait a second, Terraria isn't multi-threaded? Jesus, that explains a lot. With something like the FX-8350 that only performs well with multiple cores that explains a lot.
Yes, that is sadly the case. That's why I upgraded from my FX 8350, since the 8350 has such dreadful single-core performance, it really isn't viable for Terraria. I play at 1440p, and with a tweak that allows you to play in larger worlds (larger than the vanilla limit), and I was getting really poor performance at the time, I really couldn't play Terraria well at all during that time. If Terraria was multi-threaded though, that would solve pretty much everything.
 
Yes, that is sadly the case.
No, it most certainly isn't.

Terraria is most definitely multi-threaded (getting about 27 threads on a quick test). Although I'm admittedly far from an expert on the subject, I'm confident Terraria has absolutely no influence on how its threads are scheduled (i.e. which core(s) runs which thread(s)). If all threads do run on the same processor, then there's nothing Terraria can do about that.
 
No, it most certainly isn't.

Terraria is most definitely multi-threaded (getting about 27 threads on a quick test). Although I'm admittedly far from an expert on the subject, I'm confident Terraria has absolutely no influence on how its threads are scheduled (i.e. which core(s) runs which thread(s)). If all threads do run on the same processor, then there's nothing Terraria can do about that.

It is multi-threaded? Whenever I check task-manager, it seems that Terraria is only using up one CPU core. This is what causes performance issues for me, at least. I may be confused as to what multi threading actually is.
 
It is multi-threaded? Whenever I check task-manager, it seems that Terraria is only using up one CPU core. I may be confused as to what multi threading actually is.
I think the confusion stems from the distinction between multi-threading and multi-core. Multi-threading simply means "having more than one thread". It does not mean "using more than one core": a multi-threaded application can definitely run on one core (and as we'll find out, can actually be better than running on multiple).

Very basically, a thread is a string of commands. These commands will be executed one by one, from start to finish. A process (like a program, such as Terraria) can have one (single-threaded) or more threads (multi-threaded), which can be executed in parallel. So (and this is an extremely simplified example) if you have a thread that takes one millisecond to execute, you could split it into two threads that take half a millisecond each, which are then executed in parallel, meaning that executing all the commands only takes half as long as they did when they were part of one thread (this however of course isn't possible if the second thread depends on the first thread having finished, which is but one example of issues pertaining to multi-threading).

If Terraria used single threading, it would be unplayable, as a game tick would take way too long. So Terraria, like virtually all contemporary programs, is multi-threaded. As for why all threads are run on the same core, the very simple explanation to that is that there isn't really a clear benefit not to: using multiple cores does not necessarily make you application faster at all, and in fact comes with its own drawbacks (thread can't use the same cache, for instance).

The bottom line is that Terraria doesn't run on multiple core because it doesn't have to, and that forcing it to wouldn't improve performance. The best way to optimalise Terraria is to shorten the threads (cutting commands) rather than to redistribute them.
 
How would these threads be 'shortened'? Is it something that the developers could feasibly accomplish?
The primary method of reducing thread length would be to remove or optimalise poorly optimalised code. This of course requires there to be poorly optimalised code to begin with, and in this particular case would only make the Update loop faster, not necessarily alleviate any other performance problems.
 
Back
Top Bottom