Skip Navigation

Performance Analysis of SSN vs RS vs AE2 for basic inventory management

I compared three of the main storage mods in the game to determine exactly how laggy each one is (or more accurately, to quantify just how laggy a certain one is).

  • Simple Storage Network (SSN)
  • Refined Storage (RS)
  • Applied Energistics 2 (AE2)

Test Settings:

System:

  • GPU: RTX 3070
  • CPU: Ryzen 7 5800X
  • RAM: 32GB DDR4 3600MT CL16 (8GB allocated to Minecraft)

Environment:

  • Normal world (Superflat won't work. ?Due to Terralith)
  • Daylight Cycle, Weather, Mob Spawning all disabled
  • 3440x1440p with Complementary Reimagined (I forgot to turn shaders off before I started; doesn't matter since all tests were done with it, any impact will be constant)
  • Frametime/FPS data recorded using NV FrameView

Items:

Since we're testing inventory storage, I created chests with the following items and cloned them into each of the testing scenarios for consistency:

  • 54 Perfect Jewels: Level 100, Size 10, 4 affixes each (randomised initially to prevent stacking)
  • 54 Vault Gear (9 each of Sword, Helmet, Chestplate, Leggings, Boots, Magnet) in varying rarity
  • 54 Prismatic Tools: Level 100 with 20 total affixes each (the result of crafting all the jewels from above into them).

Each of the above were stored in their own double chest, and connected to the tested storage systems via their relevant external storage modules. I did not use the disk drives from RS or AE2, in order to maintain parity with SSN and regular chests.

In my comparisons here I've just used the average FPS because the 1% lows were proportional across the board. A table is at the end which includes the 1% lows as well if you want to see them.

For each mod, I tested the following scenarios:

  • UI showing Vault Gear
  • UI not showing Vault Gear
  • UI with no Vault Gear connected to the system
  • UI searching while Vault Gear is showing
  • UI searching while Vault Gear is not showing
  • UI and JEI open at the same time while Vault Gear is not showing

Test Results:

Baseline FPS: 117

Idle Performance Penalty

Measured in microseconds/tick or uS/t (from the Observable mod).

Note that each in game tick takes 20 milliseconds, so there is a total game budget of 20,000 microseconds per tick.

  • SSN: 21uS/t per controller + ~0.5uS/t per cable
  • RS: ~0uS/t
  • AE2: ~0uS/t
  • Regular Chest: ~0uS/t

20uS/t isn't that much (for reference, an active Mana Spreader from Botania will take about 70uS/t) but this is while it's just sitting there with no interactions occurring. 4 Powah solar panels have roughly the same penalty while actively generating and outputting power into a connected cable.

For RS and AE2, I even tested them while their controllers were actively losing/gaining power, and they still didn't have enough usage to register.

Basic Browsing Inventory

The following show the average FPS when you simply open the relevant interface and stare at the items within (% in bracket is the penalty from baseline FPS of 117; lower is better)

Inventory System Vault Gear Visible Vault Gear Hidden Vault Gear Excluded
Chests 73 FPS (37%) 113 FPS (3%) 113 FPS (3%)
SSN 50 FPS (57%) 64 FPS (45%) 80 FPS (32%)
RS 68 FPS (42%) 99 FPS (15%) 98 FPS (16%)
AE2 63 FPS (46%) 95 FPS (19%) 97 FPS (17%)

From this we see two important things:

  1. Vault Gear has a heavy burden on any storage system, even Vanilla chests.
  2. SSN is particularly susceptible to performance hits when Vault Gear is present in its system; RS and AE2 only suffer when Vault Gear is actively on the screen (and both are fine when you scroll away from any gear, probably by only loading visible items into memory), SSN is always aware of all inventory items and doesn't do any virtualization of its scrollable view, hence a performance penalty from Vault Gear is always present, but is made worse when you scroll any vault gear into view

Note that RS's Large view shows the same number of rows as SSN (8 rows), while AE2 only shows 6. Both RS and AE2 have a proportional penalty hit as you increase the number of visible rows, so AE2's results in the above table are slightly better than they should be.

Filtered Searching

The big one; attempting to do a subsearch (Using the "#" operator) in each inventory. AE2 doesn't discriminate between standard search and filtered searching, so I just typed the word "level" into it so that it captured all items in its search result anyway.

Inventory System Vault Gear Visible Vault Gear Hidden
SSN 22 FPS (81%) 26 FPS (78%)
RS 65FPS (44%) 97FPS (17%)
AE2 62 FPS (47%) 94FPS (20%)

Here we see SSN come to a grinding halt when trying to do any advanced searching; RS and AE2 see basically no constant penalty for searching. There is, of course, processing required to search, but this is lost in the normal fluctuations seen by Minecraft and nowhere near as obvious as SSN's.

JEI Impact

This one was interesting to see, but it shows just how much JEI causes a performance hit when run on top of any storage inventory:

Inventory System JEI Visible JEI Hidden
Player Inventory 114 FPS 117 FPS
Chests 93 FPS 113 FPS
SSN 58 FPS 64 FPS
RS 79 FPS 99 FPS
AE2 81 FPS 95 FPS

JEI has a much bigger influence on lag than I expected; if you just open it while you're in your inventory it doesn't matter, but opening it while in a chest or any of the above storage mods (even without actually searching anything) causes a performance hit of around 10-20%.

Outcome

We already knew SSN was pretty heavy lifting, but I hadn't seen any quantified data on just how much of a hit it has. From this testing, the simple existence of an SSN controller in the world causes a penalty on the game's total tick time budget. Notably, each cable in SSN contributes to the performance penalty as well, and the total length worsens the controller's performance. A cable chain connecting to a chest 70 blocks away brings the total controller cost from 21uS/t to 127uS/t, and the cables sum up to 33uS/t by themselves, for a total idle cost of 150uS/t. The worst part is, you don't even need to connect the cables to anything for a hit to occur. My guess is that each cable is scanning every tick for a connected inventory, and the controller is doing the same thing multiplied along the entire cable array. Creating the same setup in AE2 and RS yields no performance penalty.

In addition, if I open the in game profiler, the game's memory allocation and garbage collection seems to be going nuts while the SSN inventory is open, and then even more so when trying to search. My guess is (having very little knowledge of the JVM, mind) that however SSN is parsing the inventory leads to a large memory leak, causing 2GB of allocated RAM to fill in about 1.3 seconds, which triggers the GC. Over and over. As a baseline, staring into the void takes just over 10 seconds to fill and trigger the GC. Looking at a chest, RS or AE2 all take around 4.3 seconds. Searching in RS or AE2 makes no discernible difference. I'm guessing RS and AE2 virtualize the inventory view (so only visible items are actually rendered) while SSN doesn't (every item whether visible or not, is fully rendered and waiting to be shown when you scroll). If someone with more knowledge can let me know how off the mark I am with this guess, that would be great :)

0
0 comments