FastCraft is a sophisticated mod which improves the client and server performance significantly without any game play changes. FastCraft is useful for anything, even fast PCs and servers benefit.
The mod is optional on both server and client, meaning that it can be installed on both server and client, just the client or just the server. Even mismatched versions between server and client are fine. It is recommended to always use the latest version on both sides however.
FastCraft doesn't require any configuration since it is supposed to be fully transparent to the user. To install FastCraft just drop it into your mods folder with Minecraft Forge installed. There may be bugs and the code is somewhat experimental, make backups of your world save while using it.
Optimizations/tweaks FastCraft applies are very broad and include the following:
- FPS improvements (client), benefits depend heavily on PC, mods and the world
- TPS / simulation improvements through faster code and better algorithms
- Lag spike elimination from world generation, light calculations and chunk loads
- RAM savings of around 200 MB for a decent amount of mods
- Faster chunk loading (client/server) and rendering (client)
- Faster game startup
- Minor network bandwidth reduction in some scenarios
Contact
If you prefer a more immediate format than this thread, you can use IRC in #fastcraft on esper.net for questions, discussion and support regarding FastCraft and MC client/server performance.
Download
Redistribution is restricted, the spoiler section at the bottom lists the conditions.
Download: http://files.player.to/fastcraft-1.25.jar
Latest preview/test/unstable build: http://files.player.to/fastcraft-1.25.jar
Change log
Version 1.24/1.25
- fix compatibility with recent Optifine versions
Version 1.23
- fix compatibility with ruinsmod
- fix compatibility with named entities with invalid AABBs as used for server-side for banners
- fix crash from setting enableCullingTweaks to false
Version 1.22
- much improved culling and related tasks
- faster text rendering
- faster serialization and deserialization
- better tick and update scheduling
- compatibility improvements
. additional misc. tweaks and fixes
Version 1.21
- fix not creating the config folder if it doesn't exist
Version 1.20
- much improved support for large texture packs, which was FC's most significant limitation
- slightly improved simulation performance
- improved support for odd sized textures, e.g. with anisotropic filtering
- compatibility improvements
- new config file for niche issues and later somewhat game play changing optimizations
- some detection for corrupted or incorrect installs
- new debug options
Version 1.17/1.18/1.19
- additional world gen lag reduction
- fix texture glitches with Optifine
- release preparations
- debug options for frequent issues
- bug fixes
Version 1.14/1.15/1.16
- much faster chunk rendering (caching)
- slightly optimized path finding (ai)
- minor world gen related rendering tweaks
- ColoredLights compatibility
Version 1.13
- faster chunk loading (mostly for servers)
- minor startup time optimization
- version checker notifying about updates
Version 1.12
- improve performance for some rarer cases
Version 1.10/1.11
- fix ShadersMod compatibility
- improve performance for very tile entity heavy worlds
Version 1.9
- lots of compatibility and bug fixes
Version 1.8
- fix edge case startup crash
Version 1.7
- fix missed lighting hook
- client side improvements
Version 1.6
- added -Dfastcraft.asm.permissive
Version 1.4+1.5
- fix reported crash issue
Version 1.3
- fix internal class loading issue
Version 1.2
- new minor performance tweak
- memory optimization for lower end systems
Version 1.1
- Reduce GC pressure from light updates.
Version 1.0
- Initial release.
Sampler 1.60.1 (MC 1.7.10)/1.62.1 (MC 1.8.9)/1.63.1 (MC 1.9)/1.65.1 (MC 1.9.4)/1.69.3 (MC 1.10)/1.72.1 (MC 1.11)/1.84 (MC 1.12)
Sampler is a small mod designed to obtain performance related information from the game at minimal overhead.
Download 1.60.1 (MC 1.7.10): Link
Download 1.62.1 (MC 1.8.9): Link
Download 1.63.1 (MC 1.9): Link
Download 1.65.1 (MC 1.9.4): Link
Download 1.69.3 (MC 1.10): Link
Download 1.72.1 (MC 1.11): Link
Download 1.84 (MC 1.12): Link
It provides the 2 commands /sampler and /csampler. They are mostly equivalent, the latter just runs the task on the client instead of the server. Running them without parameters gives a list of available subcommands. Both are to be followed with a subcommand (e.g. /sampler tps) and parameters as applicable (e.g. /sampler counts 0).
Sampler can profile the game over a time (between start and stop), at start-up and during ticks with lag spikes (trigger feature). The export subcommand generates a (mostly) VisualVM compatible .nps snapshot for manual analysis. The profiling sampler does is much less overhead compared to other solutions. The typical sequence to acquire a cpu usage profile (nps) is: /sampler start, wait a few minutes, /sampler stop, /sampler export <filename>.
Sampler also detects when the server thread is stalled for a significant time, i.e. probably stuck in an infinite loop or a dead lock. In this case it'll create a report in the stall-reports directory containing stack traces for all threads.
Utility subcommands include:
- tps: Show statistics about the tick time. tps is a frequency, period is 1 / frequency, the period should ideally be always 50 ms. Sampler's measurement includes the full tick time including wait times. The dedicated server gui, Forge and others provide a tps command which lacks the time spent in the often expensive server tick end handlers. The statistical information (average, min and max) in the tps output refers to the past ~1.7 minutes.
- counts: Show counts of dimensions, chunks, ticking tile entities, non-ticking tile entities etc. Call it with the dimension id (0 = overworld, -1 = nether etc.) for more detailed tile entity counts.
- memory: Show information about the memory used and available. It also displays the time spent in GC which shouldn't be too much. Heap, non heap and pool direct have to be added together to get an estimate of the total MC memory consumption, excluding some JVM overhead and OpenGL memory.
- heapdump <filename> [--compress]: Create a heap dump for memory leak analysis in Eclipse MAT or VisualVM. Compress will gzip the output file.
- gc: Force a jvm garbage collection run, causes a lag spike. This will allow you to see the actual/net heap usage in /sampler memory.
- find <class> [<dimId>] [--ticking] [--unloaded]: Find entities or tile entities of a specific (super)class, also in unloaded areas.
Extra tweaks/tips
Memory (RAM, -Xmx startup option)
- The default amount of memory Java allocates is insufficient for modded Minecraft. 1200 Megabytes is about the minimum reasonable (-Xmx1200M), 2000-3000 Megabytes should work well. For the client add another 1-2 GB with large mod packs, for MC 1.8+ another 1-2 GB.
- Never allocate too much RAM to Minecraft, there has to be enough remaining for the Operating System, other programs and Minecraft's off-heap data. This off-heap data doesn't count towards the Xmx setting, it's used by program code, texture/geometry buffers etc. More memory also means garbage collection has to do more work.
- Some mods leak large amounts of memory. If your game happens to slow down over time, sometimes as soon as a few minutes in, you may be suffering from a memory leak. Sometimes this can be observed by watching "Used memory" (F3 screen). The value will frequently hug the upper ceiling (100%) and only decrease marginally each time, possibly accompanied by a lag spike.
General
- Use 64-Bit Java and the most recent version.
- Be careful with custom startup options, many of those aren't helpful.
- The FastCraft config provides extra tweaking options.
Client
- Reduce the view distance as needed, helping CPU, GPU and RAM usage.
- Build performance intense structures (farms, effect heavy or dynamically rendered blocks etc.) further away. Chunks next to the player are the most expensive, they don't have their render cache updates throttled and the game won't try to cull costly geometry. Moving structures completely out of the view distance is even better.
- Mini map mods tend to have severe issues regarding performance and/or faulty threaded world accesses.
- Disable V-Sync, doing so may cause tearing artefacts, but it prevents the fps to be limited to a divisor of your monitor's refresh rate (e.g. 60/30/20/15 fps).
- Try setting "Max Framerate" to unlimited.
- Reducing particles, turning clouds off, setting smooth lighting to off, disabling or reducing mip maps (=level 0) or using the "fast" graphics mode can help.
- Turning Forge's splash screen off can reduce startup times substantially (config/splash.properties - enabled=false)
- 1.8+: Turning Forge's lighting engine off can reduce chunk rebuild times substantially (config/forge.cfg - B:forgeLightPipelineEnabled=false)
- Downgrade Optifine to a version without embedded shader support if using shaders is not desired
Server
- Try using only personal chunk loaders which are inactive while the owner is logged out or none at all.
- Restart the server often, esp. when the loaded chunk count or memory usage is unusually high (seen e.g. in "/sampler counts" and "/sampler memory --gc")
- ALWAYS run the dedicated server with the nogui parameter at the end, otherwise the GUI will frequently trigger garbage collection.
- Contrary to opposing claims elsewhere, using ParallelGC - the default in Java 8 - seems to work best and should only trigger very infrequently.
Other mods
- Optifine replaces most of the render engine to potentially boost fps. FastCraft and Optifine complement each other to a large extent, they are not doing the same thing although the end results may be similar. Be aware that Optifine may cause render glitches with some mods.
- FpsPlus replaces Minecraft's math functions with possibly faster ones, depending on your CPU.
- Opis is a general performance monitoring tool similar to Sampler, but capable of telling where some of the lag sources are in a world. It's a lot more user friendly, but uses a very different data acquisition method influencing the test environment more. Keep relative ratios in mind, if Opis says 8.000 µs, that's really just 0.016% of the total tick time (50000 µs) including the measurement overhead.
...(to be continued)
Known issues
Incompatibilities
- Ruins mod: RUINSTRIGGER doesn't work
- CoFHTweaks: broken/crash
- Cauldron+Forks: Only some versions work
Redistribution
Redistribution of FastCraft is only allowed under the following terms:
- FastCraft may only be redistributed as part of a mod pack, i.e. a collection of mods intended to be typically used as a whole on top of Minecraft. Individual copies of FastCraft must not be shared unless they are in a non-advertised, non-browsable repository for automatic download methods (launchers, installers), in which case they are treated as a part of the mod packs referencing them.
- The FastCraft binary (jar) shipped with the mod pack must not have its contents altered and has to be bit identical to an official release.
- The download and the way to get there must be free of charge and ad free, except for a basic banner/text/sponsor ad typically occupying less than 100,000 pixels total on a 1920*1080 pixel display.
- If using the mod pack typically involves the use of a launcher or installer, it's required that it allows the user to easily disable or manually upgrade FastCraft.
- The mod pack description must highlight the use of FastCraft, contain a link to this thread, tell what it does and who made it and ask the users to always mention FastCraft being used in bug reports. An entry in some mod list is insufficient.
- The version being redistributed must not be older than 3 weeks since a more recent version compatible with the same Minecraft version was released. Versions not posted in this opening post and test builds don't count as releases and can't be redistributed.
- Redistribution permissions are not permanently granted, they automatically expire within 3 weeks and need to be reacquired by agreeing to the latest conditions and implementing any potential changes, including ceasing redistribution altogether as required.
TL;DR: Only for mod packs, unmodified, no pay or ad wall, warning+link+author+bug report mentioning in the description, disableable+upgradeable in launchers, update within 3 weeks, conditions may change.
Example description:
QuoteThis pack contains Fastcraft, by Player, enabled by default. Fastcraft enhances Minecraft with increased performance. Bug reports being made directly to Mod Authors should state Fastcraft is enabled.
Note that you don't have to explicitly state that you agreed to these therms, it's being assumed by redistributing FastCraft, which you may not do otherwise anyway. It's however still appreciated if you say in which mod packs you included FastCraft just so I can get a rough idea where it's being used.
If you have further questions regarding redistribution send me a private message.