[Guide] Maximizing Performance with Fabric [1.17.x]

Discussion in 'Player Guides, Tips and Tricks' started by triphora, Sep 25, 2020.

  1. This exact same guide is also available on the QuiltMC forums: Maximizing Client-Side Performance with Quilt - Off-Topic / Minecraft

    If your frames per second (FPS) is lower than you want it to be, I can help.

    Even if your system is unable to get a full 60 FPS, you can still get pretty close with these changes/additions! To see what they did to a test system of mine, open the spoiler.

    Throughout this process, I will be comparing the number of frames I get on my system.
    This is a Dell Precision M6600, with an Intel Core i7-2820QM, an AMD FirePro M6100 GPU, and 20 GB of memory. Full hardware and software info at https://linux-hardware.org/?probe=3c06ad8f67.

    The only apps running in the background will be Kate, Discord, and VLC playing Meat Loaf's full Bat Out of Hell album.

    The testing world is a Creative/Normal Mode singleplayer world. I will be standing stationary at the spawn point.
    Daylight cycle is off and time is set to midnight, to allow mobs to be a variable.
    The Minecraft installation is completely new.
    Video settings will be default.
    The MC window is 1920x1010 (windowed).
    There is no FPS cap, and VSync is off.

    TEST 1: Vanilla 1.17.1; 2GB allocated; using no JVM flags
    FPS fluctuates between 30 and 65, with an average of 50.

    TEST 2: Vanilla 1.17.1; 4GB allocated; using new JVM flags
    FPS fluctuates between 40 and 65, with an average of 50.

    TEST 3: Fabric 1.17.1; 4GB allocated; using new JVM flags; Sodium, Lithium, Starlight, and Hydrogen installed
    FPS fluctuates between 80 and 130, with an average of 110.

    TEST 4: Fabric 1.17.1; Same conditions as test 3 but with my modpack
    FPS fluctuates between 75 and 120, with an average of 95.

    (tl;dr of "Frame Tests: these optimisations made my framerate go from 50 to 110.)

    So what did waffle do to get from 50 FPS to over 110?!

    Well, the answer is that everything is in the settings that you use, and what you have installed. Remember: the hardware in these tests did not change at all; only the settings and the software.

    STEP 1: Allocating more memory

    One of the things that Minecraft (and Java applications in general) relies on is memory. This is where everything that the game is using right now is stored.

    Minecraft generally runs better if you give it more memory (not always but usually). The amount of memory you can use is completely dependent upon how much physical memory is in your system.

    To figure out how much memory your system has:
    Windows: Taskbar search > input System Information and scroll down to "Installed Physical Memory (RAM)"
    macOS: Click the Apple logo in the top left and click "About this Mac". It's listed under Memory.
    Linux: You probably already know how much you have.
    This will generally be about 4 to 16GB, depending on your system, but can be higher or lower.

    I recommend using 1 to 4GB of memory. If you have more than 8GB, allocate 4GB, and if you have less than 8GB, take your memory amount and half it. Do not allocate more memory than you have physically in your system.

    To allocate this amount of memory to Minecraft, go into your game instance's "JVM Arguments". The first two flags have the following arguments:

    "-Xmx2G -Xms1G"

    Xmx is your maximum memory allocated to Minecraft, and your minimum memory is Xms. Modify the maximum (first flag) to have what you calculated earlier; e.g., I would use "-Xmx4G".

    As for the minimum (second flag), you can set this anywhere between half of your maximum to the maximum (e.g. I could use "-Xmx2G").

    Once that's saved, you now have more memory than you would by default! To ensure that you've configured it correctly, start up Minecraft and press Alt + Shift + F3. This will bring up a menu that's more detailed than normal F3. In the top-right, it should say something along these lines:

    "Mem" should be out of the "Xmx" amount (times 1024). If that's correct, you've done it right! Congrats!

    STEP 2: Installing Sodium & friends

    If you haven't already, you should install the Quilt Loader. You can see instructions on how to do that in the official guide.

    The next step is to install performance-enhancing mods. Personally, the ones I recommend the most are Sodium, Lithium, Starlight, FerriteCore, and EBE. These five mods all target certain aspects of the game and optimise them. All are approved mods for use on EMC. Place those into your mods folder.

    If you prefer, my modpack also has these mods included, plus some other smaller optimisations.

    Are you using OptiFine? See why you shouldn't.

    STEP 3: Tweaking video settings

    The third step to optimising your Minecraft: change around your in-game settings!

    All of your progress is going to be for nothing if your render distance is 32 and your biome blend is 9. :p

    Go into the ESC menu > Options... > Video Settings.

    My personal recommendation is to lower the settings that impact performance to the lowest they can go, and gradually increase them one-by-one and see how they affect your FPS.

    As for VSync and FPS Limit: I personally recommend turning off VSync, and turning on FPS limit, to whatever your monitor's refresh rate is (usually 60 Hz [FPS]). This allows your FPS to reach its highest potential, without hogging up all your computer's resources.

    Turn VSync back on only if you're having issues with screen tearing.

    STEP 4: Closing other applications

    This one seems obvious, but it needs a mention. If you're still having issues, you might have some unnecessary applications running in the background. Try opening Task Manager / System Monitor and closing apps that take up a lot of memory and CPU usage.

    Just be careful not to close things that are integral to your system running! (*cough cough* don't end System, kernel_task, systemd, etc., I've made those mistakes before so that you don't have to :p)

    It also may be worthwhile, if your computer is the lowest of the low, to switch to a whole other operating system entirely. Windows isn't known for being the most resource-efficient, so either run Windows10Debloater, or maybe even put a bit of research into Linux and find a distro that works for you (I recommend Pop!_OS for beginners). :)


    You're now complete! Share how much your FPS increased by replying below, I'd love to see if/how much this guide has helped! :D

    If anyone has any other optimisations they'd like to share, feel free to, I might add them to this guide! :)
  2. Before making the changes, I was getting 75-80 FPS for the area I was in. After making all the changes, I was getting 85-100 FPS. I had sodium enabled for both.
    wafflecoffee likes this.
  3. I think that's a really good comprehensive list of tweaks one can make for their machine if it struggles with Minecraft at default settings, or even with Optifine installed. :)

    'Tis a shame that Sodium does not support 1.16.3 yet... I look forward to using it with Lithium and Phosphor when it is updated to 1.16.3 however! :D
    wafflecoffee likes this.
  4. Alright, I feel like I'm doing something wrong. I did everything and my FPS is fluctuating between the 30s and 60s constantly. :confused:
  5. Well, this could be due to a number of different reasons. First of all; what framerate did you get before making the adjustments? Is this an improvement or a loss?

    Secondly: what area was this framerate recorded in? My own tests were in singleplayer, and on EMC conditions are quite different. At my own base, I get an average of ~20 FPS without adjustments, and 40 with.

    Third: do you have any other applications running in the background? Whenever I open a new tab on Brave/Chrome/etc with the game open, my game spikes to about three FPS before going back to a stable 40-ish.
  6. My framerate before was usually around the mid 40s I'd say, with some minor fluctuation here and there. So 60s part of this is an improvement, but the lower end is a loss.

    I was first testing on EMC, but then I tried a singleplayer world and the results were basically the same, the only difference being that the fluctuations happened a small bit slower.

    Nothing running in the background.

    I am confusion.:confused:
  7. It depends on your system configuration too, so some people may not really see a difference. I know there's people who have said they get worse performance with Sodium.
    wafflecoffee likes this.
  8. Have you tried Optifine? It seems that for some people Optifine works better, and for others Sodium and friends. :)
    Egeau, Yixomua and wafflecoffee like this.
  9. Update: I am a bit of a silly goose... I realized I didn't have the fabric API downloaded... :p Now that that has been solved, I'm running steadily at 75 FPS! :D
  10. Worth mentioning: If you have a relatively newer version of windows (7 or higher) and a newer flash drive, there's actually a feature on windows, called ReadyBoost, that allows you to convert some of the free space on your flash drive to temporary RAM. I've never tested it in the context of Minecraft, but I have tested it on laptops with a small amount of RAM (~2 GBs) and found it made a big difference with general use.

    It will require reformatting a flash drive, but if you're short on cash or you have a slow computer this could make the difference.

    WARNING: While you can allocate the additional RAM to Minecraft, the computer will be using it for general use as it is essentially an external RAM stick. As a result, unplugging it as long as your computer is on will result in your computer crashing into a blue screen of death. If you need to unplug it, shut down the computer first, remove it, and then reboot.

    Also goes without saying that if you unplug it after shutting it down, you need to fix the allocation settings as provided in the above instructions before launching minecraft out of the launcher, otherwise you could run into some problems if it's trying to grab 4 GBs and you only have 3 available.
    wafflecoffee likes this.
  11. Bump! Added some additional instructions for background processes and Linux :)
  12. Bump :D
    Ahzeriel3553 likes this.
  13. Awesome post! Helped out me a lot :)
    wafflecoffee likes this.
  14. So I am running a 512x resource pack, with shaders... Can you please help me stop my gpu from going brrrrrrrr?
  15. Step 1. unplug your monitor
    Step 2. unseat the memory in your system
  16. Step 3: Profit
    Step 4: Repeat as necessary.
    wafflecoffee likes this.
  17. It's supposed to have memory?
  18. After making all the changes I'm not able to join Hypixel and some other servers.
    It just keeps giving me this error every time I try to join:

    io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection timed out: no further information:

    How can I fix this?
  19. MineCraft Has fixed this and i can confirm it works
    Update the Launcher is the fix