Back to mods
Sleepium project artwork

CurseForge · Minecraft mod

Sleepium

A performance engine for servers and clients that keeps the game exact: idle ticks put to sleep, a compiled event bus, parallel worldgen, a fast renderer with its own shaderpack support (beta).

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Sleepium release matches 1.12.2 Forge?

Updated today
alpha file Sleepium 1.4.12.1 for 1.12.2 (Forge, alpha)
Game version 1.12.2
Loader Forge

Sleepium 1.4.12.1 for 1.12.2 (Forge, alpha) targets 1.12.2 with Forge. The project page does not say whether this file belongs on the client, dedicated server, or both. All 1 required mods have matching files.

Where it goes

Is Sleepium required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release Forge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does Sleepium 1.4.12.1 for 1.12.2 (Forge, alpha) need?

Sleepium 1.4.12.1 for 1.12.2 (Forge, alpha) on 1.12.2 Forge. Every mod below is checked against that same setup.

All 1 required mods have matching files

Install MixinBooter first. We found matching files for this game-version and loader setup.

MixinBooter Needed by Sleepium 1.4.12.1 for 1.12.2 (Forge, alpha)
required
Matching file found Matched file: MixinBooter 12.5

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add Sleepium without breaking your instance.

Built for Sleepium 1.4.12.1 for 1.12.2 (Forge, alpha) on 1.12.2 Forge. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use Sleepium 1.4.12.1 for 1.12.2 (Forge, alpha). It targets 1.12.2 with Forge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install MixinBooter first. We found matching files for this game-version and loader setup.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside Sleepium 1.4.12.1 for 1.12.2 (Forge, alpha). It opens that exact file at the source.

About this project

What does Sleepium add?

Sleepium

A performance engine for Minecraft 1.21.1 (NeoForge) and 1.20.1 (Forge) that makes servers and clients cheaper to run without changing what the game computes.


A note from the author

For health reasons I'll be stepping away from Sleepium for a while, most likely about a year. This isn't the end of the project. I hope to be back once things are better, and I'd rather leave it in a good state than let it fade quietly.

This week is your chance to shape the last releases. I'm putting out several updates over the next few days, including an experimental "maximum speed" mode for 1.4. If there's something you'd like to see (a feature, a setting, a mod it should work better with, a crash that bothers you), please tell me in the next few days in an issue or a comment. I'll do what I can before I go.

While I'm away:

  • The mod keeps working on the versions it supports (1.21.1 NeoForge, 1.20.1 Forge). Every exact optimisation is checked against vanilla with world hashes, so it should stay safe to use.
  • I'll try to find someone to look after it: answering issues and making small fixes where they can. Big new features are unlikely until I'm back. If something breaks in the meantime, turning off the feature in Options → Sleepium… or using the Off preset is the quickest way around it.
  • Please use it. Play with it, study it, take ideas or code from it for your own projects. The source and the notes explain how each optimisation works and how it was measured. If any of it helps someone make Minecraft run better, that's exactly what I hoped for. It's under LGPL-3.0, so forks and reuse are welcome within that licence.

Thank you to everyone who tested it, reported crashes and sent ideas, especially those who tried the experimental options in big modpacks. That's what made it better.

See you, hopefully in a year.


Forks, ports and reuse

You're welcome to fork Sleepium, port it to other Minecraft versions (backports and newer versions alike) or loaders, and publish your build on CurseForge, Modrinth or anywhere else. It's under LGPL-3.0, which allows all of this. What the licence asks in return:

  • keep your changed source open under LGPL-3.0, with the licence files (LICENSE and COPYING) included;
  • say that your version is modified, and keep the existing copyright notices.

A few requests on top, so players can tell builds apart:

  • Name it as unofficial, for example "Sleepium (unofficial 1.21.4 port)", and link back to this repository.
  • Change something. Platforms don't allow plain re-uploads of someone else's mod; link to the official pages instead.
  • Mod id: a straight port to another Minecraft version can keep sleepium (configs and packs keep working); a fork with different features should use its own id.
  • Exactness: Sleepium's promise is that it changes nothing the game computes. Please call your build exact only if it passes the exactness checks - the tools are in this repository (tools/suite.py, tools/box_suite.py).

If you'd like to look after the official project while I'm away, open an issue and say so.


Known issue in 1.2.0-1.3.0: many tech-mod machines can make the server slower

Sleepium lets idle machines from other mods "sleep" so the server doesn't tick them. This feature (ObservedModSleep, on by default since 1.2.0) isn't finished the way it should be. For machines whose code Sleepium can't analyse, it checks every tick whether the machine has changed. It does this by looking at all of the machine's state and its neighbours'. That check costs about 10 µs per machine per tick, while most mod machines' own ticks take 0.5-2 µs. So the more machines you have, the more time it costs instead of saving.

Measured on a dedicated server with 13 popular tech and storage mods (Immersive Engineering, Mekanism, Industrial Foregoing, PneumaticCraft, Functional Storage, Sophisticated Storage, AE2, Create and others):

  • 18,000 machines (all 562 ticking machine types, 32 of each), NeoForge 1.21.1: 15 ms per tick without Sleepium, 126 ms with 1.3.0;
  • the same on Forge 1.20.1: 19 ms without, 120 ms with 1.3.0;
  • 20,000 machines of 80 types: 12 ms without, 203 ms with 1.3.0. Rough rule: about +10 ms per tick for every 1,000 such machines, and a tick has 50 ms. Packs with a few hundred machines barely notice it. Big factories do.

If you're on 1.2.0-1.3.0: turn it off. Options → Sleepium… → World ticks and mobs → ObservedModSleep. On a server, add lab.sleep.ObservedModSleep=false to config/sleepium.properties and restart. Everything else in Sleepium keeps working.

1.3.1 fixes it. Sleepium now measures, for each machine type, what the check costs and what it saves. It switches the feature off for types where it doesn't pay. With 1.3.1 the same 18,000 machines run at 15 ms per tick on 1.21.1 and 19 ms on 1.20.1, the same as without Sleepium. 1.3.1 also keeps chunk saving off the main thread when Immersive Engineering or Mekanism are installed (before, those mods turned it off). Making mod machines actually sleep without a per-tick check is planned for a later version.


Using C2ME? Use Sleepium 1.1.4 or newer, and check your world. Before 1.1.4, Sleepium together with C2ME (or another mod that saves chunks on its own threads) could save chunks with parts missing. That was my bug, found and fixed in 1.1.4. Signs of it: No key palette in MapLike[{}] in the log, chunks that look hollow or do not appear. 1.1.4 saves correctly (tested: a world generated with C2ME, the game restarted, every chunk read back without an error), but it cannot restore data that was never written. If you played with C2ME on an older version, regenerate the broken chunks - delete them with MCA Selector, or the region files of that area in saves/<world>/region - or start a new world. Anything built in those chunks is lost when they regenerate.


Help wanted: checking Sleepium against mods

Sleepium lets a block entity sleep only when it can prove from the code that skipping its tick changes nothing, and every release is checked against vanilla scene by scene. Mods are where that proof is hardest: a mod's machine may keep its state in its own objects, use its own inventories and energy, or tick in ways our tests have not seen yet. This release found and closed one such gap (machines whose tick goes through an interface) by placing every block of 13 popular mods and reading what the analysis made of them. Next we want an automatic check that works for any mod: every machine fed and drained through the standard item / energy / fluid connections, put to sleep and woken in every way a player can, and compared with vanilla tick by tick.

If you know a mod whose machines behave differently with Sleepium, know a good way to test this kind of thing, or want to help run such checks on your pack, please open an issue on GitHub or leave a comment - we will be grateful. A link to the mod or the pack is enough: we download mods only from their official pages.


A hopper with nothing to do, a resting item stack, a furnace waiting for fuel: in vanilla each of them runs its full tick 20 times a second only to find out that nothing happened. Sleepium proves from the class's own bytecode and from what it observes that a tick only moves clocks, takes the object off the tick ("puts it to sleep") and wakes it at exactly the tick vanilla would have acted. Around that idea sit an event engine, exact memos and indexes, parallel world generation, batched chunk I/O, and a renderer that keeps frames pixel-identical.

Every optimisation is checked against vanilla: a scene runs twice from the same seeds, once with the optimisations off and once on, and after the same number of ticks every block, block entity and every field of every entity is hashed. On the client, rendered frames are hashed.

Numbers

Intel N100 (4 cores, 6 W, Intel UHD Graphics), server milliseconds per tick, lower is better:

scene vanilla Sleepium
4 000 item stacks 109.6 8.0 ×13.7
1 024 idle hoppers 2.78 0.73 ×3.8
items among sliding minecarts 36.97 10.82 ×3.4
1 024 furnaces 1.25 0.55 ×2.3
water and lava flowing 10.43 5.15 ×2.0
300 farm animals + 50 villagers 18.48 10.00 ×1.8

Client, entity / block-entity scene (armour stands, item frames, chests, signs, skulls):

  • Intel N100: 36-42 → 134-135 fps
  • Ryzen 7 5800X + RTX 4070 SUPER: 69 → 2 152 fps

First build for Fabric, an alpha. It carries two parts of the engine: world generation and entity rendering. Everything else in Sleepium (entity sleep, server ticks, networking, chunk rendering, particles) stays off on Fabric for now.

Needs Fabric API. Works next to Sodium.

Measured on one machine (Ryzen 7 5800X, RTX 4070 SUPER), Fabric Loader 0.19.5, the release jar:

  • World generation, a Chunky task of radius 400 on a dedicated server: 80 → 220-275 chunks/s
  • A scene with about 450 entities (item frames, armor stands, chests, signs, skulls), 1280x720:
    • 170 → 1319 fps (99th percentile frame 8.9 → 2.9 ms)
    • with Sodium: 157 → 1006 fps (8.7 → 3.1 ms)

Terrain, caves, aquifers and biomes come out as vanilla's. Ore blobs, dripstone and trees that cross chunk borders depend on the order neighbouring chunks are decorated in, which varies between vanilla runs too; generation in parallel varies it more.

Tested on a dedicated server with Chunky and on a client with Fabric API and Sodium. Not yet tested next to other Fabric mods: if something breaks, please open an issue on GitHub with the log.

1.4.6 - 2026-11-24

  • Maximum speed: chunk ticks in parallel. Random ticks (crops, grass, leaves and the like), snow, ice and lightning are worked out for all ticking chunks at once on the worker threads; the block changes, spawns, sounds and neighbour updates they make are applied right after, in order. Mods' blocks keep their random ticks on the server thread. 100 players moving around a normal world: 30.3 -> 25.6 ms a tick on 1.21.1 (about 7 % less on 1.20.1).
  • Fixed (Maximum speed): the server stopped when the game's profiler was on (/debug start, /perf start).
  • Fixed (Maximum speed): the server could stop when a mob at the edge of the loaded area wandered towards an unloaded chunk. For that mob's tick the unloaded chunk now counts as empty.
  • Issue #11 follow-ups: when a mod draws into the game's own buffers from a render worker, the work still moves to the render thread, but without an error and a stack trace in the log; -Dsleep.glTrace now only reads and reports by default (its retries need -Dsleep.glTrace.retry=true).

The exact modes are unchanged: the exactness checks stay identical to vanilla by default and with parallel entity ticks on.

New in 1.4.5: a fix for flicker with some mods, raiders in parallel

Fixed: flicker, stray stretched textures, dark frames and rare crashes with mods that draw in an entity's render event into the game's own buffers (issue #11). Such drawing is now recorded with the entity where it can be - the render cache stays on - and otherwise that mob is drawn the normal way.

Maximum speed now ticks raiders in parallel too - witches, pillagers, vindicators, evokers, ravagers (witch and raid farms: 5.8 -> 1.7 ms a tick), and a new switch lets mods' mobs join (off by default).

New in 1.4.4: villagers on all threads

Maximum speed now ticks villagers and iron golems on every worker thread - the game's points-of-interest lookups (beds, job sites) run one at a time under a lock while the mobs around them tick in parallel. A farm with villagers, zombies and iron golems on a 4-core Xeon: 29 -> 22 ms a tick. Creepers tick in parallel too, and parallel dropped items no longer switch themselves off in long sessions.

New in 1.4.3: fixes for the experimental modes, Maximum speed with mods and crowds

Fixed: a server with parallel entity ticks or Maximum speed on could stop while generating new chunks (since 1.3.6); a rare crash when dropped items merged in parallel; on 1.20.1 the exact parallel ticks ran mods' LivingTickEvent listeners off the main thread. Both options are off by default - the default game was never affected.

Maximum speed now keeps ticking in parallel with mods that listen to entity ticks (their listeners run one at a time), and crowds are much cheaper: pig pens (5,000) on a 4-core Xeon 41 -> 25 ms a tick.

New in 1.4.1: Maximum speed on all your cores, a cores budget

⚠ Known issue - please use 1.4.2 instead. With Maximum speed turned on, the game stops at start on clients (MixinTargetAlreadyLoadedException on BlockableEventLoop). Dedicated servers are not affected, and with Maximum speed off (the default) 1.4.1 works normally. Fix: update to 1.4.2, or set lab.fast=false in config/sleepium.properties.

Maximum speed now uses every core but one (two in single-player): 30,000 pigs on an 8-core desktop 85 -> 50 ms a tick - 20 TPS; it ticks in parallel in mixed worlds too (dropped items and arrows between mobs no longer cut the parallel batch) and carries less overhead. On 1.21.1 chunks at the view edge stay loaded a little longer, so moving along the edge no longer reloads and resends them.

A cores budget (Options -> Sleepium… -> threads): how many worker threads the server, the client and the background work take - Auto or a number, with a summary of what each takes on your machine.

New in 1.4.0: Maximum speed (experimental, not exact)

Maximum speed (Options -> Sleepium… -> threads, off by default) is the first part of a mode that gives up vanilla's exact order for speed: mobs - animals, monsters, villagers and other brain-driven mobs - are ticked on worker threads, and their moves, block changes, spawns, pushes and item pickups are applied at the end of each batch. The world stays plausible and farms keep working, but it is no longer tick-for-tick vanilla. 30,000 pigs on a 4-core Xeon: 315 -> 104 ms a tick; pig pens 90 -> 42; a mixed farm 56 -> 30 (87 -> 47 on an Intel N100). More parts of this mode come in the next 1.4.x releases.

The exact modes are unchanged; parallel entity ticks (exact) now also tick dropped items, and a possible crash with them on is fixed.

New in 1.3.6: parallel entity ticks, decoupled frames with mods, a bigger HUD

Parallel entity ticks (experimental, exact; Options -> Sleepium… -> threads, off by default): the server's animals and monsters are ticked on worker threads. Every tick is checked and committed in vanilla's order, and a tick that met another is undone and run again in turn, so the world stays exactly vanilla's - checked with world hashes on four machines (Intel, AMD, ARM) on both versions. 30,000 pigs on a 4-core Xeon: 315 -> 192 ms a tick; 10,000 pigs on an Intel N100: 161 -> 116 ms. Crowded pens and farms tick the usual way, because that's cheaper there. Not covered yet: villagers and other brain-driven mobs, modded entities.

Decoupled frames with other mods: with other mods installed, a frame is drawn at a safe point of the tick instead of alongside it, so mods' render code never runs at the same time as their tick code, and frames still don't wait for a long tick to finish. Fixes ConcurrentModificationException crashes from mods' render handlers and Image is not allocated crashes from textures freed before the frame used them.

HUD: a Size setting (50-200 %) and four new widgets for any corner - Position (coordinates, facing, biome), System (CPU and RAM), Network (ping, packets) and Clock (game and real time).

Faster and fixed: mobs check whether they're stuck in a wall without scanning blocks when nothing solid is around them (-4 % server tick time with 30,000 mobs); the farm slowdown of 1.3.5 (+11 %) is down to about +3 %; a tick's packets leave in one batch at its end; a rare hang when creating a world is fixed.

Still exactly vanilla's game: 23 test scenes give identical worlds with and without Sleepium on real servers with the released jars, both versions - by default and with parallel entity ticks on.

New in 1.3.5: servers with many players, modded factories, less disk, faster generation

100 players on one server (bots flying in a normal world, 1.21.1): every movement packet makes the server check every tracked entity against that player - a cost /perf does not show. Sleepium checks the distance first: 33 -> 10 ms a tick, 9 -> 15 TPS. On a slow server a placed or broken block is answered between ticks instead of a tick later (at 100 ms ticks 162 -> 53 ms), and a long stall no longer kicks players with "Timed out".

A factory with 562 kinds of modded machines (Create, Mekanism, AE2, Immersive Engineering and more), server milliseconds per tick: without Sleepium 17.9, 1.3.4 18.4, 1.3.5 14.0. Vanilla checked every loaded chunk every tick for saving; Sleepium skips the chunks where that check would do nothing.

Disk: region files written through as vanilla writes them, without flushing the drive's whole cache twice per batch; freshly generated edge chunks kept in a small memory ring instead of written and read back. Chunky: the world disk 15 -> 6 % busy on an NVMe, 13 -> 9 % on a SATA SSD.

World generation: light for new chunks without the round trips through vanilla's task sorter, on its own thread: x1.38 chunks/s with 16 threads, Chunky 451 -> 494 chunks/s (Ryzen 7 5800X). On 1.20.1 this also fixes a vanilla race that could light a chunk before it was visible.

Mobs: standing mobs' movement and villagers' job-site checks are no longer recomputed when nothing changed.

Experimental switches (off, Options -> Sleepium): chunks keep reaching players on a busy server (holes in view 80 -> 0 at 10 TPS); a tick's packets sent at the tick's end; movement after a lag spike judged by packet arrival.

Still exactly vanilla's game: 23 test scenes give identical worlds with and without Sleepium, now checked on real servers with the released jar on both versions.

New in 1.3.3: world generation up to 4.6x faster, still exactly vanilla's terrain

Pregenerating with Chunky (5 929 chunks around spawn, NeoForge 1.21.1 server, Ryzen 7 5800X):

chunks per second
without Sleepium 77
Sleepium 1.3.2 228
Sleepium 1.3.3 359

Teleporting into new terrain (singleplayer, render distance 12), until every chunk around you is generated: without Sleepium about 10 s, 1.3.2 about 3.5 s, 1.3.3 about 2 s.

A 4-core Xeon server (E3-1270 v2, generation benchmark): 1.3.2 47.6 -> 1.3.3 87.8 chunks/s (+84 %). Forge 1.20.1 on the Ryzen: without Sleepium 45-49, 1.3.2 126-130, 1.3.3 166-188 chunks/s.

What changed:

  • Generation scheduled by its real dependencies (1.21.1). Vanilla 1.21 generates one status for a whole layer of chunks and waits for all of it before the next; 1.3.3 starts each chunk's next step as soon as its own neighbours are ready, so all generation threads stay busy. On 1.20.1 the steps no longer queue through one worldgen mailbox and the main thread.
  • Less work per chunk: terrain blocks written straight into the chunk's storage, surface rules planned per column, the density-function trees compiled to straight code, ores and biome checks in features without repeated lookups.
  • Exactly vanilla's terrain. Every change keeps vanilla's arithmetic in vanilla's order. Per-chunk terrain hashes are identical to vanilla in the Overworld, the Nether and the End, and with Terralith, Tectonic and Biomes O' Plenty; each change also compares itself with vanilla's own code inside the game (tens of millions of checks, no difference). Tested on dedicated servers and in singleplayer, and in a 229-mod and a 474-mod pack.
  • Mods page: where each mod's time goes (a player's suggestion). Options > Sleepium > Mods > Measure 15 s, then a mod: its cost by kind - its blocks, its mobs (server and client), drawing its mobs, drawing its blocks, its event handlers - each with its share and the costliest types inside. The HUD's list shows the top 5.
  • Intel graphics: Intel N100 against 1.3.2 - standing +11.7 % (1.21.1) / +10.4 % (1.20.1), moving +7.2 % / +5.5 %, the slowest 1 % of frames 10.5 -> 6.4 ms / 16.5 -> 9.2 ms. AMD and NVIDIA are unchanged.

Tested on a Ryzen 7 5800X + RTX 4070 SUPER, two 2012 Xeon PCs with a Radeon RX 570 and a Radeon HD 7870, an Intel N100 mini PC and a Raspberry Pi 4. Both versions pass the 23-scene exactness suite (the same world as without Sleepium, bit for bit) and draw the same frames as 1.3.2.

New in 1.3.2: smooth frames on Intel graphics, tested on five kinds of machines

  • No more quarter-second freezes on Intel integrated graphics. Some Intel drivers queued dozens of frames ahead of the graphics card and then held the game until it caught up - several times a second, even standing still. Sleepium now checks once per PC whether the driver does that and, where it does, keeps the game at most 3 frames ahead (the choice is remembered). Intel N100, the slowest 1 % of frames: 257 → 16 ms. AMD and NVIDIA cards are left as they were.
  • Fixed: the machine cost check from 1.3.1 could decide too early with very many machines of one kind.
  • The self-check of Sleepium's extra render threads now covers GeckoLib mobs and GPU-drawn items too.

Tested on five kinds of machines

This release was checked on a gaming PC, a low-power mini PC, two 2012 workstation PCs with Radeon cards and a Raspberry Pi 4 - Windows and Linux, x86 and ARM, NVIDIA, Intel, AMD and the Pi's own graphics. Numbers from this round of testing (1.3.1 and 1.3.2 measure the same on these scenes; no other mods installed):

Frames per second, client (higher is better)

Machine Scene Without Sleepium With Sleepium
Xeon E3-1270 v2 (4 cores, 2012) + Radeon RX 570 flying over the world 69 294 (x4.3)
Xeon E3-1230 v2 (4 cores, 2012) + Radeon HD 7870 flying over the world 60 241 (x4.0)
16-thread desktop + RTX 4070 SUPER, 1.21.1 teleporting into new terrain 558 2 208-2 337 (x4)

On the old Xeons the slowest frames also went from 40-47 ms to 18-22 ms. On the Intel N100 (UHD Graphics) 1.3.2's fix takes the slowest frames from 257 ms (1.3.1) to 16 ms; in flight Sleepium's own terrain drawing gives it 140-144 fps where the game's way gives 105.

Server, milliseconds per tick (lower is better), Forge 1.20.1 dedicated server

Scene Raspberry Pi 4 without / with Xeon PC without / with
many dropped items 363 / 22 96-103 / 6.5-6.7
mobs 39.1 / 21.2 19.4 / 11.3
villagers 41.4 / 24.7 17.9-18.3 / 12.8-13.4
hoppers 11.8 / 3.1 3.8-4.3 / 0.6-0.8
furnaces 4.0 / 4.0 1.1 / 0.8
pistons about the same 5.2 / 4.4
redstone about the same 11.3 / 11.0

Modded machines: a world with 562 kinds of machines from 13 mods (Create, Mekanism, Immersive Engineering, Industrial Foregoing, Thermal, …) x 32 each runs at 17.4 ms a tick, 16.9 without Sleepium - no slowdown from Sleepium's checks (1.3.0 took 150 ms here).

Exactness: 23 test scenes per version (mobs, villagers, redstone, pistons, hoppers, items, carts, fluids, crops and more) give the same world as without Sleepium, bit for bit; the picture is identical to 1.3.1 bit for bit.

New in 1.3.1: fixes for mod packs

  • Worlds full of modded machines no longer run slower than without Sleepium. Since 1.2.0, the per-tick check that lets mods' machines sleep could cost more than the machine's own tick. Sleepium now measures it per kind of machine and stops it where it does not pay off. 562 kinds of machines from 13 mods (Create, Mekanism, Immersive Engineering, Industrial Foregoing, Thermal, …) x 32 each: 1.21.1 150 → 16.4 ms a tick (15.6 without Sleepium), 1.20.1 135 → 19.5 ms (19.8 without).
  • Vanilla hoppers sleep fully again: on an Intel N100, 1.20.1 7.4 → 2.4 ms a tick, 1.21.1 1.9 → 0.85 ms.
  • Fixed: a rare freeze while chunks generate with C2ME, ModernFix and Chunky (GitHub issue #10).
  • Fixed: Entity Model Features heads and skulls switched off in bigger worlds, and items in item frames drawn unsafely by the extra render threads.
  • Quieter log: entity sleep prints a summary line instead of a line per mob type.

Checked before release on both versions: every exactness scene identical to vanilla, frames identical to 1.3.0 bit for bit, production clients with Embeddium / Oculus / Sodium / EMF.

New in 1.3.0: the frame and the tick go their own ways (experimental)

In vanilla one thread does everything in turn: it ticks the world, then draws a frame, then ticks again. When a tick runs long - a crowd of mobs, a big pack, a modded machine room - the picture simply stops until it is over, however fast your graphics card is. 1.3.0 is the first step of Sleepium's new cycle: the frame and the game's tick are separated. It is experimental, off by default, and you turn it on at your own risk - we want it in players' hands early, and we want to hear how it behaves in your worlds.

Decoupled frames - Options -> Sleepium -> Decoupled frames (needs a restart):

  • The frame gets its own thread and its own clock. The graphics context moves to a frame thread, and the frame is drawn there while the main thread ticks the world. During a long tick the frame thread keeps drawing on its own clock, so the camera still turns with the mouse instead of freezing.
  • A pipeline instead of taking turns. The main thread records the next frame while the frame thread draws the previous one (a ring of three recorded frames); what each frame sees - the camera, the lists of what to draw - is latched at its start, so a frame never mixes two moments.
  • Mobs tick in parallel. After the client's own tick, mobs - living ones too - are ticked on worker threads, laid out as a graph of tasks that waits only for what it really depends on.
  • Mobs are drawn from tick-rate poses. Each mob's pose is worked out once per tick and the frames in between interpolate it, so drawing a crowd no longer waits for a tick and the tick no longer waits for drawing. Model parts are still prepared on helper threads, as before.
  • Frames in flight kept in check: on drivers that queue frames far ahead (Intel) the number of frames waiting on the graphics card is limited automatically, so input does not lag behind.

What it does in practice (each line one test, the same path with the mode off and on):

off Decoupled frames
a 225-mod pack: the longest freeze 1.8 s 0.15 s
a 474-mod pack, flying over the world: the slowest 1 % of frames 91 fps 185-203 fps
the same, average 280 fps 312-345 fps
a phone (MojoLauncher), distance 6: average / the slowest 1 % of frames 119 fps / 34 ms 150 fps / 22 ms
Intel N100, a flight over new land: the worst frame 417 ms 226 ms

What to know before you turn it on:

  • It is not bit-exact like the rest of Sleepium. Mobs are drawn from interpolated poses (within 0.1 block of vanilla's), translucent items may be drawn in another order, and on 1.21.1 leaves draw no faces deep inside a canopy, where nobody can see them. The world itself - every block, every tick - stays exactly vanilla's.
  • It can be slower. It is about smooth frames, not the average: in the 225-mod pack the average went from 255 to 195 fps, and in that pack's mob zoo it was slower all round (122 -> 87 fps). Mods that replace the game's main loop (in that pack Veil, Sodium, Figura and Xaero's World Map) turn the frame thread's own clock off, and then it mostly costs. Try it in your own world and keep whichever feels better.
  • Some mods may not expect it - they may assume that drawing happens on the main thread. If something looks wrong, turn it off; after a crash that goes through it, the title screen names it and offers to turn it off.
  • Tell us what you see: a GitHub issue with your pack (a link is enough), what happened, and the numbers from Options -> Sleepium -> HUD helps us more than anything.

On by default, exact as always:

32 chunks, flying in circles while turning the camera and going up and down (desktop) 1.2.6 1.3.0
fps 162 806-857
the slowest 1 % of frames, fps 39 150-157
the worst frame 47 ms 35-37 ms
CPU used 8.9 cores 6.4 cores
the camera standing and turning, fps 715 1 120
  • Smoother flight at far view distances: the lists of terrain to draw are built on several threads, Biome Blend colours are worked out with running sums (the same colours; chunk meshing at the largest blend took 6 cores, now 2), crossing a chunk border no longer re-reads every section in view, and a new chunk no longer binds a GPU object it never uses. The same picture, checked frame by frame.
  • Android: render distance above 7 no longer crashes (MojoLauncher, Adreno). Chunk sections get their GPU objects only when they have something to draw: at distance 12, 1 617 instead of 75 000. A phone runs at distance 12 at 110 fps.
  • Fix: freezes of up to seconds in big mod packs (reported with Punchy and Better Combat 1.9.0): Sleepium's mob analysis no longer holds the lock every class lookup waits on (a 474-mod pack: 10.9 s -> 0).
  • Fix: other mods' Mixin warnings printed again and again (GitHub #8).

Next in this cycle: loading chunks in flight. Every time you cross a chunk border at 32 chunks, the game sends a strip of 65 chunks again and meshes them again, more than half of them unchanged; and every 8 blocks it rebuilds its whole visibility graph. Both are what we work on next.

New in 1.2.5: smooth camera turns at far view distances

Turning the camera, 32 chunks, desktop vanilla culling Sleepium 1.2.5
fps 167 1 124
frames over twice the median (stutters) 38.6 % 0.06 %
with the experimental GPU terrain, fps 131 379
  • No stutter when you look around. Every 2 degrees of a camera turn the game works out again which chunk sections are in view, reading every loaded section scattered in memory - about 7 ms a turn at 32 chunks. Sleepium keeps them in flat arrays and decides whole regions at once: the same sections in the same order, the same picture. A phone at 6 chunks: about +7 %.
  • Fix: the experimental GPU terrain left a cross of missing chunks at view distance 31 and above.
  • Fix: turning on the GPU terrain without OpenGL 4.5 (Android launchers) crashed the game; now the normal terrain stays, also when its grid does not fit in video memory (very tall worlds at far view distances).

New in 1.2.3: see and choose what Sleepium does to each mod

  • Options -> Sleepium -> Mods: what Sleepium does to every mod - which of its blocks and entities sleep and why not, which of Sleepium's changes gave way to it - and per-mod switches: sleep, entity sleep, render cache, helper threads, and whether Sleepium gives way to the mod (on a conflict / always / never).
  • What each mod costs: Measure 15 s (or /sleepium profile 15 on a server) times every mod's block entities, entities, event listeners and entity drawing - exact - and lists the ten chunks where the server's time goes.
  • For modpack makers: Save as pack settings writes config/sleepium-pack.properties - ship it, lock what players must not change. Mod authors can declare rules for their own content in their mods.toml. See the page for pack makers.
  • Find the cause: a setting behind a problem found by halves, about 7-8 restarts. After a crash in Sleepium the title screen names the part and offers to turn it off.
  • HUD: frames, a frame graph, stutters taken apart, server tick, GC, CPU per thread, memory, the costliest mods now - in the corners you choose, at no measurable cost (Intel N100: 169 fps without, 168.5 with every widget).
  • Fix: joining a server with Krypton on the client failed ("VarInt too long").

New in 1.2.2: mod machines sleep safely, no sound stalls

A fix first: since 1.2.0 a Thermal dynamo given fuel could stay off under Sleepium. Machines of mods whose code Sleepium cannot follow to the end now sleep only while watched: all of their own state is compared on every skipped tick, they fall asleep after 64 idle ticks, and they watch the blocks around them they send to or take from. Checked with the Thermal series, Draconic Evolution, Flux Networks, Mekanism, Immersive Engineering, Industrial Foregoing, Functional Storage, Applied Energistics 2, PneumaticCraft, Create and Sophisticated Storage: the world comes out the same with and without Sleepium.

before 1.2.2
Thermal dynamos fed fuel stay off run as without Sleepium
a 229-mod pack with Sound Physics Remastered, a burning zombie horde (desktop) 11 fps 41 fps
the same pack with its own shaders, at spawn 268 fps without Sleepium 310 fps
Intel N100, joining a world: the longest frame from Sleepium's chunk buffers up to 89 ms 1.2 ms
a phone (MojoLauncher LTW), 355 armoured mobs: the slowest frames (p99) 76 ms 45-50 ms
  • Sounds no longer stall the game: a sound starts without waiting for the sound thread (it used to hold every frame up next to Sound Physics Remastered and a crowd of mobs).
  • Measured once per machine: Sleepium's measured choices are kept in config/sleepium-calibration.properties - no more seconds of the slower way each time a world opens. Options -> Sleepium -> Recalibrate measures again.
  • Mod packs: the log names the mod and mixin Sleepium gave way to.
  • Dedicated servers no longer print a "ClientLevel for invalid dist" error at start.

New in 1.2.1: Android

Sleepium now runs on phones and tablets through MojoLauncher (and on any driver without OpenGL 4.3 - 1.2.0 crashed there at start). It checks what the graphics driver really supports and draws through OpenGL 3.3 where that is all there is.

A phone (Snapdragon 855+, MojoLauncher LTW, Forge 1.20.1, view distance 6) vanilla Sleepium 1.2.1
355 armoured mobs with swords, item frames, chests, fps 8 42-58 ×5-7
plain terrain view, fps 147 222 +51 %
the slowest frames in the terrain view (p99) 18 ms 10 ms
  • Terrain per region, model parts, items and particles from graphics memory - each with an OpenGL 3.3 path.
  • Animated textures blended on the graphics card where that is faster (on the phone: the slowest client ticks 31 -> 10 ms).
  • Choices by measurement: the render cache or the helper threads for entities, model parts from graphics memory on the helper threads, blending on the graphics card or the processor - Sleepium measures each on the running game and keeps the faster one (a few seconds of measuring when a world opens or a crowd appears).
  • F3 no longer halves the frame rate (1.21.1: 986 -> ~1 300 fps with F3 open).
  • Desktops and laptops: as fast as 1.2.0 (Intel N100: terrain 118, entities 132, items 183, a horde 183 fps), the same picture bit for bit.
  • Known, for 1.2.2: the measuring happens in the running game - a few seconds of the slower way when a world opens or a large crowd appears (a phone: about 5 s). 1.2.2 will remember the results per machine and measure in the main menu.
  • Renderers: tested with MojoLauncher's LTW; Zink / Turnip and Freedreno not tested yet. First of all Sleepium now runs everywhere: it checks what each driver can do and falls back to the game's own way where it cannot.

New in 1.2.0

1.2.0 against vanilla vanilla Sleepium 1.2.0
Intel N100, terrain view, fps 88 118-120 +34-36 %
Intel N100, dropped items, fps 49-56 182 ×3.3-3.7
Intel N100, a horde of mobs, fps 112-119 161-180 +35-60 %
500 Immersive Engineering crushers piling ~2 000 moving items, fps (desktop) 32 423 ×13
60 working IE crushers, fps (desktop) 177 1 786 ×10
1.20.1, 1 440 mobs with Entity Model Features + Fresh Animations, fps 11 43 ×3.9
world generation, chunks per second (desktop) 54 107 ×2.0
  • Intel graphics (laptops, mini PCs): terrain about 1.4x faster - chunks drawn with the call Intel's driver handles best (the N100's terrain view was slower than vanilla before: 82 vs 88 fps; now 120).
  • 1.20.1: Entity Model Features mobs on several threads (EMF 3.3.12 + ETF 7.2.x): 1 440 animated mobs 25 -> 43 fps.
  • Particles up to 2x, machines' moving parts drawn from the graphics card, smoother frames (the slowest frames on the N100 15-21 -> 11-15 ms).
  • Mods' idle machines sleep, on by default (Industrial Foregoing, Functional Storage, PneumaticCraft…). If a machine misbehaves, turn off lab.sleep.ObservedModSleep and tell us which one.
  • Experimental GPU terrain with level of detail (off by default): the N100's terrain view 88 -> 181-184 fps.
  • Tested with ModernFix, Fast Noise, Lithostitched, Bons and Furious; a crash next to Bons and Furious fixed (thanks to BonsUnleashed).

New in 1.1.11: tall-world datapacks generate up to 2x faster

Datapacks such as JJThunder To The Max make the game recompute "climate" values that do not depend on height for every 4x4x4 cell of a very tall column. Sleepium now reads the datapack's functions, finds those parts and computes them once per column - the same world, block for block and biome for biome.

JJThunder To The Max + Chunky, chunks per second vanilla Sleepium 1.1.10 Sleepium 1.1.11
1.21.1 37 108-116 195-233

A normal world and Biomes O' Plenty are unchanged (their climate is already computed once per column).

New in 1.1.10: a fix for world generation far out

On 1.21.1, generating new land far from the world's centre was slower with Sleepium than without it: each new mob's move from the centre to its place made Sleepium check everything in between. Fixed:

576 new chunks 64 000 blocks from the centre, chunks per second vanilla Sleepium 1.1.9 Sleepium 1.1.10
1.21.1 55 20-34 123-126
next to ModernFix, Fast Noise and Lithostitched 66-81 (those mods alone) 31-33 105-126

Long teleports were slowed the same way (less) and are fixed too.

1.20.1: moving blocks up to 1.9x faster. Blocks moved by pistons and falling blocks are now drawn from a cache, as on 1.21.1:

A scene with many moving pistons, 1.20.1 Sleepium 1.1.9 Sleepium 1.1.10
fps 790-979 1 515-1 552
slowest frames (p99), ms 5.7-6.4 2.9-3.3

Also, on both versions: blocks moved by pistons no longer show the light of a moment ago for a frame.

New in 1.1.9: a fix for ImmediatelyFast

1.1.8 was slower next to ImmediatelyFast (in most modpacks): items were prepared for the graphics card and then drawn again the normal way. Fixed - items, and on 1.20.1 also transparent entities, now go to the graphics card next to it:

1 128 dropped items + 1 081 experience orbs, next to ImmediatelyFast Sleepium 1.1.7 Sleepium 1.1.8 Sleepium 1.1.9
fps, 1.21.1 1 057 498 1 765

Also: entities that a mod adds from a world-generation thread go into the chunk being generated or onto the server thread (GitHub #4), and a new setting, off by default, ObservedModSleep - mods' machines that the analysis cannot follow sleep on what Sleepium observes, as before 1.1.8.

New in 1.1.8: items and experience orbs

Dropped items, items in frames and in mobs' hands are drawn by the graphics card from video memory, and experience orbs and items collide with blocks for less (every result the same as vanilla's).

vanilla Sleepium 1.1.7 Sleepium 1.1.8
1 128 dropped items + 1 081 experience orbs on the ground, fps, 1.21.1 182 1 066 2 094
the same, fps, 1.20.1 128 980 1 621
2 000 experience orbs + 1 500 items being picked up, fps, 1.21.1 1 194 215-219
the same on an Intel N100 with integrated graphics, fps 1 22-24 24-27

Many experience orbs at once? Sleepium works well together with Clumps, which merges them: the orb crowd above runs at 996 fps (Clumps alone: 128), on the Intel N100 at 89 fps (Clumps alone: 29).

New in 1.1.0: Minecraft 1.20.1 / Forge

The whole engine on Forge 47 (Java 17 or newer): sleeping block entities and entities, the event engine, exact memos, parallel world generation, the renderer, GeckoLib and Create support, the settings screen, shaderpacks.

Intel N100, production server, milliseconds per tick:

scene vanilla Sleepium
4 000 item stacks 114.9 10.7
300 animals + 50 villagers 22.2 13.25
120 villagers 19.3 14.0
1 024 idle hoppers 6.68 2.4

The fights from a player's Cursed Fate videos (840 entities, zombies burning at noon, black holes and supernovas): 87 -> 600-646 fps; with Oculus + Embeddium installed 289 -> 299 fps (next to Oculus the entities stay on the render thread).

New in 1.1.0: the gains kept next to other optimisation mods

Tested one mod at a time and as a pack (Biohazard: Project Genesis' optimisation set):

next to before 1.1.0 1.1.0
Embeddium (1.20.1), client fps 137 845
Oculus + Embeddium (1.20.1), client fps 238 440-464
ImmediatelyFast (1.20.1), client fps 371 681
Iris + Sodium, no pack (1.21.1), client fps 377 570
ImmediatelyFast (1.21.1), client fps 809 1 149
Lithium (1.21.1), 4 000 items, ms per tick 4.32 3.37

In packs, without Sleepium and with 1.1.0 (production clients):

without 1.1.0
Biohazard, 473 mods (1.20.1), a new world, fps 351-379 571-578
144 Fresh Animations mobs + 450 other entities, EMF 3.2 (1.20.1), fps 32-33 391-392
144 Fresh Animations mobs + 450 other entities, EMF 3.3 (1.21.1), fps 42-46 490-506

Entity Model Features: its animations now run compiled (EMF before 3.3 left them to the interpreter) and its model parts are drawn from video memory - on the scene above with EMF 3.2, Sleepium 1.0 186 fps, 1.1.0 391.

Entity sleep now works next to mods that change entities (Lithium, Radium, Canary); ModernFix no longer turns off the collision memo. Fixed: a crash at start with TerraBlender (Biomes O' Plenty, Regions Unexplored and many packs) in 1.0.x. Exact: world and frame hashes as before.

Water and glass in one draw (1.0.3)

A view over a river on the client (RTX 4070 SUPER): 1 227-1 383 fps on 1.0.2, 2 635-2 833 on 1.0.3 (Sleepium 1.0.2 with Sodium: 1 718). Water, glass and ice are drawn in one multi-draw in vanilla's order; frames unchanged. On an Intel N100 the client's CPU use dropped from 1.67 to 0.52 cores.

With Create

Client on real Create worlds (RTX 4070 SUPER, 1280×720, Flywheel on, default settings; vanilla = the same mods without Sleepium):

world vanilla Sleepium
Alpha Industries (12 880 Create block entities) 48 fps 176–207 fps
Create Aeronautics: SS.Venator placed 108 fps 283–297 fps
Create Aeronautics: SS.Venator assembled (Sable) 101 fps 254 fps

Experimental, off by default: Create's kinetic parts drawn by Sleepium instead of Flywheel - 2 181 fps against Flywheel's 1 523 on a scene of driven lines and belts.

Against other optimisation mods

Server, Intel N100, each mod alone, speed-up over vanilla (vanilla MSPT / the mod's MSPT):

scene Lithium 0.15.4 Moonrise beta.15 Sleepium
4 000 item stacks ×6.8 ×10.9 ×13.6
1 024 idle hoppers ×3.2 ×1.0 ×3.7
200 cows crammed ×1.3 ×1.5 ×2.1
300 animals + 50 villagers ×1.4 ×1.3 ×1.9
120 villagers ×1.4 ×0.9 ×1.5
minecarts ×3.1 ×4.2 ×3.6
redstone clocks ×1.5 ×1.4 ×1.2

Sleepium leads in six of twelve scenes and is level in one; Moonrise is ahead on carts, pistons and crops, Lithium on fluids and redstone.

Client against Sodium (RTX 4070 SUPER, 1280×720):

scene Sodium Sleepium
terrain, no shaders 1 697–1 827 fps 1 762–1 912 fps
entity scene, no shaders 146 fps 1 500–1 680 fps
538 entities, Complementary + shadows (Iris + Sodium) 68–73 fps 484 fps
terrain view, Complementary (Iris + Sodium) 477–515 fps 452–475 fps

Running Sleepium together with them works since 1.0.3 (tested with 22 optimisation mods and a 13-mod pack); see below.

Against Horizon, a Rust rewrite of Minecraft (0.2.97, on 26.3 - the versions differ), on the same Intel N100: the client draws more frames in every scene (entities 115 vs 87 fps, mobs 136 vs 112, light 156 vs 138: +13-32 %); on the server Sleepium is ahead on items, hoppers, smelters, furnaces and pistons, Horizon on mobs, villagers, cramming, redstone, carts and fluids, partly through shortcuts that are not vanilla-exact. Sleepium keeps the vanilla game and its mods.

What it does

  • Sleeping block entities and entities: idle ticks skipped and woken at the exact tick vanilla would act.
  • Event bus: each listener list compiled into its own class, and events nobody listens to never allocated (50 listeners: 542 → 30–38 ns per post).
  • Exact memos and indexes: collisions, shapes, entity sections, neighbour updates, scheduled ticks.
  • World generation and chunk I/O: parallel generation steps, shared noise, chunk saving and loading off the main thread.
  • Renderer: terrain in a few indirect multi-draws with packed vertices, entities batched and posed on the GPU, a render cache for unchanged objects; frames hash-identical to vanilla.
  • GeckoLib models: parallel bone work and compiled Molang.

Shaderpacks (beta)

Sleepium runs OptiFine / Iris-format shaderpacks itself, inside its own renderer, with no Iris or Sodium needed. Put a pack (.zip or folder) into shaderpacks/ and pick it on the settings screen's Shaders tab; it switches without a restart. Tested with Complementary Reimagined r5.9.3 (shadows, deferred lighting, composites). Packs that need features not implemented yet may render wrong. With Iris, Oculus or OptiFine installed, Sleepium leaves shaders to them.

Settings

Options → Sleepium… (or the mod list's Config button): features switched by group, the shaderpack, and every engine flag one by one with search. Saved to config/sleepium.properties.

Installation and compatibility

  • Minecraft 1.21.1 with NeoForge 21.1.251 or later (Java 21 or newer), or Minecraft 1.20.1 with Forge 47.4.9 or later (Java 17 or newer). The renderer needs OpenGL 4.3 (4.6 for multi-draw).
  • Works on the server, on the client, or both: a server with Sleepium accepts clients without it, and the other way round.
  • Tested with Create 6.0.10, Create Aeronautics (Sable, Veil) and GeckoLib 4.9.3.
  • Tested together with Sodium, Iris (also with shaderpacks), Embeddium, Lithium, Moonrise, C2ME, ModernFix, FerriteCore, ImmediatelyFast, EntityCulling, ScalableLux, Radium, BadOptimizations, Dynamic FPS, Chloride, Noisium, spark, FastSuite, Ksyxis, ServerCore, Clumps and Create, and 13 of them at once. With Lithium or Moonrise installed Sleepium's changes stay exact.
  • On 1.20.1 tested with the optimisation set of Biohazard: Project Genesis (Embeddium, Oculus, ImmediatelyFast, EntityCulling, ModernFix, FerriteCore, Radium, Canary, dynamic lights, Create), each alone and all together, and with the Cursed Fate set (GeckoLib, Photon).
  • Where another mod overwrites or redirects the same method, Sleepium's change to it steps aside and vanilla's code runs with the other mod's change.

Source and license

Source, measurements and the full write-up: https://github.com/ha7gawa/sleepium

LGPL-3.0-only. Modpacks may include it; other mods, open or not, may depend on it.

Project description from CurseForge.

Pick your setup

Sleepium by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

5 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Sleepium versions and loaders

2 of 50 releases match
Clear filters

Looking for an older file? The official CurseForge project page is in Resources.