Mods / Tungsten

Tags: #Other
Author: Zaldaryon
Side: Server
Created: Nov 9th at 12:00 AM
Last modified: 3 days ago
Downloads: 634
Follow Unfollow 80

Recommended download (for Vintage Story 1.21.5):
Tungsten-1.0.2.zip  1-click install


Server-side only performance optimization mod for Vintage Story. The base game is already very much optimized, this is my attempt to speed up what's possible.

 

This can also benefit players in a singleplayer world, although much more limited.

 

⚠️ Testing Phase: This mod is currently in testing phase. Real performance gains may vary depending on your server configuration and game setup.

 

This is serverside only - if you want to improve your performance clientside, try OptiTime.

What it does

 
  • Less lag - 30-40% reduction in garbage collection pauses
  • Better performance - Especially with more players online
  • Lower memory usage - Saves ~15 MB per minute
  • No gameplay changes - Same game, just smoother

Performance gains

 
  • 5 players: 20-30% improvement
  • 10 players: 30-40% improvement
  • 20+ players: 40-50%+ improvement

The more active your server, the better it works.

What gets optimized

 

19 optimizations targeting the most common performance bottlenecks:

  • Entity spawning/despawning
  • Block breaking and placing
  • Chunk loading/unloading
  • Physics updates
  • Inventory operations
  • Crafting and cooking
  • Water physics
  • Network packets

Commands

 
  • /tungsten - Show status
  • /tungsten stats - Show performance statistics
  • /tungsten stats on/off - Enable/disable detailed monitoring with CSV export (off by default)
  • /tungsten all on/off - Enable/disable all optimizations (except the monitoring tool)
  • /tungsten <name> on/off - Toggle individual optimization:
    • blocklistreuse - Block Operations
    • chunkloadingoptimization - Chunk Loading
    • chunkunloadingoptimization - Chunk Unloading
    • containeroptimization - Inventory
    • cookingcontaineroptimization - Cooking
    • depositgeneratoroptimization - Prospecting
    • entitylistreuse - Entity Spawning
    • entitysimulationoptimization - Entity Ticking
    • eventmanagerlistreuse - Event System
    • fixwaterfalls - Water Physics
    • getdropslistreuse - Block Breaking
    • gridrecipeoptimization - Crafting
    • physicsmanagerlistoptimization - Physics Tick
    • physicsmanagermethodlistoptimization - Physics Tick
    • physicsmanagertoarrayoptimization - Physics Tick
    • physicspacketlistreuse - Physics Updates
    • sendchunkslistreuse - Chunk Sending
    • sendplayerentitydeathsoptimization - Player Deaths
    • servermainlinqoptimization - Player Queries

 

Changes require server restart.

Compatibility

 
  • Safe with:

    • Content mods (blocks, items, recipes)
    • Gameplay mods
    • World generation mods
    • All client-side mods

Troubleshooting

 

Server won't start?

  • Check server logs for errors
  • Try /tungsten all off to disable optimizations, then enable one by one to check which one causes it
  • Report the issue with logs
 

Performance worse?

  • Unlikely, but you can disable specific optimizations
  • Use /tungsten stats to monitor. You can turn it on/off to save measurements into a file with one, some, all or no optimizations enabled to have real numbers. You can send me these so I can investigate as well, the data is anonymized in the logs!
 

Mod conflicts?

  • Disable conflicting optimizations if needed

License

 

Copyright (c) 2025 Zaldaryon - All Rights Reserved

 

The source code is available to be bought by Anego Studios.

 

 

Tungsten - Making Vintage Story servers run faster, one algorithm at a time. Performance matters.

Mod Version For Game version Downloads Released Changelog Download 1-click mod install*
1.0.2 264 3 days ago Tungsten-1.0.2.zip 1-click install

Fixed ObjectDisposedException crash in ChunkUnloadingOptimizer when chunk thread accessed disposed ThreadLocal instances during server shutdown.

1.0.1 149 3 days ago Tungsten-1.0.1.zip 1-click install
  • Fixed ObjectDisposedException during server shutdown
  • Fixed optimization count display (19/19)
  • Added disposal tracking to ThreadLocalHelper
  • Improved shutdown safety for background threads
1.0.0 216 5 days ago Tungsten-1.0.0.zip 1-click install

Initial release


14 Comments (oldest first | newest first)

💬 Yoldovahkriid, 1 day ago

This might be coincidence but since install of this mod on my server the server has indefinitly not responded 2 or 3 times in the last 24hrs which it never did before. More weirdly there hasn't been an error or warning in the console just nothing no new entries etc..
Perhaps someone knows whats going on?

 

💬 Loginvvvvv, 3 days ago

I hope this helps with stutters I've been having

💬 Zaldaryon , 3 days ago

Eurielle if that mod changes some vanilla behavior, yes, it might cause a crash. You can disable the only setting it affects, though. This mod here was made considering the vanilla mechanics per se.

 

Dagurmawth if you provide me the crash log against Rustbound Magic, I can try to fix it on Tungsten's end.

💬 Eurielle, 3 days ago

According to a post on the Rustbound Magic mod it seems this mod and that one don't like each other. It appears to be related to Rustbound Magic's self-buffs but IDK exactly what the issue is as I haven't tested it myself. Just thought I'd give you the headsup on the present incompatibility though!

💬 Zaldaryon , 3 days ago

EthelVril handbook is clientside only. For that you can use the OptiTime mod that I made.

💬 EthelVril, 3 days ago

From my experience, the laggiest part of a modded playthrough is the handbook x.x

💬 Zaldaryon , 3 days ago

BraniyaKz and prototype464 try version 1.0.1 and tell me if it's fixed pls, it should.

💬 Zaldaryon , 3 days ago

WatermelonFrogy yes, I'm @zaldaryon on VS official discord.

💬 WatermelonFrogy, 3 days ago

This is awesome! We might test this out on Age of Seraphs once we update to 1.21! We currently average 50-60 on weekdays and 60-80 on weekends, 100+ during major events. Do you have a discord we could contact you directly on if we come across any problems?

💬 BraniyaKz, 4 days ago

Testing this on my singleplayer, and this exception keeps showing up in the server log:

Error Report
26.11.2025 19:43:39 [Error] [tungsten] An exception was thrown when trying to start the mod:
26.11.2025 19:43:39 [Error] [tungsten] Exception: Entry point was not found.
at Vintagestory.API.Common.ICoreAPI.get_Logger()
at Tungsten.TungstenMod.StartServerSide_Patch0(TungstenMod this, ICoreServerAPI api)
at Vintagestory.Common.ModLoader.TryRunModPhase(Mod mod, ModSystem system, ICoreAPI api, ModRunPhase phase) in VintagestoryLib\Common\API\ModLoader.cs:line 679
26.11.2025 19:43:39 [Error] Failed to start system Tungsten.TungstenMod
💬 prototype464, 4 days ago (modified 4 days ago)

Loaded into a world by mistake, left, then went to load into another world and it sh*t itself upon trying to load, lemme know if you need more logs

Edit: Update, we found out Immersive Lanterns was throwing an OutOfMemory error because there were a lot of lanterns, I'm unsure if that caused this issue here.

Crash Report
26.11.2025 19:54:02 [Error] Exception: Cannot access a disposed object.
Object name: 'System.Threading.ThreadLocal`1[[System.Collections.Generic.List`1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'.
at System.Threading.ThreadLocal`1.GetValueSlow()
at Tungsten.SendPlayerEntityDeathsOptimizer.GetReusableList(IEnumerable`1 source)
at Vintagestory.Server.ServerSystemEntitySimulation.SendPlayerEntityDeaths_Patch0(ServerSystemEntitySimulation this)
at Vintagestory.Server.ServerMain.Process() in VintagestoryLib\Server\ServerMain.cs:line 854
26.11.2025 19:54:02 [Notification] All clients disconnected, pausing game calendar.
26.11.2025 19:54:02 [Error] Exception: Cannot access a disposed object.
Object name: 'System.Threading.ThreadLocal`1[[System.Collections.Generic.List`1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'.
at System.Threading.ThreadLocal`1.GetValueSlow()
at Tungsten.SendPlayerEntityDeathsOptimizer.GetReusableList(IEnumerable`1 source)
at Vintagestory.Server.ServerSystemEntitySimulation.SendPlayerEntityDeaths_Patch0(ServerSystemEntitySimulation this)
at Vintagestory.Server.ServerMain.Process() in VintagestoryLib\Server\ServerMain.cs:line 854
26.11.2025 19:54:02 [Fatal] Caught unhandled exception in thread 'chunkdbthread'. Shutting down server.
26.11.2025 19:54:02 [Error] Exception: Cannot access a disposed object.
Object name: 'System.Threading.ThreadLocal`1[[System.Collections.Generic.List`1[[System.Int64, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'.
at System.Threading.ThreadLocal`1.GetValueSlow()
at Tungsten.ThreadLocalHelper.GetAndClear[T](ThreadLocal`1 threadLocal)
at Vintagestory.Server.ServerSystemSupplyChunks.moveRequestsToGeneratingQueue_Patch0(ServerSystemSupplyChunks this)
at Vintagestory.Server.ServerSystemSupplyChunks.OnSeparateThreadTick() in VintagestoryLib\Server\Systems\World\LoadThread\SupplyChunks.cs:line 454
at Vintagestory.Server.ServerThread.Update() in VintagestoryLib\Server\ServerThread.cs:line 125
at Vintagestory.Server.ServerThread.Process() in VintagestoryLib\Server\ServerThread.cs:line 55
26.11.2025 19:54:02 [Error] Exception: Cannot access a disposed object.
Object name: 'System.Threading.ThreadLocal`1[[System.Collections.Generic.List`1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'.
at System.Threading.ThreadLocal`1.GetValueSlow()
at Tungsten.SendPlayerEntityDeathsOptimizer.GetReusableList(IEnumerable`1 source)
at Vintagestory.Server.ServerSystemEntitySimulation.SendPlayerEntityDeaths_Patch0(ServerSystemEntitySimulation this)
at Vintagestory.Server.ServerMain.Process() in VintagestoryLib\Server\ServerMain.cs:line 854
💬 Zaldaryon , 4 days ago

Anthonyg1479, they're completely different mods, and you can use them together, yes, but the benefits of this mod is mainly for multiplayer servers (as in, for the server itself). 

💬 Anthonyg1479, 4 days ago

Can i use this and your other mod OptiTime at the same time or is this just server side version of that mod?

💬 Ciber, 5 days ago

Trying now! I'm eager to see if this can squish my constant GC pauses in SP (which occure even though I have 32gig ram)

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом