Reducing server RAM usage

Joined
Aug 11, 2022
Messages
129
Reaction score
438
In this guide we’ll go over several ways of reducing the RAM footprint of the TERA server without sacrificing any (or as little as possible) functionality.

Using these tweaks, I’ve managed to reduce the ram usage of a v100 server VM down to 32 GB:
3 - Reducing server RAM usage - RaGEZONE Forums


1. Channel count tweak
TERA maps are made out of multiple channels, each containing a copy of all npcs and objects. The more channels the server has to load, the more memory it will use, so it makes sense to reduce the channel count of each map to just one. For that, go to Datasheet\ContinentData.xml. There, we change initChannelCount and initChannelCountByQA to 1 for each continent.

2. Using single World Server
The default TERA server setup uses multiple world servers – two for dungeons, one for battlegrounds, one for the open world etc. This makes sense for a production environment, but introduces a lot of redundancy and thus balloons the memory usage. To change that, we go to ServerConfig.xml and scroll to the bottom to <WorldServerList>:

1724613517827 - Reducing server RAM usage - RaGEZONE Forums


And change it to just that:

1724613523051 - Reducing server RAM usage - RaGEZONE Forums


Now, simply starting the WorldServer is enough to play the open world and dungeon content. Not sure about battlegrounds as I don’t know of a way to test them.

3. Other ServerConfig.xml tweaks
Treat these as experimental - I'm not 100% sure what all of these settings do, but applying them provides a massive RAM decrease, and so far I haven't found any impact on stability or functionality.

3.1. "threadNum" for word server.
Set threadNum="2" or threadNum="4" for world server (right under <WorldServerConfig>, inside the <Capacity> section).

Total memory usage on 71.04 server:
threadNum="0" - 25,8 GB
threadNum="2" - 22,7 GB
threadNum="4" - 23,2 GB
Server start times are identical

3.2. Session tweak
Under <ArbiterServerConfig>, inside <Capacity> section, set worldSessions="2" for 71.03 and lower versions, worldSessions="4" for 100.02 server, else the world server would close.
Under <WorldServerConfig>, inside <Capacity> section, set arbiterClient="1" bfArbiterClient="1" and dungeonArbiterClient="1".
If the server doesn't launch for you, try raising the values slightly.

Total memory usage on 71.04 server:
arbiterClient="16" & bfArbiterClient="2" & dungeonArbiterClient="4" & worldSessions="64" - 28,1 GB
arbiterClient="1" & bfArbiterClient="1" & dungeonArbiterClient="1" & worldSessions="2" - 23,2 GB

3.3 Client session tweak
Look for a clientSessions under <ArbiterServerConfig> and change it to the amount of players you expect on your server. It might sound dumb, but this thing has a substantial impact on the memory usage – changing it from 10000 to 2 saved me around 6 gigabytes of RAM.

4. Limit MSSQL memory
By default, MSSQL uses all free memory, so you can end up with sqlservr.exe eatin up 10 gigs of RAM. To change that, open SQL Server Management studio, right click on your server in object explorer -> properties. In memory tab, change "Maximum server memory (in MB)" to whatever you like (2048 seem to work perfectly fine)
1 - Reducing server RAM usage - RaGEZONE Forums


5. Using only what you need
There are quite a few of services that are not necessarily needed for the server to work. In my setup, I only need to launch the following:
  • TopographyServer
  • Mysql with api
  • ArbiterServer, hub, hub_gw and arb_gw_tw2_log
  • WorldServer
Since I’m playing solo only, there is no need for a party matching server, web shop, proxy or item claim, WebApp is turned off unless needed, and stuff like log or nexus servers seem redundant as arbiter/world/topo already produce logs on their own and nexus event starts and functions without nexus server.

Feel free to correct me if I've got something wrong.
 

Attachments

  • 1724613509854 - Reducing server RAM usage - RaGEZONE Forums
    1724613509854.webp
    6.1 KB · Views: 596
Last edited:
do you have a auto learn skills after character creation? if you have can you share it? thanks

im using vm version of 100 but after running the world server it shows red text no npc found etc and close the world server i put 24gb on my vm and swap is auto 5gb?

also does v100 is smooth or just the same as v92? im using v92 and it drops the fps 150 to 50-40 i have a 3050gpu laptop 32gb 4800h cpu
 
Last edited:
The more channels the server has to load, the more memory it will use, so it makes sense to reduce the channel count of each map to one. For that, go to Datasheet\ContinentData.xml. There, we change initChannelCount and initChannelCountByQA to 1 for each continent.

You don`t say anything about how it must be changed. I have this in continentData.xml. And it is comment out.

What must I change then?

disableChannelListBtn 1,
or disableChannelListBtn = 1,
or disableChannelListBtn: 1



<!--

channelType
- none 일반 대륙
- chobozone 초보사냥터
- dungeon 퀘스트인던
- battleField 전장
- sharespace 서버공용공간
- field fieldEvent/fieldData 사용을 위해 설정해 주어야 하는 신규 채널 속성, 기본은 none/channelingZone과 동일

각 Continet 정의 시에 채널 대륙이 포함된 실제 대륙 번호를 정의 하기 위해
inChannelingContinent="7001, 7002" 형식으로 연결된 채널 대륙 번호를 적어줘야 함.
이때 대륙번호를 콤마로 구분해서 관련 채널링 대륙은 모두 지정해야함.


disableChannelListBtn : true 인 경우 레이더 맵의 채널 리스트가 나오지 않음(채널 표시는 됨)

channelUIStatus :
채널 리스트의 UI 속성에 관한 정보. 컴마(,)로 분리해서 적을 수 있다.
각각 순서에 맞게 채널에 적용된다.
채널수보다 적으면 마지막 속성이 그 이후 채널에 적용된다.
ex) channelUIStatus="invisible,disable" -> 1번 채널: invisible, 2번 이후 채널: disable
속성
- enable: 채널도 보이고, 목록도 보이고, 이동도 된다.
- disable: 채널은 보이지만, 목록이 보이지 않는다.
- invisible: 채널이 보이지 않는다. (channelingZone 이라고 안느껴진다.)

initChannelCount : 서버 시작 시 기본으로 생성되는 채널 개수(운영툴에서도 조정 가능하며, 운영툴 우선순위가 더 높음)

initChannelCountByQA : TeraBox에서 적용되는 initChannelCount (개발서버 메모리 절약 용도)

channelMax : 최대로 늘어날 수 있는 채널 개수

userMaxPerChannel : 한 채널당 입장 가능 유저 수 (유저수를 제한하는 것은 아니며, 해당 유저수에 도달하면 다음 채널이 생김)
각 채널 별로 지정 가능하며, 채널수보다 적게 정의하면 마지막에 정의한 값이 그 이후의 채널들에 적용된다.

restrictChannel : true인 경우 userMaxPerChannel 만큼 채널에 유저가 차있을 때 더이상 해당 꽉 찬 채널에 유저가 입장하지 못하도록 설정

-->

channelType

  • none: General continent
  • chobozone: Beginner hunting area
  • dungeon: Quest dungeon
  • battleField: Battlefield
  • sharespace: Shared server space
  • field: A new channel attribute that must be set for fieldEvent/fieldData use; the default is none/similar to channelingZone.
When defining each continent, the actual continent numbers containing the channel continent must be defined using inChannelingContinent="7001, 7002" format. The related channeling continents must be specified by separating the continent numbers with commas.

disableChannelListBtn: If set to true, the radar map's channel list will not be displayed (channels will still be shown).

channelUIStatus:Information about the UI properties of the channel list. It can be specified by separating with commas. Each property is applied in order to the channels. If there are fewer properties than the number of channels, the last property will apply to all subsequent channels.Example: channelUIStatus="invisible,disable" -> Channel 1: invisible, Channel 2 and onwards: disable.Attributes:

  • enable: Channels are visible, the list is shown, and movement is allowed.
  • disable: Channels are visible, but the list is not shown.
  • invisible: Channels are not visible. (It doesn’t feel like a channelingZone.)
initChannelCount: The default number of channels created when the server starts (can also be adjusted through the admin tool, with the admin tool having higher priority).

initChannelCountByQA: The initChannelCount applied in TeraBox (used for saving memory on the development server).

channelMax: The maximum number of channels that can be created.

userMaxPerChannel: The maximum number of users that can enter each channel (doesn't limit the total number of users; if this number is reached, a new channel is created). It can be specified for each channel, and if fewer values are defined than channels, the last value applies to the remaining channels.

restrictChannel: If set to true, when a channel is full according to userMaxPerChannel, no additional users can enter that channel.
 
Wouldn't it be possible if it was driven by more than 16gb?
It could be driven without an ssd..
 
Two weeks ago I have increased my RAM from 64GB to 128GB.
My VM is running with 64GB RAM, now.
The server is using ~62 GB RAM with all is running.
Server doesn't need any swap now.
 
And change it to just that:

Angry Catster - Reducing server RAM usage - RaGEZONE Forums

==============================================
i have changed this,,and then cannot run PARTMATCHING server as well as cannot match all dungeons...
Partymatching is only useful for production servers with a lot of people.
And if you're running a production server with a lot of people, combining all world servers into one is a bad idea anyways.
Most optimizations here are only applicable for solo play/small group deployments
 
Back