ldtteam / dynview Goto Github PK
View Code? Open in Web Editor NEWSmall serverside utility to balance load and chunk view distance
License: GNU General Public License v3.0
Small serverside utility to balance load and chunk view distance
License: GNU General Public License v3.0
Hello, I recently installed this utility on my server and set it up to only manage simulation distance.
I purpusfully lagged the server and, as expected, once the 45MSTP threshold was surpassed, the mod adjusted the simulation distance accordingly.
I stopped lagging the server and the MSTP setteled to a comfortable 20, but the mod doesn't seem to increase it back to 8, despite the update frequency being set to 1sec.
Is this intended behaviour?
Following is my /minecraft/config/dynview.json
dynview.json
Thank you very much.
If you have a relatively stable version of your mod do you mind making an update for fabric?
Not sure which mod is causing this sorry
Please check out this Issue
Minecraft version: 1.16.5
Modpack version: FTB Endeavor 1.4.0
Forge version: forge-1.16.5-36.1.16
DynView version: dynviewdist-1.9
While evaluating the update rate of viewDistanceUpdateRate
in dynview-common.toml
, the default configuration shows:
#The update frequency of average server tick time checks to update view distances. Default: 30sec
#Range: 1 ~ 1000
viewDistanceUpdateRate = 30
Yet the interval between updating the view distance appears to be effectively 15 seconds, or half the time as configured. Changing this value arbitrarily seems to result in an effective interval of n / 2
. With the default configuration of 30 seconds, an effective interval of 15 seconds can be seen below:
[07Jun2021 20:58:17.750] [Server thread/INFO] [com.dynamic_view.DynView/]: Mean tick: 40ms increasing chunk view distance to: 6
[07Jun2021 20:58:33.464] [Server thread/INFO] [com.dynamic_view.DynView/]: Mean tick: 40ms increasing chunk view distance to: 7
[07Jun2021 20:58:47.778] [Server thread/INFO] [com.dynamic_view.DynView/]: Mean tick: 40ms increasing chunk view distance to: 8
[07Jun2021 20:59:02.788] [Server thread/INFO] [com.dynamic_view.DynView/]: Mean tick: 39ms increasing chunk view distance to: 9
[07Jun2021 20:59:17.656] [Server thread/INFO] [com.dynamic_view.DynView/]: Mean tick: 41ms increasing chunk view distance to: 10
[07Jun2021 20:59:32.827] [Server thread/INFO] [com.dynamic_view.DynView/]: Mean tick: 41ms increasing chunk view distance to: 11
Additionally, a range with a lower-bound of 1 and an upper-bound of 1,000 seconds may be a little misleading to some as the unit is not specified in the variable. Some may confuse this with milliseconds.
That aside I just wanted to say thanks, this is a very effective mod. It's helped our small community out greatly considering some modpacks are entity-heavy to begin with.
Just topic, no more comments on curseforge so this is the only place to ask.
It doesn't really matter but figured I'd mention it.
The mod's config comment says the default is 40 for this setting but it is actually 45.
I:meanAvgTickTime=45
Currently trying to use this mod with fabric 1.20.3 creates the following error after the server loads:
[21:42:36] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.NoSuchFieldError: field_4573
at com.dynview.Utils.TickTimeHandler.onServerTick(TickTimeHandler.java:37) ~[dynview-fabric-1.20.1-3.2.jar:?]
at com.dynview.event.EventHandler.onDedicatedServerTick(EventHandler.java:14) ~[dynview-fabric-1.20.1-3.2.jar:?]
at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$2(ServerTickEvents.java:43) ~[fabric-lifecycle-events-v1-2.2.28+9468a19d3b-4449f2569c2e4df.jar:?]
at net.minecraft.server.MinecraftServer.handler$zfj000$fabric-lifecycle-events-v1$onEndTick(MinecraftServer.java:2434) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:874) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:683) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[server-intermediary.jar:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Thank you for your development of this mod, it allows me to make my server view distance huge without having to worry about lag if many players start to join. Just creating this issue so I can track on when a new version is released so I can get it installed again right when/if it releases.
Hello
Maybe if you could add a minimum range option for chunks loading it could fine ;)
[09:10:08] [Netty Client IO #7/INFO]: Server has additional mods that may be needed on the client: dynview@ANY, limitedchunks@
MC 1.19.2, Forge 43.2.8, DynView 2.9, Limited Chunks 2.4
o/ tried using your mod and dropped it the moment i noticed it uses the same lag value for deciding if it should grow or shrink the radius.
One massive change should be to allow defining the range to grow or shrink the view distance.
I would have set the config for my self:
grow if the lag is below 20ms, and shrink if it is above 35ms, that way if you are in between you just keep the current setting.
That allows you to not force max performance lag on your server but to actually have a good view change as needed.
The Void Villager Trading concepts requires the chunks to be unloaded after the player moves trough the portal. After installing the mod void trading stops working by default, one would expect if you change "chunkunload" to false this mechanic would disable.
My config:
{
"minChunkViewDist": {
"desc:": "The minimum chunk view distance allowed to use. Default: 5, minimum 3, maximum 200",
"minChunkViewDist": 10
},
"maxChunkViewDist": {
"desc:": "The maximum chunk view distance allowed to use. Set to the max a player could benefit from. Default: 15, minimum 1, maximum 200",
"maxChunkViewDist": 20
},
"meanAvgTickTime": {
"desc:": "The average tick time to stabilize the chunk view distance around. Setting it higher than 50ms is not advised, as after 50ms the TPS will go below 20. Default: 45ms, min: 10, max:100",
"meanAvgTickTime": 20
},
"viewDistanceUpdateRate": {
"desc:": "The update frequency of average server tick time checks to update view distances.(In seconds) Default: 30, min:1, max:1000",
"viewDistanceUpdateRate": 30
},
"minSimulationDist": {
"desc:": "The minimum simulation distance allowed to use. Default: 4, minimum 1, maximum 200",
"minSimulationDist": 10
},
"maxSimulationDist": {
"desc:": "The maximum simulation distance allowed to use. Default: 10, minimum 1, maximum 200",
"maxSimulationDist": 10
},
"adjustSimulationDistance": {
"desc:": "Enables automatic simulation distance adjustment. Default: true",
"adjustSimulationDistance": false
},
"logMessages": {
"desc:": "Whether to output log messages for actions done. This can be helpful to balance the other settings nicely. Default \u003d true",
"logMessages": true
},
"chunkunload": {
"desc:": "Enable slow chunk unloading(~1minute) after load, helps with mods hot-loading chunks frequently. Default: true",
"chunkunload": false
}
}
(1.12.2) When dealing with larger render distances the algorithm is going to be more sluggish to bring the chunks down to a sustainable level if something ends up loading the system a lot (like a new player joining) therefore I think it would be nice to have a way to specify how many chunks the mod jumps when it does its scheduled check. I also can't seem to make its check rate lower than 30 seconds either because my server is loaded or something is wrong with the mod. So I think with the slower check rates a larger distance change would be beneficial although perhaps not as granular.
After changing the config files for Dynamic View Distance and restarting the server the mod is working fine apart from settings I have changed in the config not taking place.
I think it would be cool to have another setting in this mod for entity broadcast range similar to the setting in server.properties called entity-broadcast-range-percentage=100
Please mark the mod as server only via
https://mcforge.readthedocs.io/en/latest/concepts/sides/#writing-one-sided-mods
right now it will cause a red X in the server list if the mod is missing on the client, thanks!
Since no explanation given anywhere; how to use this mod? its not a fabric mod, that's what I found out so far.
I know not exactly the same purview, but could you have the server dynamically adjusting sim distance too?
support for OpenCubicChunks, if it isn't supported already.
https://www.curseforge.com/minecraft/mc-mods/opencubicchunks
https://github.com/OpenCubicChunks/CubicChunks
There is no crash, no error, just nothing. It seems that in 1.18.2 this mod acts as if it were not present.
1.18.1: dynview.json is respected, setting a min/max view distance and reaching max over time.
1.18.2: server.properties view-distance is respected instead, with no signs of life from dynview.
https://bugs.mojang.com/browse/MC-2536
PaperMC/Paper#6214
Basically, if your view distance is anything but 10 (lower or higher) heavily modded servers will have severe issues with monster spawns. It will be sporadic - if any spawns at all!
In short; Dynview literally breaks modded clients and servers.
If you could find a way to fix this bug, that would be optimal.
Otherwise I'd recommend noone installs your mod on heavily modded clients/servers until Mojang themselves fixes the bug (highly unlikely).
Are there plans to add simulated chunks limited tied to view to this mod?
Settings could be % based to set in stone for example... 50%
20, 18, 16, 14, 12, 10 Render
10, 9, 8, 7, 6, 5, 4 Simulated
Or set numbers
[20-15], [10-14], [8-9], [4-7] Render
[10], [7], [5], [4] Simulated
dynviewdist-1.9
v1.16.5
I've been tweaking how often I let the mod do it's check to alter view distance and currently I've set it to 90 seconds in the config file. However it appears to be using some internal default of 45 seconds:
[11Mar2021 16:36:41.324] [Server thread/INFO] [com.dynamic_view.DynView/]: Mean tick: 25ms increasing chunk view distance to: 8
...
[11Mar2021 16:37:26.315] [Server thread/INFO] [com.dynamic_view.DynView/]: Mean tick: 27ms increasing chunk view distance to: 9
...
[11Mar2021 16:38:11.332] [Server thread/INFO] [com.dynamic_view.DynView/]: Mean tick: 30ms increasing chunk view distance to: 10
...
[11Mar2021 16:38:56.324] [Server thread/INFO] [com.dynamic_view.DynView/]: Mean tick: 40ms increasing chunk view distance to: 11
For reference the config line I'm using viewDistanceUpdateRate = 90
The comment above it leads me to believe this is an input in seconds and not ms. Correct?
A config option to set max render distance via player count would be nice to limit amount of packets sent to each client. If there's only two people on the server my internet could handle a render distance of 16, however if there's 10 people on the server and the sever is still maintaining 20 tps and 16 view distance the amount of data being sent to each client would lag out my internet. It would be nice if there was a config for this, so if its only one or two players on the server they can enjoy a farther view distance which would shrink as more players joined that is not limited to server tps.
Hey,
Could you add something like target-tps setting? Anything over 15tps is still very playable, keeping 20tps is bit overkill IMO, if the view distance drops to 5 (or whatever is set to minimum) after 3 players join.
This is very low importance to me, but would be very good thing to have. Probably setting minimum view distance to larger would have same effect, or figuring out proper average tick time for settings.
I have an occasional crash on my server. Seems to mention DynView and Performant although I have no idea what the issue is, is it a compatibility issue between the two?
Minecraft:1.15.2
Forge: 31.2.27
DynView: dynviewdist-1.5
https://pastebin.com/GbBXsMDe
I recommend this mod to a lot of modpack makers my company is partnered with along with tons of customers etc. So it'd be great to have a 1.16 version also. :)
Hey there,
Stopping by to drop off this log; can't seem to figure out what's causing the exception.
I'm guessing DynView doesn't play nice with OptiFine at times
Resume:
Using "dynview.fabric-1.19-2.4" increases a lot the time that the console of the server takes to finish jobs when you ask to stop, specifically when "Saving World" is printed.
Details of behavior:
The total time to stop from the command to console closed usually is around 4 to 6 seconds and with dynview installed goes to more than a minute, maybe two until console closed.
For most situations it is just a little annoying, anyway you are closing or stopping the server... but it is worse if you need it to be express for some reason.
Compatibility Issue
I had found that it causes some big problems when used together with restart-server-1.2.0+mc1.19.x-1.20.x, from stop boot process to the corruption of the world (Was tested to break it a few times in purpose, i was testing around 20hours (actively) to be sure what was happening because the automated restarts stop working somehow)
The problem appears because the new instance won't finish the initial load, as some files are being used by the old one, so you have to manually finish the process of both instances (or just the new and wait for the old one to finish himself) and load again (Loosing the restart function at all) (of course without dynview it goes all well restarting)
The biggest of the problems comes when it causes some data to be saved corrupt, because "Restart server" will open a new instance when the previous one was expected to be closed, but as this one is open... both will coexist, the first one yet saving the world and the second one loading the world (and a presumably large number of mods and resources) , so some data will be saved corrupt to the disk.
How to solve
For developers:
You know a lot more than me about the topic, i just want to help a bit saying that... probably if you found the cause of the "extra time to stop" everything else will be fine.
It seems to have something to do around the slow chunk unloading, Disabling "chunkunload" makes everything to be stopped in the usual times, so maybe it will be solved simple checking if it is enabled when the server ask to stop at all, so you stop the "retarder" and the server can continue the normal flow.
We're having an issue on our server where in an attempt to reduce lag, I added several serverside mods including this one. And it worked fine when I was logged in, but as soon as another player logged in (whether she was the only one connected or not), the server would crash. I was able to isolate it to Dynamic View; if I remove it from the server, she can log in just fine.
Some feature set by default in the 1.8.9 ATM 6 pack is causing issues with entity rendering specifically magma cube (for me) in single player mod dynviewdist-2.0
The default minimum rendering is set to 1, however in (the other) magma cube spawns cause the server to permanently hang if the magma cube is spawned and the chunk rendering suddenly lowers...
This is not just with magma cubes, every ones computer has a different capability and when I was searching online what might cause entity rendering crashes it's strictly due to chunks loading and unloading while mobs spawn inside them..
I have increased the minimum range to 9 because that is the minimum requirement for magma cube spawner's which are dedicated to the other and is in fact the largest minimum chunk range in the game so it may be a quick resolution to change the default distance specifically to 9 rather than the multiple threads on reddit that seem to find no resolution for their entity rendering crashes
I must note there is no crash log that specified what exactly was causing the crash only that there is an entity rendering issue and my world went down in the nether and indeed the chunk distance if set to a minimum of 1 would lower it self less than 9 resulting in a crash every time a magma cube spawned and a chunk was unloaded due to "server stress"
I have had to delete my world and restart from a backup.
No amount of joining the world would let me play it loaded into a server hang every time...
I have changed the minimum distance to 9 and am exploring the other again with zero crashes and lag issues.
I assume that a better resolution would be to change the magma cubes chunk rendering distance however I am unsure if it's a vanilla feature or if it is a mod that is changing it.
But to help the countless other people experiencing this issue it might be wise to suggest to increase the minimum distance of their worlds or it may result in a server hang due to entity rendering issues. Or just change the default of minimum chunk loading distance in the config to 9.
Hello,
I'm using the version fabric-1.18.2-1.8 of dynview on our community server and I've noticed that the simulation distance settings seem to be completely ignored. Am I doing something wrong?
My config:
{
"minChunkViewDist": {
"desc:": "The minimum chunk view distance allowed to use. Default: 5, minimum 3, maximum 200",
"minChunkViewDist": 16
},
"maxChunkViewDist": {
"desc:": "The maximum chunk view distance allowed to use. Set to the max a player could benefit from. Default: 15, minimum 1, maximum 200",
"maxChunkViewDist": 32
},
"meanAvgTickTime": {
"desc:": "The average tick time to stabilize the chunk view distance around. Setting it higher than 50ms is not advised, as after 50ms the TPS will go below 20. Default: 45ms, min: 10, max:100",
"meanAvgTickTime": 45
},
"viewDistanceUpdateRate": {
"desc:": "The update frequency of average server tick time checks to update view distances.(In seconds) Default: 30, min:1, max:1000",
"viewDistanceUpdateRate": 30
},
"minSimulationDist": {
"desc:": "The minimum simulation distance allowed to use. Default: 4, minimum 1, maximum 200",
"minSimulationDist": 9
},
"maxSimulationDist": {
"desc:": "The maximum simulation distance allowed to use. Default: 10, minimum 1, maximum 200",
"maxSimulationDist": 9
},
"adjustSimulationDistance": {
"desc:": "Enables automatic simulation distance adjustment. Default: true",
"adjustSimulationDistance": false
},
"logMessages": {
"desc:": "Whether to output log messages for actions done. This can be helpful to balance the other settings nicely. Default \u003d true",
"logMessages": true
},
"chunkunload": {
"desc:": "Enable slow chunk unloading(~1minute) after load, helps with mods hot-loading chunks frequently. Default: true",
"chunkunload": false
}
}
Version bump please!
do you also intend to add support for Cubic Chunks vertical chunk render distance?
Would be great if this mod could adjust the simulation and view distance on a per dimension basis instead of adjusting it on the whole server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.