Skip to content

Commit

Permalink
WIP: Update for native IO changes
Browse files Browse the repository at this point in the history
These are WIP changes for VMaNGOS' native IO implementation.
  • Loading branch information
mserajnik committed Oct 19, 2024
1 parent ac1756a commit af0f80a
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 64 deletions.
28 changes: 0 additions & 28 deletions compose.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,6 @@ services:
# If you are on Windows or macOS, you can ignore this.
user: 1000:1000
command: realmd
# One of VMaNGOS' dependencies reserves memory based on the maximum number
# of file descriptors per process. Under certain circumstances, Docker sets
# a very large number by default, which can easily lead to extreme amounts
# of memory used.
# `nofile` is used to override the Docker default to prevent this issue
# from happening. The chosen value (1024) is a common setting and should be
# sufficient for most use cases. However, since this also directly limits
# the maximum amount of concurrent players (to a number slightly lower than
# the chosen value), you might want to choose a higher value according to
# the amount of players you expect. Even setting a value like 65536 (64
# times the default) should not be an issue, so in practice this should not
# be a limiting factor.
ulimits:
nofile: 1024
depends_on:
- database
restart: unless-stopped
Expand Down Expand Up @@ -107,20 +93,6 @@ services:
# If you are on Windows or macOS, you can ignore this.
user: 1000:1000
command: mangosd
# One of VMaNGOS' dependencies reserves memory based on the maximum number
# of file descriptors per process. Under certain circumstances, Docker sets
# a very large number by default, which can easily lead to extreme amounts
# of memory used.
# `nofile` is used to override the Docker default to prevent this issue
# from happening. The chosen value (1024) is a common setting and should be
# sufficient for most use cases. However, since this also directly limits
# the maximum amount of concurrent players (to a number slightly lower than
# the chosen value), you might want to choose a higher value according to
# the amount of players you expect. Even setting a value like 65536 (64
# times the default) should not be an issue, so in practice this should not
# be a limiting factor.
ulimits:
nofile: 1024
tty: true
stdin_open: true
depends_on:
Expand Down
61 changes: 34 additions & 27 deletions config/mangosd.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#####################################

[MangosdConf]
ConfVersion=2010100901
ConfVersion=2024091701

###################################################################################################################
# CONNECTIONS AND DIRECTORIES
Expand Down Expand Up @@ -604,7 +604,13 @@ DebuffLimit = 0
#
# LogFile.Trades
# Log file of trade related messages
# Default: "" (Disable)
# Default: "Trades.log"
# "" - Empty name for disable
#
# LogFile.Network
# Log file of network related messages
# Default: "Network.log"
# "" - Empty name for disable
#
# CharLogDump
# Write character dump before deleting in Char.log
Expand Down Expand Up @@ -697,6 +703,7 @@ LogFile.Performance = "Perf.log"
LogFile.Gm = ""
LogFile.GmCriticalCommands = "gm_critical.log"
LogFile.Trades = "Trades.log"
LogFile.Network = "Network.log"

LogMoneyTreshold = 10000
CharLogDump = 0
Expand Down Expand Up @@ -1093,7 +1100,8 @@ PerformanceLog.SlowPacketBroadcast = 0
# WaitAtStartupError
# After startup error report wait for <Enter> or some time before continuing (and possibly close console window)
# -1 (wait until <Enter> press)
# Default: 0 (not wait)
# 0 (no wait)
# Default: 5 (wait 5 sec)
# N (>0, wait N secs)
#
# Motd
Expand Down Expand Up @@ -1167,7 +1175,7 @@ Spell.EffectDelay = 400
Spell.ProcDelay = 800
BeepAtStart = 1
ShowProgressBars = 0
WaitAtStartupError = 0
WaitAtStartupError = 5 # consider fixing your actual problem before changing this value!
Motd = "Welcome to World of Warcraft!"

###################################################################################################################
Expand Down Expand Up @@ -2773,14 +2781,10 @@ LFG.MatchmakingTimer = 600
# Number of threads for network, recommend 1 thread per 1000 connections.
# Default: 1
#
# Network.OutKBuff
# Network.SystemSendBuffer
# The size of the output kernel buffer used ( SO_SNDBUF socket option, tcp manual ).
# Default: -1 (Use system default setting)
#
# Network.OutUBuff
# Userspace buffer for output. This is amount of memory reserved per each connection.
# Default: 65536
#
# Network.TcpNoDelay:
# TCP Nagle algorithm setting
# Default: 0 (enable Nagle algorithm, less traffic, more latency)
Expand All @@ -2799,21 +2803,30 @@ LFG.MatchmakingTimer = 600
# How often packet broadcasting threads run in milliseconds.
# Default: 50
#
# Network.Interval
# How often ACE will transmit the client's outbound packet buffer in milliseconds.
# Default: 10
# Network.PacketBroadcast.ReduceVisDistance.DiffAbove
# Description: TODO
# Default: 0
#
# Network.TrustedProxyServers
# Description: Enables the parsing of Proxy Protocol v2 for specific IPs.
# You can use this feature when your server is behind a proxy, load balancer, or similar component,
# to retrieve the real IP address of players.
# You need to enable Proxy Protocol v2 on both this server and the proxy/load balancer.
# For example see HaProxy "send-proxy-v2" option.
# Multiple servers can be separated with ','
# Default: "" - (Disabled, no proxy)
# Example "10.13.37.1,10.13.37.2" - (to allow multiple proxy servers)
#
###################################################################################################################

Network.Threads = 1
Network.OutKBuff = -1
Network.OutUBuff = 65536
Network.SystemSendBuffer = -1
Network.TcpNodelay = 1
Network.KickOnBadPacket = 0
Network.PacketBroadcast.Threads = 0
Network.PacketBroadcast.Frequency = 50
Network.PacketBroadcast.ReduceVisDistance.DiffAbove = 0
Network.Interval = 10
Network.TrustedProxyServers = ""

###################################################################################################################
# CONSOLE, REMOTE ACCESS AND SOAP
Expand All @@ -2835,17 +2848,12 @@ Network.Interval = 10
# Default remote console port
# Default: 3443
#
# Ra.MinLevel
# Minimum level that's required to login,3 by default
# Ra.MinAccountLevel
# Minimum account level that's required to login, 3 by default
# Default: 3 (Administrator)
#
# Ra.Secure
# Kick client on wrong pass
# 0 - off
# Default: 1 - on
#
# Ra.Stricted
# Not allow execute console level only commands remotly by RA
# Ra.Restricted
# Not allow execute console level only commands remotely by RA
# 0 - off
# Default: 1 - on
#
Expand All @@ -2869,9 +2877,8 @@ Console.Enable = 1
Ra.Enable = 0
Ra.IP = 0.0.0.0
Ra.Port = 3443
Ra.MinLevel = 3
Ra.Secure = 1
Ra.Stricted = 1
Ra.MinAccountLevel = 3
Ra.Restricted = 1

SOAP.Enabled = 0
SOAP.IP = 0.0.0.0
Expand Down
33 changes: 26 additions & 7 deletions config/realmd.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
############################################

[RealmdConf]
ConfVersion=2020010501
ConfVersion=2024091701

###################################################################################################################
# REALMD SETTINGS
Expand Down Expand Up @@ -39,15 +39,30 @@ ConfVersion=2020010501
# on different IP addresses using default ports.
# DO NOT CHANGE THIS UNLESS YOU _REALLY_ KNOW WHAT YOU'RE DOING
#
# TrustedProxyServers
# Description: Enables the parsing of Proxy Protocol v2 for specific IPs.
# You can use this feature when your server is behind a proxy, load balancer, or similar component,
# to retrieve the real IP address of players.
# You need to enable Proxy Protocol v2 on both this server and the proxy/load balancer.
# For example see HaProxy "send-proxy-v2" option.
# Multiple servers can be separated with ','
# Default: "" - (Disabled, no proxy)
# Example "10.13.37.1,10.13.37.2" - (to allow multiple proxy servers)
#
# PidFile
# Realmd daemon PID file
# Default: "" - do not create PID file
# "./realmd.pid" - create PID file (recommended name)
#
# LogLevel
# LogLevel.Console
# Server console level of logging
# 0 = Minimum; 1 = Error; 2 = Detail; 3 = Full/Debug
# Default: 0
# 0 = Error; 1 = Minimum; 2 = Basic; 3 = Detail; 4 = Full/Debug
# Default: 2
#
# LogLevel.File
# Server file level of logging
# 0 = Error; 1 = Minimum; 2 = Basic; 3 = Detail; 4 = Full/Debug
# Default: 2
#
# LogTime
# Include time in server console output [hh:mm:ss]
Expand Down Expand Up @@ -82,7 +97,8 @@ ConfVersion=2020010501
# WaitAtStartupError
# After startup error report wait <Enter> or some time before continue (and possible close console window)
# -1 (wait until <Enter> press)
# Default: 0 (not wait)
# 0 (no wait)
# Default: 5 (wait 5 sec)
# N (>0, wait N secs)
#
# MinRealmListDelay
Expand Down Expand Up @@ -163,15 +179,18 @@ PatchesDir = "./patches"
MaxPingTime = 30
RealmServerPort = 3724
BindIP = "0.0.0.0"
TrustedProxyServers = ""
PidFile = ""
LogLevel = 0
LogLevel.Console = 2
LogLevel.File = 2
LogTime = 1
LogTime = 0
LogFile = "Realmd.log"
LogTimestamp = 0
LogFileLevel = 0
UseProcessors = 0
ProcessPriority = 1
WaitAtStartupError = 0
WaitAtStartupError = 5 # consider fixing your actual problem before changing this value!
MinRealmListDelay = 1
RealmsStateUpdateDelay = 20
WrongPass.MaxCount = 0
Expand Down
5 changes: 3 additions & 2 deletions docker/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ RUN \
build-essential \
cmake \
git \
libace-dev \
libmysqlclient-dev \
libssl-dev \
libtbb-dev \
Expand Down Expand Up @@ -99,7 +98,6 @@ RUN \
apt update -y && \
apt install -y \
curl \
libace-7.1.2 \
libmysqlclient21 \
libssl3 \
libtbb12 \
Expand Down Expand Up @@ -149,6 +147,9 @@ COPY ./docker/server/docker-cmd-realmd.sh /usr/local/bin/realmd
COPY ./docker/server/docker-cmd-extract-client-data.sh /usr/local/bin/extract-client-data

RUN \
# These files are not needed in the final image
rm -rf /opt/vmangos/include && \
rm -rf /opt/vmangos/lib && \
chmod +x /opt/vmangos/bin/* && \
chmod +x /usr/local/bin/mangosd && \
chmod +x /usr/local/bin/realmd && \
Expand Down

0 comments on commit af0f80a

Please sign in to comment.