Skip to content

Extreme lag spikes with F3+F #37

@DesktopFolder

Description

@DesktopFolder

Replication video: YouTube

Based on extensive testing, here are the details of the issue as I'm aware of them:

  • The problem is client-side only. The server does not freeze while this is occurring. Also, the render thread appears to continue execution just fine. Replication: Create a command block with repeating output; note that output continues while game is frozen.
  • The issue only occurs when chunkBuilder.limitThreads is set to a high (?) value.
  • The issue does not occur (? more testing may be required) with serial GC. It only occurs with Parallel, Z, and G1 GCs. Note that the serial GC is laggier when raising/lower RD, but we never get the mass memory frees that we see with parallel gcs like Z, G1, or the default.
  • (Lag spike change: Eliminate the assumption that only one client world exists #1) Whatever the source of the issue is, it is possible for ChunkRenderManager() (SodiumWorldRenderer.java:307) to take upwards of 15 seconds to execute.
  • It seems to be GC related, as when lag spikes occur, it can take a variety of different tasks a long time to execute. Specifically, however, it does seem that ChunkBuildBuffers buffers = new ChunkBuildBuffers(this.vertexType, this.renderPassManager); frequently takes a long time to execute, and the methods afterwards never do.

Although it's known that lowering the number of processors availalbe in the ChunkBuilder does fix this issue, this has been found to also decrease chunkloading performance (problematic for AA, etc).

Note: I will propose a preliminary, poorly executed solution in a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions