Don't Starve Together

Don't Starve Together

Megarandom world generation
 This topic has been pinned, so it's probably important
Swaggy  [developer] 14 Feb, 2019 @ 3:17pm
Out of memory issues
EDIT: Now that Klei has updated the game to 64-bit, what's described below should no longer be an issue. I keep it only for legacy.

Megarandom generates bigger maps, and this makes the game use more memory. This can become a problem if you have many mods enabled, and especially the Tropical Experience mod.

If the game runs out of memory you will get strange errors such as a window saying "Out of memory", the game crashing without apparent error during worldgen or your whole computer becoming unresponsive (thanks Windows 10...).

On your local machine you can monitor RAM usage in the task manager:

https://steamproxy.net/profiles/76561198017496587/screenshot/938341811900412210

The game will crash at about 3200 MB used (3.2 GB) and become unstable at 2900. It is highly recommended to keep it to 2700 maximum if you want to avoid issues.

Here are some example guidelines to reduce memory usage:

● Reduce number of biomes and size of world (eg. Disable ruins and caves in megarandom, put number of biomes to "Less"; put map size to "medium")

● Disable some other mods that use a lot memory (mainly mods that add new biomes, creatures and sprites etc.). Examples of such mods are Windy Plains, Cherry biome, Legion etc.

● Tropical Experience specifically uses about 800 MB alone, which is A LOT. f you play with this mod you'll have to make some sacrifices. An important setting is to disable the Lavaarena biome, which is quite small and uses 200 MB alone.

● Enable "Low resolution textures" in game settings: This one is a last chance resort, it will halve memory usage and basically make anything playable, but textures will look very blurry.

I have a dedicated server with 70+ mods working with 2700 MB used including Tropical Experience, so if you make tweaks you can probably manage to make every mod you want work. Remember that stability is much more important to have fun than having tons of mods and make sure that it is the case for your server first.
Last edited by Swaggy; 12 Oct, 2021 @ 4:12pm
< >
Showing 1-1 of 1 comments
Swaggy  [developer] 21 Nov, 2019 @ 12:08pm 


What consumes memory:

Mods that consume memory are mainly the ones that add textures (every content mod basically, such as Multi Worlds or Tropical Experience) or increase the map size (only MR and giant size mod do this, to my knowledge).
Some mods are much larger than others, and umber of mods is just an indication: if you play with Giant size + Megarandom + TE then it will probably already crash even though it's just 3 mods.

Monitor memory consumption:

In task manager you need to expand the "Don't starve together" task to get each individual process consumption.
Example here[cdn.forums.klei.com].
In this example total memory usage is 1993 MB, but what matters is the client process consumption (the one with the largest usually), so 1471 MB in my case.
The game will crash when the client process uses about 3300 MB, but it will already be somewhat unstable above 2500.
One of the instabilities is a crash when going to caves. It is very annoying, however I think you can try to rejoin the game and it should work (and you'll be in caves). It will keep crashing every time you switch world, you'll have to rejoin.

Staying below 2500 is hard, when I had 80 mods I remember I was at 2800 and I had the caves issue. But it was playable.

How to reduce memory usage:

There are some ways to reduce memory usage, however they all have big compromises:

- Hosting a game with caves, or connecting to a dedicated server, consumes ~300 MB less memory than hosting a game with only forest. (Because in the forest case the game merges server + client in only one process, and the limit is reached faster).
Drawback: need to host server which creates lag even in single player, and does not save that much.

- "Small textures" option in game reduce memory use by about ~1000 MB.
Drawback: Graphics become very blurry.

- On Linux with proper graphics drivers installed, the game uses about 2x less memory than Windows. Basically you can not OOM on Linux and play with as many mods you like there.
Drawback: have to play on Linux

- Last chance of playing with your favorite mods would be that Klei devs update the game to 64 bit[forums.kleientertainment.com] to remove the memory limit , but they have not planned to do it yet, even though there have been a lot of threads about it in the last months. So please bump the threads you see about 64-bit if you want them to notice.
Last edited by Swaggy; 21 Nov, 2019 @ 12:41pm
< >
Showing 1-1 of 1 comments
Per page: 1530 50