MinimallyCorrect / TickThreading

Historical multi-threaded minecraft by @LunNova. Performance over correctness. What could go wrong? Way too much.
https://jenkins.nallar.me/job/TickThreading/
MIT License
144 stars 43 forks source link

Performance regression - better TPS with build 1947 #877

Closed Slind14 closed 11 years ago

Slind14 commented 11 years ago

Check out these two pictures, one very small ME System with this CPU usage ??? 2013-07-11_01 18 19 2013-07-11_01 18 45 At all.... 2013-07-11_01 25 56

Server is running on higher TPS without TT

LunNova commented 11 years ago

Completely redoing AE patching just now, should be fixed soon.

Slind14 commented 11 years ago

thanks a lot

LunNova commented 11 years ago

If you have a test server, now would be a good time to try latest. Should make AE stuff much faster, but may be buggy.

Slind14 commented 11 years ago

i have a testserver but i cant load chunks for 50 people...

Slind14 commented 11 years ago

jenkins down ?

LunNova commented 11 years ago

Should be up now, but my host might be having network issues. Fixed another big performance issue with forestry, so if you just updated you may want to update again.

Slind14 commented 11 years ago

thanks, but i think wait until the new deadlock is fixed

andremiller commented 11 years ago

I don't know if is related to the latest changes, but since applying the latest build (going from 2005 to 2034) my ME network has been running very slowly. Import busses especially. Crafted items just sit in my furnaces for a long time without getting extracted with the import bus. It seems to help if I open up the machine's interface, then it seems to extract the item.

LunNova commented 11 years ago

@andremiller had a few requests to skip ticking AE devices sometimes as they cause performance issues in 1.4.7, so it sometimes skips them.

Can you not just set the import bus to transfer in stacks of items at a time, or is that still too slow?

andremiller commented 11 years ago

@nallar They're already set to import stacks at a time, but it's still too slow :(. Unless there's also another bug, it sometimes sits there for 4 or 5 seconds doing nothing. I've reverted to an older version of TickThreading for now.

Where the speed is really critical is in my setup to create Tritium and Deuterium fuel for my fusion reactor. I'm using AE to import/export cells into lots of electrolyzers, then into centrifuges and then into liquid transposers.

Is it possible to make the skipping of AE ticking a configurable option?

BTW Thanks for all the work you're putting into TickThreading. Without it I wouldn't be able to run my server on the hardware it's on!

vsilvar commented 11 years ago

@nallar It would be great if there as a config option to not skip ticking AE devices. On a side question, do factorization routers also suffer from this? They appear to be slower than normal.

LunNova commented 11 years ago

Should be fixed now, don't skip ticks for import/export buses.

Slind14 commented 11 years ago

i updated to the latest version and there is no change: putty_2013-07-13_02-03-58

Slind14 commented 11 years ago

the server is still running on more tps without tickthreading. what changed since 1947 ?

LunNova commented 11 years ago

What are you using to measure TPS without TT? Bechill TPS? It actually measures incorrectly, doesn't measure time spent outside of world ticks.

Other than that, no idea why it's still slower for you on newer builds.

Although looking at that profile, it has definitely changed since the screenshot you gave earlier - there, AE took > 50ms per controller, here the worst controller only takes 14ms.

Are you using up to date java? I made some changes which assume you're using up to date java 7, and on old versions will make performance worse.

Other than that, I'll have some more changes related to AE controllers soon, which should improve performance a lot when auto crafting.

If you could get a .nps snapshot on latest that would be useful. Make sure to set the sampling frequency to 20ms.

LunNova commented 11 years ago

@Slind14

Just noticed TileEntityChest is showing up as being slow in profiling. That definitely shouldn't happen, somethings does seem very broken :s

What does /profile a show? Can you run /profile e 300 to get a long profile, in case it was just an odd result by chance as it only profiled for 7 seconds?

What are your java parameters?

LunNova commented 11 years ago

Had an idea of what the problem might be, made a change in build 2045 which might fix this. If it doesn't, still want the stuff I asked for in the previous post.

Also, the output of /ticks l could help too.

Slind14 commented 11 years ago

./gc of essentials.

i will get u the result when there are some more people back on the server

java build 1.7.0 17-b02 -> should i update ?

Slind14 commented 11 years ago

/profile a putty_2013-07-13_11-00-29

/profile l putty_2013-07-13_11-01-52

/profile e 300 putty_2013-07-13_11-05-54

Slind14 commented 11 years ago

looks a way better now, but at this time there was nobody online with a huge me system with autocrafting, fusionreactor...

snapshot: http://www.mediafire.com/download/ptkz7mom2s13mbc/mym_snapshot_2051.nps

andremiller commented 11 years ago

@nallar Thanks, it looks like my AE network is behaving again, exporting and importing items when it should :)

I did pick up an issue with my Fabricator, not sure if it is releated, issue #895

Slind14 commented 11 years ago

1951 is working perfect with AE, thank u so much .D putty_2013-07-14_19-56-08 putty_2013-07-14_19-59-26