GithubHelp home page GithubHelp logo

jediminer543 / jmt-mcmt Goto Github PK

View Code? Open in Web Editor NEW
219.0 10.0 17.0 362 KB

A multithreading mod for for Minecraft forge 1.15.2 and 1.16.x

Home Page: https://www.curseforge.com/minecraft/mc-mods/mcmt-multithreading

License: BSD 2-Clause "Simplified" License

Java 60.03% JavaScript 39.66% Shell 0.32%
minecraft multithreading forge-mod minecraft-mod minecraft-forge-mod minecraft-1-16-1 minecraft-1-15-2 experimental mod

jmt-mcmt's People

Contributors

idkworker13 avatar jediminer543 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jmt-mcmt's Issues

Crashing upon server start. (1.16.5)

I was trying to start a 1.16.5 modded server and it worked fine during startup, but as soon as it started the console filled up with errors and it crashed after a little while. I'm using the latest version of MCMT on forge 35.1.37
heres the logs: latest.log

1.16.1 build 31 not start on dedicated server

[17:23:39] [main/FATAL] [ne.mi.fm.ModLoader/CORE]: Error during pre-loading phase
net.minecraftforge.fml.ModLoadingException: Mod ?ejmt_mcmt?r requires ?6minecraft?r ?o1.15.2?r
?7Currently, ?6minecraft?r?7 is ?o1.16.1

jar file 1.16.1, mc 1.16.1

jmt_mcmt-1.16.1-0.13.31
forge 108
debug.log

There will be 1.12.2 or not???

Hello I am modpack maker and for me only thing that matters is performance and stability. 1.15.2 fps are much worse than 1.12.2 btw. I am just wanna know is there will be 100% 1.12.2 port or is this questionable.
I am know this was asked before.

Best Regards KubiRemPL

1.16.3 Timed Out

Players are randomly kicked out of the server after a period of time. Once kicked out, they cannot connect until the server is restarted.
Other players can play the game normally (until they also encounter or quit the game), the server will not crash and there is no failure log, and the server cannot accept new player logins.
The server will receive the message that the player joins and the player exits, and the client displays the connection timeout after joining the world.
This may be due to an unpredictable conflict with the module or a thread listening for some reason throws an exception to stop the player from entering the game.
[Server thread/INFO] [minecraft/ServerPlayNetHandler]: lost connection: Timed out

隨機在遊戲的過程中被踢出伺服器,一但被踢出直到重新啟動伺服器之前都無法連線,
其他玩家可以正常進行遊戲(直到他們也遭遇或退出遊戲),伺服器不會崩潰也沒有失敗日誌,伺服器無法再接收新的玩家登錄。
伺服器將收到,玩家加入以及玩家退出的訊息,客戶端則在顯示加入世界後顯示連線逾時。
這可能是與模組不可預知的衝突或是某種原因監聽的線程拋出例外停止玩家進入遊戲。
[Server thread/INFO] [minecraft/ServerPlayNetHandler]: lost connection: Timed out

Executing on an Gpu?

Hey this is more or less a question of mine. So as we all know Gpus have a lot of power and minecraft dont touch that power at all. I searched a bit for what effect it could have if we run the minecraft worldgen on an Gpu and in theory this is a big deal. So my question is can add a worldgen or other features like this too this mod to harness that power?
I basicly allready know the answer. Its way to complicated to make this happen. I think I just want to inspire people that are way better at programming then me or you so at one day we could have it.
maybe...

her is some interesting stuff to that topic:
http://mc-server.xoft.cz/docs/Generator.html#GPU
https://github.com/minecrafthome/minecraft-beta-alpha-terrain-generation-cpp
https://pubs.cs.uct.ac.za/id/eprint/1052/1/Crause_Thesis_Revised.pdf

Not compatible with Arclight

I am running Arclight 1.16.4-1.0.11-SNAPSHOT-feb567a. Surprisingly enough it initializes all plugins (and mods?) just fine but then it starts spamming errors at insane rate. Tested on 0.18.60

Clean from any other plugins and mods, fresh generated world
debug.log
latest.log

With production plugins, mods and worlds
2021-01-07-5.log

Add upper limit of exp dropoff to config

Currently the mod prints a warning so other modders don't deal with it's borkenedness

#14 noted that it is kinda spammy

This was changed in 2edca8b to be an exp dropoff

The upper limit however is currently staticly defined; making it dynamic would be good

ChunkProvider and TileEntity issues

Hey again, I'm running a 1.15.2-forge-31.2.45 server with MCMT 0.18.60, and I've encountered a few problems regarding the chunk provider and tile entity multithreading.

First off, glass item frames from the Quark mod (although it may occur with any item frame), generally those close to chunk borders, are broken randomly with both the frame and the item it contained falling to the ground whenever the chunks with those frames are unloaded and reloaded (either by restarting, leaving and joining the server, or by going into other chunks and returning). The item frames are unable to be placed back unless the chunks are unloaded and reloaded again, although /reload does not work. No message in console is displayed when this occurs (see image attached).

Next, iron doors or any other type of door placed next to a chunk border cannot be opened by pressure plate, button, or any other method when chunks are unloaded and reloaded. However, the items used to open these doors work on other items placed next to them that are not near the chunk border, and the doors themselves work when moved away from the border. The doors also seem to snap back to the border when placed on a block running alongside the border, until they are interacted with via fist, in which case they glitch. However, this issue stops whenever ChunkProvider is toggled off, and the doors work temporarily again even once it's reenabled. However, ChunkProvider being toggled results in heavy console spamming, usually about invalid tile entities and such (this doesn't occur when the command toggling off everything is run, though). This eventually results in the entire server crashing due to ticking world, and items in chests or tile entities vanish.

Finally, when loaded into a chunk with a lot of hoppers and other tile entities, console is spammed considerably, and TPS dips as well. This stops when TE multithreading is toggled off, though.

[1.16.3] Syncfu question

This is just a question: is the syncfu.jar available for the 1.16.3 version? If so where would the download happen to be? Would defiantly like to give this mod a try, but would prefer to have both if it helps with stability.

Parallelise LevelBasedGraph

LevelBasedGraph is used a lot (Esp. in world level stuff) and appers to have edgecases where it breaks

However those edge cases mostly seem to be related to vilage code so it may be that that need poking instead and the general case can be parallelised (which would be good)

Notes:

  • Currently processUpdates and scheduleUpdate are synchronised to fix the issue
  • The synchronisation region could be reduced to just cover a small section of the executed code, potentially allowing multiple things to loop just not fetch at once

Effects stay at 0:00

Effects randomly stay on players (0:00) on 1.16.3-forge-1.34.1 server with only MCMT installed, also tried to disable Entity Parallelization but didn't help.

Noticed with beacons and tested with beacons for fast effects iteration, after removing MCMT, the issue is gone.

Lose the ability to break blocks occasionally until server restart

Occasionally the world updating breaks in a way that animals no longer breed and blocks can no longer be broken. Seems a lot like being ticks behind and getting block lag, but it does not report so in the log. instead the log gets spammed with

[14Sep2020 19:21:33.466] [ForkJoinPool-3-worker-5/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.ArrayIndexOutOfBoundsException

until it is rebooted. I'm running what was the latest version of your mod until yesterday. I have updtaed to the new version to try it out now as well, but have restore points and can revert.

Running the server on a MineOS Turnkey Linux VM with 6 cores / 8GB RAM 50GB storage.
I have the following mods installed
jmt_mcmt-1.15.2-0.15.39.jar
Craftable-Saddles-Mod-1.15.2.jar
Decorative-Blocks-Mod-1.15.2.jar
Extended-Lights-Mod-1.15.2.jar
GeneticAnimals-0_5_4.jar
More+Dogs+1.15.2-1.0.6.jar
Morpheus-1.15.2-4.2.50.jar
MrCrayFishs-Furniture-1.15.2.jar
QuickLeafDecay-MC1.15.2-1.2.5.jar
astikorcarts-1.15.2-1.0.4.jar
environmentalcreepers-forge-1.15.2-1.6.1.jar
horse_colors-1.15.2-1.4.0.jar
horse_tack-2.1-1.15.2.jar

This mod list has been stable for a few weeks, but struggled due to being bound by single core performance. With your mod installed it runs very well and never falls behind, aside from this hangup. I can provide more detailed logs as needed. If you have any insight it would be fantastic.

On a side note there may be a conflict with horse_colors-1.15.2-1.4.0.jar that results in horses always having twins? have not fully diagnosed yet.

Backport to 1.12.2

Hi, i love this mod! Do you plan to add support for 1.12.2?
After all, most of the mod servers run on this version, and it, in turn, is a successor to the old 1.7.10.
This would solve a lot of performance issues!

Serene Season Server Spam

I tried using only MCMT and Serene Seasons alongside eachother, downloaded the most recent versions of both mods. It is not a serene season issue like I had originally thought, after uninstalling MCMT it gets fixed and works with 100+ mods.

Issue: Server Log is filled with spamming of "season time skipped in (enter dimension here) every second, includes every single dimension except the one whitelisted in the serene season config. meaning only the overworld isn't involved with the spam, but this makes the server log clutter so unbelievably fast, I had shown this log to a couple other discords and I guess it has something to do with MCMT because once I remove it, it's entirely fixed.

Here is a couple logs to go with it, I wouldn't say its a "incompatibility" issue, I'm just looking for a way to filter out that spam in the log, and from what I've researched over the past month nothing for forge 1.16.5 can take a user input into a config file and filter out whatever it outputs
https://pastebin.pl/view/4ef5c798
https://pastebin.pl/view/6d9b9ecf

Valhelsia 3 Version 3.1.2 Crashing when Chunk Loading and General Gameplay

On version 1.16.4, mostly found when loading new chunks, but several crashes were also in general gameplay. I removed performant and yet the crashing continued. Another issue, the server tickrate with performant installed dropped significantly with the world option of mcmt toggled on, after removing performant or disabling world, worked fine until crashes. Attached are several crash reports.

https://pastebin.com/zN4tAd2L

This first one crashed while loading new chunks, and have had several crash reports not unlike this one, looking into them I saw the chunkprovider was mentioned a lot, tried turning that off with MCMT, the crashes persisted.

https://pastebin.com/WM376n44

This one is quite similar to the first, and seems as if they are the same cause here.

https://pastebin.com/fGHC2yd9

There is a third, I hope these are helpful

I've tried updating the pack to 3.1.3, and the problem persisted, thank you for all that you do in making this mod, it truly is amazing.

Java 14 (possibly ZGC?) causes ticks to completely stop

attached are debug logs from java 8 and java 14 + the ZGC garbage collector. Java 8 appears to work fine, while 14 causes ticks to completely stop shortly after loading a world. once this happens, closing the world gets stuck on "saving world" and needs to be ended with task manager even though it's still responding. Possibly happens when generating fresh chunks, not sure.
java 8 debug log.txt
java 14 debug log.txt
1.16.3 forge 34.1.42
mcmt 1.16.3-0.18.60

Mod Testing

Well this is not at all an Issue. I'm just trying to help out the developer by testing the mods for different versions with MCMT. You can help too and write your experience with the mods in the Card comments. To test the mods I'm using the last version of the mod and the last version of forge. Core mods are not listed because you can't test them. I always get my mods from curseforge or the official website from the mod, because this is the most likely place to look after mods someone who does not have that much experience with them. If you have any questions to my test result or want to be a member for helping test mods just ask me.

Here is the link to my trello Boards:
1.15.X
https://trello.com/b/jGEImIsb
1.16.X
https://trello.com/b/xTk6aSYa

Chunk Locking is Slow under harsh conditions

Hello Ur mod is great but i found some bug in it all threads are stuck on 20% of utilization and cannot go further but tps is going lower lower and lower because of this lock.
Here is the example of lots of tile entites.
image
image

Btw I am making a profesional video about Ur great mod. Will show all guys that say "minecraft is single core only!!!" cuz it can be multi-core with this mod but this lock really block this mod capabilities. Keep it up!!!

Best Regards KubiRemPL

Server crash upon joining

Hi, I'm running a 1.15.2-forge-31.2.45 server with MCMT 0.18.60. Whenever the server starts and I attempts to join, console is spammed heavily before the entire server freezes. Then, the server crashes due to a single tick surpassing 90 seconds. The server appears to start fine, though. It also runs for a few seconds before the freeze, and I am capable of loading in. I've added the syncfu file as well, as without it I was unable to load in at all. I also tested with version 0.17.54, and the same thing happened.

Problems in 1.16.4

I tested MCMT in the newest version of forge 1.16.4 and run into some problems. During World gen it puts out error about it could not save the chnk it generated but the server and the world seemed to be fine. At some point the server just crashed without me doing anything. I didnt had any other mods installed.
Here are the errors:
Chunk Error 1.16.4.txt
crash-2021-01-16_17.33.12-server.txt
The server Ram has also some Spikes? while world gen.. It gets around 4Gb but then resets to about 500Mb.
Ram Spikes

Try to rewrite pistons

Pistons are the only vanilla thing that doesn't multithread and that is bad

It should be made unbad

By fixing it

Notes:

  • This is technically due to a two pronged issue, as piston moves are handles in part by BlockPiston, and in part by TileEntityPiston so breakage can occur. IDK how, but apparently it can
  • TODO: more info

Problems with 1.16.5

Hey, when we used this mod on our ATM 6 - 1.16.5 Server, on every Player there spawned about 200 Fish or other mobs and that is not funny :(

random freeze while MCMT is installed

occasionally for no obvious reason the game will freeze, not crash. this appears to only happen with MCMT installed. latest log is attached if I did it right, no crashlog is made.
latest.txt
1.15.2, forge 31.2.41, jmt_mcmt-1.15.2-0.16.50. other mods should be in the log if I'm not mistaken.

Some new problems

Hello again after the new update i saw some corruption and lots of console spam from this mod that makes server not responding even after stop command.
Here is the logs for console spam thing.

latest.log
debug.log

BTW I am changed some plans I am in process of making test in text form and I will publish it to You when I will be ready.
Best Regards
KubiRemPL

Testing in 1.16.4

I run about 175 mods in 1.16.4. After quite a bit of testing I actually noticed slowdowns, specifically with rendering. I know that the mod was intended to be used server side. However I am trying to test exactly how many mods I can use so that I know what type of server I will need. As you said on curse, an option to limit the number of cpu cores or threads would be amazing to use.
Contained below is the logs that repeated for as long as I remained loaded into a world. I tested by loading into multiple works and noticed the same issue. I am sorry I could not post more specifics, however I need to head to sleep for work, so if you need more specifics I can drop them for you. Still, amazing TPS impact, I look forward to seeing more use of this mod in the future!

[23:15:17] [Server thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Server
java.lang.NullPointerException: null
[23:15:17] [ForkJoinPool-3-worker-8/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.NullPointerException
[23:15:17] [ForkJoinPool-3-worker-5/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.NullPointerException

Add 1.16.3 Support

Hi.

At the moment, the mod does not support Minecraft 1.16.3. Please could you add support for this?

Thanks!

OptiFine Breaks World Loading

Version: 1.16.3
Forge Version: 34.1.7, tested 34.1.0 and 34.1.1
Mods Installed:

  • Inventory Tweaks 1.16.2-1.0.0
  • JEI 1.16.3-7.3.2.36
  • JMT-MCMT 0.17.54-1.16.3
  • OptiFine 1.16.3 HD U G3

Problem: Generating/loading worlds will stop at 100% permanently if OptiFine is installed. Game needs killed.
2020-10-05_11 18 00

Logs:
2020-10-05-4.log.gz

Notes:

  • I've noticed that in the logs, it says "Preparing spawn area: 0%" but the screenshot shows 100%.
  • The mod works fine without OptiFine installed.

Parallelise World Update Dispatch

This is the big one; it is what makes redstone go and fluidst flow (I think they are both similar systems)

Parallelising this will be !!FUN!!

As in, expect everything to break

Notes:

  • Am tired so notes are hard to write
  • I beliefve these are handled by ServerTickList's, but I may be confusing the subsystems (again tired sorry)

Question

When this mod will be on 1.12.2. Does it will work with Cubic Chunks????
If no can U please do all the things that U can to make it work.
I really need cubic chunks for my modpack.
Making video about Ur mod is deleyed a bit cuz I am ill.
Best Regrads!!!
KubiRemPL

Reduce max threads used by JMT-MCMT

When doing a stress test to see how the mod would behave when the maximum amount of threads are being used, I noticed an issue with framerate. I believe this is due to too many threads being spawned, causing the render thread to have trouble running often enough and therefore tanking framerates.

A possible solution could be to set the max amount of threads to be something like this (psuedocode):

if (integratedServer) {
    Math.max(availableThreads - 2, 2);
    // use a minimum of 2 threads but a maximum of (CPU threads - 2) so that the
    // render thread, OS, JVM's JIT and GC have room to breathe.
} else {
    Math.max(availableThreads - 1, 2);
    // servers don't have a render thread and not many cores, they also usually have
    // a headless OS, so only deduct 1 from the available CPU threads to make better
    // use of the HW while still giving GC, OS, JIT and plugins room to breathe.
}

Entity MT enabled:
MCMT entities enabled

Entity MT disabled:
MCMT entities disabled

By the way, thank you for your efforts on this mod - it's impressive how this mod manages to achieve so much more server-side performance compared to Vanilla with a decent amount of cores!

ChunkManager Fast Util Bug

Only seen once, and that was in 1.16.3, but still apparently can occur

Trace:

[14Sep2020 11:30:56.816] [Server thread/FATAL] [net.minecraft.util.concurrent.ThreadTaskExecutor/]: Error executing task on Server
java.lang.NullPointerException: null
	at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap$MapIterator.nextEntry(Int2ObjectOpenHashMap.java:668) ~[fastutil-8.2.1.jar:?]
	at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap$ValueIterator.next(Int2ObjectOpenHashMap.java:950) ~[fastutil-8.2.1.jar:?]
	at net.minecraft.world.server.ChunkManager.func_219183_a(ChunkManager.java:859) ~[?:?]
	at net.minecraft.world.server.ServerChunkProvider.func_217221_a(SourceFile:467) ~[?:?]
	at net.minecraft.network.play.ServerPlayNetHandler.func_147347_a(ServerPlayNetHandler.java:776) ~[?:?]
	at net.minecraft.network.play.client.CPlayerPacket.func_148833_a(SourceFile:122) ~[?:?]
	at net.minecraft.network.play.client.CPlayerPacket$PositionPacket.func_148833_a(SourceFile:56) ~[?:?]
	at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) ~[?:?]
	at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) ~[?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) ~[?:?]
	at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:729) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:156) ~[?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:712) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:706) ~[?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(SourceFile:127) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:692) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:641) ~[?:?]
	at net.minecraft.server.MinecraftServer.lambda$func_240784_a_$0(MinecraftServer.java:229) ~[?:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

Notes:

  • Hard to repro
  • ChunkManager has other fastutil collections that may need replacing but are hard typed (i.e. their fast util collection is hyperspecific)
  • Field is field_219272_z

Limited cpu usage while chunk generation

Hey,
I tested this mod for an while now on my server(all the data down below) and I notice that while generating new chunks all threads are being used, but only running between 10% - 15% load.
This is not the case for other loads. For example when I spawn a few thousend mobs the load an the cpu cores is scaling properly.
I hope this can be fixed it whould give me the last push to switch from 1.12.2 to 1.15.2.
I also hope you will continue working on this mod because its so powerfull and can bring some new life in servers.
(Sry for my English im native german so :D)

Hardware:
Dual Intel Xeon X5560
(12 Cores 24 Threads at 2,66Ghz)
164Gb of DDR3 RAM

Software:
Linux Mint 19.1
Java 1.8.0_241
Forge-1.15.2-31.2.0
jmt_mcmt-0.17.54-1.15.2
preview OptiFine 1.15.2 HD U G1 (same problem even without but makes it all a bit more stable)
no extra plugins or mods just bare minecraft

Need to talk with U jediminer543

Hi @jediminer543 , I want to talk to you privately. My English is not great therefore we will write. I want to open the server with this wonderful mod and want to know more.

That's my discord id KubiRemPL#6064
I would be so thankful.
It would be soo cool to make a large server cuz this mod give ability to do this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.