1. Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

[Guide] How to run Infinity Evolved with 1.0GB RAM allocation

Discussion in 'General FTB chat' started by immibis, Mar 22, 2016.

  1. immibis

    immibis Forum Addict Mod Developer

    Because we all know Infinity Evolved is a memory hog, right? I have 6GB of RAM and I have to close everything else to run it smoothly. Well, it's not the modpack. It's not even the number of mods. It's just a small number of mods being wasteful.

    Note: That means "RAM maximum" setting (which controls the Java heap size) is 1GB; the actual amount of RAM used will be around 1.7GB.

    (This could be the wrong place to post this, but I didn't see a better place.)

    Use Minecraft Forkage


    Normally, Minecraft keeps an extra copy of every file it loads out of a JAR file. This wastes a ton of memory. Minecraft Forkage is a Forge replacement that fixes that, among a few other things. (It's kind of a zombie project that I revived just for this fix.)

    1. Download the Minecraft Forkage installer from here. Wait a moment for it to finish. (For the security-conscious among you, that file's SHA256 hash is 5b392895dccf4e7ef977076571bab4bf18d2c7e19f8fb449d883d2dc898e5287)
    2. Run the vanilla launcher and create a new profile. Set the game directory to where you installed FTB Infinity, and set the game version to MCForkage-1.7.10-1.7. (even though this screenshot says 1.4)

      [​IMG]

    3. Delete ResourceLoader, CustomMainMenu and Fastcraft from the FTBInfinity/minecraft/mods folder.
    4. Open the IndustrialCraft 2 JAR file (in 7-Zip or WinRAR), open the "lib" directory, and copy EJML-core-0.26.jar to your mods folder. (IC2 normally does this automatically, but it also doesn't work in this version of Minecraft Forkage)

    Disable Hats

    Hats wastes a bunch of memory storing all the models and textures for every possible hat, even when nobody is wearing them.

    1. Open the FTBInfinity/minecraft/hats directory, and delete everything.
    2. Download the hats-patch.zip file attached to this post, and extract it somewhere.
    3. Open the Hats mod JAR file (FTBInfinity/minecraft/mods/Hats-4.0.1.jar) in 7-Zip. Open the "common" folder, then "thread".
    4. Drag ThreadHatsReader.class into the "thread" folder in the Hats mod.
    The last three steps are required to prevent Hats from simply re-downloading all its hats.

    In multiplayer, if you walk near a player or mob wearing a hat, Hats will download that hat from the server. So you may want to periodically re-delete the hats folder.

    Disable Decocraft

    Decocraft wastes a ton of memory (about 600MB) by storing all the decorations inefficiently.

    1. Open the Decocraft mod file (FTBInfinity/minecraft/mods/Decocraft-2.2.1_1.7.10.jar) in 7-Zip. Open the "assets" folder, then "props", then "models", then "Decopack".
    2. Open the Decopack.zip file attached to this post.
    3. Copy the two files from Decopack.zip into the Decopack folder you just opened in Decocraft.

    On servers, all decorations in the world will look like stuffed creepers. Not sure what the effect will be in single-player.

    Disable JourneyMap

    JourneyMap wastes around 128MB for a redundant copy of every block texture in the game.

    JourneyMap is a client-side-only mod, so you can simply delete it from your mods folder.

    Unfortunately, JourneyMap is actually a useful mod, so you'll have to decide whether it's worth the memory savings.

    Optimize Project:Red

    Open FTBInfinity/minecraft/config/ProjectRed.cfg in Notepad, and search for the following line:

    Code:
        B:"3D Logic Wires"=true
    
    Change "true" to "false", and save and close the file.

    Run Minecraft

    [​IMG]

    While it seems okay so far with 1.0GB, all I've done is started the game and loaded a new world, and on a view distance of 2 chunks. But I suggest using a bit more if you can, at least 1.25GB or 1.5GB. Since I've added some more memory saving steps, Minecraft should now run quite comfortably with 1.0GB.

    Note: Minecraft Forkage currently does some processing before it shows a window, which takes about a minute, so be patient. If you want something to look at to make sure it's not stuck, watch the game output in the launcher.

    I'm also not sure which mod adds the "[MC 1.7.10 DevEnv]" tag to the top left (not visible on the above screenshot).
     

    Attached Files:

    Last edited: Apr 17, 2016
  2. GreenZombie

    GreenZombie Forum Addict

    Is this memory overuse problem going to be fixed on forge? I'm trying to build a low requirements modpack for 1.8.9 and I want to target a memory allocation of -Xmx768M and just Thaumcraft and chisel is making things tight.
     
  3. Chocohead

    Chocohead Well-Known Member Wiki Staff

    It doesn't strictly fix the memory overuse but work around it. It actually creates a jar of the entire game (Minecraft + all the mods) and appears to run that instead, which is the time before the window opens. This way there is only one jar actively being read, and every mod jar doesn't need to be kept in memory to access it quickly. The jar is also cached so if the mods don't change it won't be re-created (in theory at least), meaning it should start up faster after the first run.

    The installer (at least, I presume the rest of it is too) is compiled to Java 8, so if you run it and it dies with a Java Exception, it's because you're using an older version.
     
    RealKC likes this.
  4. immibis

    immibis Forum Addict Mod Developer

    That was the plan for Minecraft Forkage, and it was for faster startup times and not related to memory usage. It's not the fix I mentioned. Also, for now, it just re-generates the JAR every time.

    In the future it might only do the setup when mods change, and do more stuff at setup time, like stitching textures.

     
    RedBoss likes this.
  5. immibis

    immibis Forum Addict Mod Developer

    Probably not, it's in non-Minecraft Mojang code. (Specifically, in launchwrapper, for people who know what that is)
     
  6. immibis

    immibis Forum Addict Mod Developer

    Overwriting these files in Decocraft (IIRC, in assets -> props -> models -> Decopack), instead of deleting them, may fix the Decocraft crash (and all Decocraft models will look like stuffed creepers). I can't test it yet, because I can't log into the server I was using to test ("invalid session", presumably unrelated to Decocraft).

    Edit: It does work.
     

    Attached Files:

    Last edited: Mar 23, 2016
  7. Chocohead

    Chocohead Well-Known Member Wiki Staff

    Oh those changes were the memory related fixes.
     
  8. mattp_12

    mattp_12 Well-Known Member

    Is it possible to use this with a different launcher, such as MultiMC, or Curse?
    Does Forkage use the mods folder from the directory, or does it use the mods from the main minecraft directory?
     
  9. immibis

    immibis Forum Addict Mod Developer

    I don't see why not, but I'm not sure what the advantage would be either.

    From the game directory.

    By the way, it's currently possible (but undocumented and barely tested) to generate a modpack JAR that you can just double-click, with no launcher.
     
    mattp_12 likes this.
  10. mattp_12

    mattp_12 Well-Known Member

    By game directory, do you mean the modpack directory? Also, do you know of a way to use it with multimc? I prefer that launcher :3
     
  11. immibis

    immibis Forum Addict Mod Developer

    I don't see why not, but I'm not sure what the advantage would be either.

    From the game directory.

    By the way, it's currently possible (but undocumented and barely tested) to generate a modpack JAR that you can just double-click, with no launcher.

    I mean the modpack directory. And did you try it the same way as in vanilla - just set the Minecraft/Forge version and the game directory?
     
  12. immibis

    immibis Forum Addict Mod Developer

    The 12 next offenders seem to be:
    • Project Red (~140MB of rendering data) @MrTJP
    • JourneyMap (a single ~130MB texture)
    • Forge (~80MB of unused language data for other languages)
    • Forge (~72MB of useless-looking "package owner" data), but might actually be Forkage's fault
    • Steve's Addons (~60MB of item list data)
    • Forge (~36MB of "ASM data")
    • NEI (~29MB of item subset data) @Chickenbones
    • WR-CBE (~25MB of empty data structures about frequencies) @Chickenbones
    • CodeChicken Core (~24MB of superclass cache data)
    • Buildcraft (~14MB of facade recipes)
    • Forge (~14MB in a big list of all packages and all classes)
    • Buildcraft (~10MB of cached information about blocks that can be in blueprints)
    These 12 things in total account for about 2/3 of the remaining heap usage, but you can see diminishing returns happen rather quickly.

    (There's not much point to posting this, but I wanted to save it somewhere so I remember)

    Edit: wrongly calculated the size of the JourneyMap one
     
    Last edited: Mar 26, 2016
    RedBoss, phit and mattp_12 like this.
  13. immibis

    immibis Forum Addict Mod Developer

    I've uploaded a new version of Minecraft Forkage, and updated the link in the OP, to fix a crash when clicking on liquids in TiC smelteries.
     
  14. asiekierka

    asiekierka Over-Achiever Mod Developer

    Our facade recipes data takes up 14MB!? Crazy. Thanks for the note, I'll try to fix it for 8.0 - however, the blueprint data will probably have to stay.
     
    RedBoss likes this.
  15. Cory Morgan

    Cory Morgan Active Member

  16. mjacobinc

    mjacobinc Active Member

    How to get that Forkage thing running in multimc? do i still need to have forge version as usual and just add this forkage jar into mods folder? or how should it be done?
     
    mattp_12 likes this.
  17. immibis

    immibis Forum Addict Mod Developer

    Updated Forkage with some more memory saving changes, and added a step to delete JourneyMap (for people who can live without it).
    Main menu heap size is now about 540MB (about 260MB lower than before).

    That's weird. What's your operating system and Java version?

    I don't use MultiMC, but I would assume it works the same as in the vanilla launcher.

    Forkage replaces Forge. You should not be loading Forge.
     
  18. immibis

    immibis Forum Addict Mod Developer

    Added a step to save 100MB from Project Red. The heap size at the main menu is now 440MB. You should be able to run the game quite comfortably with 1.0GB.
     
    Kane Hart likes this.
  19. mariodk

    mariodk Active Member

    do this also work on other launchers than Vanilla/multiMC like FTB, Atlauncher & technic ?
    if so
    just replace the "installer" file with the launcher/modpack┬┤s Forge file
    or first install the files and then replace the:
    MCForkage-1.7.10-1.4,jar
    MCForkage-1.7.10-1.4,json
    MCForkage-1.7.10-1.4-core.jar
    files with the launcher/modpack┬┤s Forge file?
     
  20. KewaiiGamer

    KewaiiGamer Active Member

    Today I tried to start IE:E 2.4.2 with forkage and when it loaded up the main menu was covered with missing textures and when I created a new world the game crashed:
    http://pastebin.com/XWZBYmrU
    I immediately thought that CustomMainMenu mod was the issue because of this line
    -- Affected screen --
    Details:
    Screen name: lumien.custommainmenu.gui.GuiCustom

    so I deleted CustomMainMenu however it didn't fix the issue. instead it gave a slightly different crash:
    http://pastebin.com/yxX4HMyj

    now I don't know what to do, I followed all the instructions but I can't get it to work properly
     

Share This Page