<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sat Jan 11 07:56:29 UTC 2025

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Mojang Studios Jira</title>
    <link>https://bugs.mojang.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en</language>    <build-info>
        <version>9.12.2</version>
        <build-number>9120002</build-number>
        <build-date>10-01-2024</build-date>
    </build-info>


<item>
            <title>[BDS-11648] Optimise Servers</title>
                <link>https://bugs.mojang.com/browse/BDS-11648</link>
                <project id="11700" key="BDS">Bedrock Dedicated Server</project>
                    <description>&lt;p&gt;Dear Mojang,&lt;/p&gt;

&lt;p&gt;Please can you optimise bedrock dedicated server? I use a server host which gives me the equivalent of i9k processor and 10gb of ram. Yet when there is more than 7 people on, it struggles to keep up. My server has gotten really popular recently and hope that this gets resolved. For example, there is about a 5 second delay in between each tick when there isn&#8217;t supposed to be any.&lt;/p&gt;

&lt;p&gt;It has become incredibly difficult to work and play on it since the lag levels just keep creeping up. I know for a fact that I am not the only one who will agree. Entities are moving at an extremely slow place, players are jolting across the map.&#160;&lt;/p&gt;



&lt;p&gt;This needs to be fixed ASAP!&lt;/p&gt;

&lt;p&gt;Regards&lt;/p&gt;</description>
                <environment>Server host - intel i9-9000K, 10GB DDR4 memory</environment>
        <key id="413026">BDS-11648</key>
            <summary>Optimise Servers</summary>
                <type id="1" iconUrl="https://bugs.mojang.com/secure/viewavatar?size=xsmall&amp;avatarId=18903&amp;avatarType=issuetype">Bug</type>
                                    <status id="5" iconUrl="https://bugs.mojang.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="4">Incomplete</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="Ultr4Anubis">Ultr4Anubis</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Feb 2021 23:57:23 +0100</created>
                <updated>Thu, 25 Nov 2021 17:26:00 +0100</updated>
                            <resolved>Thu, 25 Nov 2021 17:26:00 +0100</resolved>
                                    <version>1.16.200</version>
                    <version>1.16.201.03 Hotfix</version>
                    <version>1.16.210</version>
                                                            <votes>2</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="1115590" author="JIRAUSER484247" created="Thu, 25 Nov 2021 17:26:00 +0100"  >&lt;p&gt;Cleaning up old tickets: This ticket had been set to &apos;Awaiting Response&apos;, but has not received a response from the reporter (~3 months+) so is being closed as &lt;em&gt;Incomplete&lt;/em&gt;. If you feel this is still a valid issue then please comment, or create a new ticket following the &lt;a href=&quot;http://help.mojang.com/customer/portal/articles/801354-writing-helpful-bug-reports-for-minecraft&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Issue Guidelines&lt;/a&gt; which includes steps to reproduce the problem.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Quick Links&lt;/b&gt;:&lt;br/&gt;
&#128211; &lt;a href=&quot;http://help.mojang.com/customer/portal/articles/801354-writing-helpful-bug-reports-for-minecraft&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Issue Guidelines&lt;/a&gt; &#8211; &#128172; &lt;a href=&quot;https://help.minecraft.net/hc/en-us/requests/new&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Mojang Support&lt;/a&gt; &#8211; &#128231; &lt;a href=&quot;https://feedback.minecraft.net/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Suggestions&lt;/a&gt; &#8211; &#128214; &lt;a href=&quot;http://minecraft.gamepedia.com/Minecraft_Wiki&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Minecraft Wiki&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1062028" author="JIRAUSER484247" created="Wed, 25 Aug 2021 19:04:08 +0200"  >&lt;p&gt;&lt;b&gt;Thank you for your report!&lt;/b&gt;&lt;br/&gt;
However, this issue has been temporarily closed as&#160;&lt;b&gt;&lt;font color=&quot;#ff5722&quot;&gt;Awaiting Response&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Is this still an issue in the latest version (1.17.11)? If so, can you please add it to the affected versions (or mention it if you are not the reporter).&lt;/p&gt;

&lt;p&gt;This ticket will automatically reopen when you reply.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Quick Links&lt;/b&gt;:&lt;br/&gt;
&#128211;&#160;&lt;a href=&quot;http://help.mojang.com/customer/portal/articles/801354-writing-helpful-bug-reports-for-minecraft&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Issue Guidelines&lt;/a&gt;&#160;&#8211; &#128172;&#160;&lt;a href=&quot;https://help.minecraft.net/hc/en-us/requests/new&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Mojang Support&lt;/a&gt;&#160;&#8211; &#128231;&#160;&lt;a href=&quot;https://feedback.minecraft.net/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Suggestions&lt;/a&gt;&#160;&#8211; &#128214;&#160;&lt;a href=&quot;http://minecraft.gamepedia.com/Minecraft_Wiki&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Minecraft Wiki&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="929152" author="JIRAUSER612515" created="Mon, 22 Feb 2021 19:01:20 +0100"  >&lt;p&gt;This is interesting, I am running a home server on UB20 and have done some minimal tuning with systemd to gain huge performance boosts out of my server. Here is what I have done:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;set Limitcore/limitas/limitrss to infinity&lt;/li&gt;
	&lt;li&gt;set nofile limit to 10K&lt;/li&gt;
	&lt;li&gt;set nproc limit to 10K (neither file handles or thread count come close to these limits)&lt;/li&gt;
	&lt;li&gt;set bedrock max threads to 0&lt;/li&gt;
	&lt;li&gt;set process niceness to -10&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I also noticed a mild hit when wrapping the&#160; running instance in screen, so I just connect the bin to a tty and use systemd to launch and configure the service. I can drop my service file if interested.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;With the setup I experience almost no mob lag, but do experience a little block lag when there is a large amount of mining in the nether, or a large amount of chunk generation within the overworld. Minecarts seems to function fine, but I need to experiment more to decide if they are slow.&lt;/p&gt;

&lt;p&gt;My box is running an i7-10700k w/hyper-threading enabled (8-core, 16-thread)&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;Edit: I agree with the assessment that the way threading is implemented it is problematic with linux hosts. &lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Also: I&apos;m running the 5.4.0-65-generic kernel.&#160; and using the SLUB allocator (default I believe)&lt;/p&gt;</comment>
                            <comment id="924957" author="JIRAUSER610535" created="Wed, 17 Feb 2021 20:56:26 +0100"  >&lt;p&gt;Here are some notes I did for troubleshooting. I think the performance issue comes down to how BDS implemented threading on linux.&lt;/p&gt;


&lt;p&gt;I made some progress getting the most out of it, and still need to do some profiling to see if there&apos;s much to do...but at a quick glance, it seems that the threading implementation works poorly under linux, and it works best with a max of 2 threads.&lt;br/&gt;
&#160;&lt;br/&gt;
I&apos;ve found that performance for entities (minecarts, mobs, etc) degrades significantly when &lt;tt&gt;max_threads&lt;/tt&gt; is set &amp;gt;2 (regardless of the underlying host). It seems that this degradation minimally affects players and world loading &amp;#8211; for example, when degraded, a player can run smoothly, along a rail track, but stick down a mine cart, and ride, and movement can be about 1 square per second, and mobs/fired arrows/etc also move at about 1 square per second.&lt;br/&gt;
&#160;&lt;br/&gt;
My test environment: a freshly installed ubuntu 20.04 on a dell r410, 2x xeon x5650 processors (6 cores/12 threads each), 24gb ram, disks are 2x mirrored 15k rpm 143gb sas disks. The only thing running is a single copy of &lt;tt&gt;bedrock_server&lt;/tt&gt;. I&apos;ve tested with incremental changes to &lt;tt&gt;max-threads&lt;/tt&gt;, &lt;tt&gt;tick-distance&lt;/tt&gt;, &lt;tt&gt;view-distance&lt;/tt&gt;, &lt;tt&gt;server-authoritative-movement&lt;/tt&gt;. I have one user logged in an existing world, at the world spawn, with a fairly large number of entities within the tick distance. I have another user logged in, riding a mine cart in the nether. All tests are done on in previously loaded chunks, on a freshly started server instance within 30 seconds of instance start up. (I have separately tested to see if letting the server run for 10 minutes to load prior to testing would affect things, but with no noticeable difference).&lt;br/&gt;
&#160;&lt;br/&gt;
Either user can be logged in and operate just fine. However, with both users logged in, if the &lt;tt&gt;max_threads&lt;/tt&gt; is set anywhere over &lt;tt&gt;2&lt;/tt&gt;, (ex: &lt;tt&gt;3&lt;/tt&gt;, &lt;tt&gt;4&lt;/tt&gt;, &lt;tt&gt;8&lt;/tt&gt;, &lt;tt&gt;24&lt;/tt&gt;, &lt;tt&gt;0&lt;/tt&gt;(unlimited)), the nether rail cart comes to a crawl, and mob movement is visibly stuttery. With &lt;tt&gt;max_threads&lt;/tt&gt; set to &lt;tt&gt;1&lt;/tt&gt; or &lt;tt&gt;2&lt;/tt&gt;, The mob movement (chickens, spiders, etc) is smooth, and the nether rail mine cart has minimal stuttering.&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;tt&gt;view_distance&lt;/tt&gt; does not seem to have a noticeable performance effect below about &lt;tt&gt;48&lt;/tt&gt;, however at higher values, &lt;tt&gt;max_threads&lt;/tt&gt; needs to be increased, or elytra flight can outfly block loading. With &lt;tt&gt;max_threads=0&lt;/tt&gt;(unlimited) and &lt;tt&gt;view_distance=96&lt;/tt&gt;, elytra flight is possible without overflying loaded blocks. However, any mobs encountered move at a glacially slow pace. &lt;tt&gt;tick_distance&lt;/tt&gt; does seem to have an effect, but I haven&apos;t teased that out yet &amp;#8211; I suspect that larger number of mobs ticking exercises the thread limitations.&lt;br/&gt;
&#160;&lt;br/&gt;
With &lt;tt&gt;max_threads&lt;/tt&gt; set to anything other than &lt;tt&gt;1&lt;/tt&gt; or &lt;tt&gt;2&lt;/tt&gt;, and &lt;tt&gt;server-authoritative-movement=client-auth&lt;/tt&gt;, an interesting thing happens &amp;#8211; when the server is somewhat loaded (for example, in an area with extensive redstone contraptions), any time a player descends (down scaffolding, stairs, ladder, etc) the player will take fall damage as if they had fallen the distance descended. If a player descends 64 blocks of scaffolding, they will take damage as if they fell 64 blocks in free-fall. But with the same settings, and &lt;tt&gt;server-auth&lt;/tt&gt;, player movement is still smooth, and no fall damage occurs with descent.&lt;br/&gt;
&#160;&lt;br/&gt;
A few other interesting things I&apos;ve seen: When running in &lt;tt&gt;strace -f -c&lt;/tt&gt;, with &lt;tt&gt;max_threads=0&lt;/tt&gt;, a 2m2s run has this output from strace (truncated for just top 6 calls):&#160;&lt;br/&gt;
{{% time     seconds  usecs/call     calls    errors syscall&lt;br/&gt;
------ ----------- ----------- --------- --------- ----------------}}&lt;br/&gt;
{{ 75.34  295.929352        1699    174123     60918 futex&lt;br/&gt;
 13.61   53.461597       15420      3467           recvfrom}}&lt;br/&gt;
{{  3.83   15.026166         221     67866           read&lt;br/&gt;
  3.50   13.743365        1330     10326         1 clock_nanosleep}}&lt;br/&gt;
{{  3.15   12.361606          13    888758           clock_gettime&lt;br/&gt;
  0.30    1.174830           9    129890           gettimeofday}}&lt;br/&gt;
{{}}&lt;br/&gt;
{{}}And same world, same logins, etc, though run happened to be about 1m25s:&#160;&lt;br/&gt;
{{% time     seconds  usecs/call     calls    errors syscall&lt;br/&gt;
------ ----------- ----------- --------- --------- ----------------}}&lt;br/&gt;
{{ 55.44   28.957834         889     32565     12730 futex&lt;br/&gt;
 26.86   14.028774        5182      2707           recvfrom}}&lt;br/&gt;
{{  7.75    4.045752         143     28272           read&lt;br/&gt;
  6.96    3.637554         536      6778           clock_nanosleep}}&lt;br/&gt;
{{  1.62    0.843697           3    212790           clock_gettime&lt;br/&gt;
  0.72    0.374866           5     69017           gettimeofday}}&lt;br/&gt;
{{}}&lt;br/&gt;
&lt;tt&gt;}}Noting that the {{max_threads=0&lt;/tt&gt; version spent almost 5 minutes of cpu time (in 2 mins of real time) making &lt;tt&gt;futex&lt;/tt&gt; calls, while the &lt;tt&gt;max_threads=2&lt;/tt&gt; run used considerably less cpu time than real time. The &lt;tt&gt;max_threads=0&lt;/tt&gt; version made considerably more futex calls, and spent considerably more time per call.&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Unconfirmed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11700" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_11100" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Linked</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i1sx27:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>