2024-12-10 17:56:58|Myriagame |source:minecraft skins
Preface
Note: The content of this page is mainly the translation of the official manual "Finding The Cauer of Lag Spikes", which contains some instances of my own actual operation.
When a small amount of tick (sometimes just a tick) takes a long time to execute, the so -called "lagging peak" will appear (translation: original LAG Spikes, no suitable vocabulary replacement here is not found.In the case, it is 50 milliseconds. When a tick lasts for a long time, it shows stuttering.
This may happen frequently. For example, there is one every 20 ticks, and it may rarely occur, such as once a minute.They are usually related to players' behavior.
It may be difficult to find the peak peak from normal analysis data, because the data is average.Other data samples will "flood" the peak value, covering the impact it brings.
Fortunately, Spark has two useful tools to solve this problem.
1. Use the "/Spark TickMonitor" instruction to detect the peak of lag
In order to determine the source of the "lagging peak" in the analysis report, we need to find out the "peak" corresponding Tick.
We can use the/Spark TickMonitor command to do this.
The working principle of this command is to detect the average tick rate of the server first, and then.
1. Monitor the duration of each tick
2. Calculate the difference between the time and average time required to execute the last tick (represented by percentage).
3. If the difference exceeds a certain threshold, send a message in the chat
To enable monitoring, just run/Spark TickMonitor.
By default, this threshold is twice the average value (for example, in normal circumstances, a tick is 50 milliseconds, and the tick higher than 100 milliseconds will be recorded).You can also specify that the threshold is an absolute tick duration, such as/Spark TickMonitor-Threshold-Tick 50 to report any more than 50 milliseconds (as mentioned earlier, a Tick time is 50ms, which is longer than this tick.It can be regarded as a stutter).
The figure above shows an example of using this instruction.It should be noted that "greater than 100%" here means 100%more than average (double more than the average value, or twice the average)
Then, you only need to play normally (or try to repeat the operations that will cause your game stuck) and observe the monitoring results output in the chat bar.
If the output is not sensitive enough (the stuton is slightly mild, lower than the threshold), you can try a lower threshold, such as/spark tickmonitor-Threshold-test 70.
To demonstrate, WordDedit will be used to create a "lagging peak".
It can be seen that when the corresponding operation is executed, the duration of a tick has reached more than ten times that of usual.
Second, use/Spark Profiler and-only-tests-organ to find the cause
--Only-Ticks-Over option means that Spark analyzes only the tick that lasts more than a given threshold.This filters out all the "normal" ticks, leaving only the stuck abnormally tick.
You can determine a suitable threshold through the previous operation (translation: the threshold of this instruction is an absolute time for tick), I recommend using the value between 50 and 100Tick's duration.
For example, in the previous example, a Tick last time in Katon lasted more than 300 milliseconds, but just to ensure that they would be included, I will use a lower threshold 150 milliseconds.
Then execute the corresponding instructions, for example,/spark profiler-only-tests-organ 150.
This will start a new round of monitoring, but only records Tick with a duration of more than 150ms, such as -
From the figure above, you can see the abnormal stuck caused by "Worldedit".
Translator's Note: After the monitoring through the above instructions, you need to enter the/Spark Profiler --stop instruction to end the monitoring, so that the log will be output.
After the log is generated, it will be automatically uploaded to a webpage, and the URL will be displayed on the chat bar for easy sharing.
Third, find examples of the cause of stuck
Here I take a personal archive as an example. At that time, due to the MOD conflict, I would be abnormally stuck when I took the items from the storage drawer.
I generated a log (see: Profile at 07:10 2022/8/19 (Lucko.me)) mentioned by the/Spark Profiler instruction mentioned in the previous section.Here we directly click the button in the red box to switch to the source mode.
Then you can see that the delayed MOD is sorted in the order of influence from high to low, and the source of the kattop is found.
National Service DNF Dark Ni
2025-01-28 09:19:27The new screenshot of the be
2025-01-28 09:18:57The 15th anniversary wallpap
2025-01-28 09:18:273DM Xuanyuan Sinicization Gr
2025-01-28 09:17:57French magazine is the first
2025-01-28 09:17:27The sneak game "Republic" wi
2025-01-28 09:16:57The story between humans and
2025-01-28 09:16:27Capture "Trinity 3: Artifact
2025-01-28 09:15:27Wind direction change "Myste
2025-01-28 09:14:57DICE's new project "Dream" w
2025-01-28 09:14:27Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:27Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:26Master Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25King Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25Guide Minecraft Skins
Minecraft Skins
2024-12-10 04:11:24Dark Knight Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23Sparta Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23Moncraft Skins of the War
Minecraft Skins
2024-12-10 04:11:22Red Witch Minecraft Skins
Minecraft Skins
2024-12-10 04:11:22Golden Cavaliers Minecraft S
Minecraft Skins
2024-12-10 04:11:22