Palworld

Palworld

View Stats:
Optimal server setup
I am running a palworld server for my friends group and we are dealing witha terrible amount of lag.

it has 22GB of RAM (DDR4)
3 Cores from a decent CPU
Only downside is that it runs on a harddrive, but it does not seam to use much in terms of storage writing/reading.

It runs in a Linux container in i VM environment.

everyone (including me) are dealing with frequent rubber banding, lagg spikes and desyncs.

Jitter is a bit high at 20-30, but latency is pretty stable at 40-50 for europeians (higher for the americans)

Would it just be the storage solution or would it potentially be something else causing these issues? I have noticed that people are seaming to get a decent experience from hosting services, so if i don't find a solution for this or a reason for the issues i would likely have to shell out for that. :steamsad:
< >
Showing 1-15 of 19 comments
Belial Jan 28, 2024 @ 7:34pm 
What we are dealing with are CONSTANT crashes. Like every 10-15 minutes
JamieLinux Jan 28, 2024 @ 7:42pm 
Originally posted by Exactly 150 Snails:
I am running a palworld server for my friends group and we are dealing witha terrible amount of lag.

it has 22GB of RAM (DDR4)
3 Cores from a decent CPU
Only downside is that it runs on a harddrive, but it does not seam to use much in terms of storage writing/reading.

It runs in a Linux container in i VM environment.

everyone (including me) are dealing with frequent rubber banding, lagg spikes and desyncs.

Jitter is a bit high at 20-30, but latency is pretty stable at 40-50 for europeians (higher for the americans)

Would it just be the storage solution or would it potentially be something else causing these issues? I have noticed that people are seaming to get a decent experience from hosting services, so if i don't find a solution for this or a reason for the issues i would likely have to shell out for that. :steamsad:


For your Linux VM
6 cores ( you can try 7 and 8 cores but they typically don't get touched.)
16gb ram (32 gb + for full 32 players , rule of thumb 1gb per user.)
8-16gb swap
60 gb drive space

/etc/sysctl.conf
bottom of file

vm.swappiness=10
vm.vfs_cache_pressure=50


Also note invasions have a huge memory leak.

bEnableInvaderEnemy=false turns off raids , if you want raids, set up a cron job to reboot the server every 6 - 24 hours .
Last edited by JamieLinux; Jan 28, 2024 @ 7:46pm
Originally posted by Belial:
What we are dealing with are CONSTANT crashes. Like every 10-15 minutes
how much RAM do you have assigned to your server (or bought from your host)?

The server easely uses about 8GB of RAM or more when peoplare are actively playing on it (tested with 4 players). Memory leak issue is compounding this and makes it use more and more RAM over time.

If the server hits its RAM limit, it will just stop without any warning.
Originally posted by JamieLinux:
Originally posted by Exactly 150 Snails:
I am running a palworld server for my friends group and we are dealing witha terrible amount of lag.

it has 22GB of RAM (DDR4)
3 Cores from a decent CPU
Only downside is that it runs on a harddrive, but it does not seam to use much in terms of storage writing/reading.

It runs in a Linux container in i VM environment.

everyone (including me) are dealing with frequent rubber banding, lagg spikes and desyncs.

Jitter is a bit high at 20-30, but latency is pretty stable at 40-50 for europeians (higher for the americans)

Would it just be the storage solution or would it potentially be something else causing these issues? I have noticed that people are seaming to get a decent experience from hosting services, so if i don't find a solution for this or a reason for the issues i would likely have to shell out for that. :steamsad:


For your Linux VM
6 cores
16gb ram
8-16gb swap
60 gb drive space

/etc/sysctl.conf
bottom of file

vm.swappiness=10
vm.vfs_cache_pressure=50

Thank you.

Can you elaborate what those 2 config changes do? (i am not an strong linux user :/)

ALso sadly seams that the first part is going to be impossible for me then as my poor servers CPU only has 4 cores.
JamieLinux Jan 28, 2024 @ 7:48pm 
Originally posted by Exactly 150 Snails:
Originally posted by JamieLinux:


For your Linux VM
6 cores
16gb ram
8-16gb swap
60 gb drive space

/etc/sysctl.conf
bottom of file

vm.swappiness=10
vm.vfs_cache_pressure=50

Thank you.

Can you elaborate what those 2 config changes do? (i am not an strong linux user :/)

ALso sadly seams that the first part is going to be impossible for me then as my poor servers CPU only has 4 cores.

VM cache pressure is a measure of how much pressure the kernel is under to free up memory used for caching directory and inode objects

swappiness value to 10, which means that the swap file will only be used when the RAM usage is around 80-90%

You can use 4 cores minimum but I wouldn't go beyond 10 players maximum. I would reboot the server every 4-6 hours to make your life not a living hell
Last edited by JamieLinux; Jan 28, 2024 @ 7:50pm
TGrable Jan 28, 2024 @ 7:52pm 
I have an old machine I was using for Ark back in the day for this. It is an old 4770k system with cpu sitting at 4.8 ghz. Windows 10 with an SSD for OS and one for Server. It only has 16gb of ram, but honestly Even with 16 people online (most i've had so far) Ram usage was something like 6.8gb for game.

Now, the game does appear to have a memory leak on the server side. Sometimes it will be fine, but other times you need to reboot it every 8-10 hrs as the memory will continue to increase.

Now I did try hosting this off a 4 vcore VPS and for whatever reason the memory leak on Linux is WAYYYY worse than windows.
Originally posted by JamieLinux:
VM cache pressure is a measure of how much pressure the kernel is under to free up memory used for caching directory and inode objects

swappiness value to 10, which means that the swap file will only be used when the RAM usage is around 80-90%

You can use 4 cores minimum but I wouldn't go beyond 10 players maximum. I would reboot the server every 4-6 hours to make your life not a living hell

Thank you for going into details on those configs.

I have made it a point to restart the server atleast once a day. It has been rubber banding and lagging from the get go and restarts doesn't seam to help all that much. It thing i've noticed is that giving more RAM just delayed the inevitable crash from the leak catching up to the memory cap. (I really need to setup an automated restart task at some point)
Originally posted by TGrable:
Now I did try hosting this off a 4 vcore VPS and for whatever reason the memory leak on Linux is WAYYYY worse than windows.

Yeah... we could last for maybe 6 hours with 12GB of RAM. so i just said ef it and gave it 22. Now it will last a day before it NEEDs are restart.
JamieLinux Jan 28, 2024 @ 7:55pm 
other optimizations will be :

Setting up a cronjob to reboot the server, you can do this with
sudo crontab -e


Paste this at the bottom
0 */6 * * * /sbin/shutdown -r now (this would be every 6 hours dont put the stuff in brackets in the cron job )
Last edited by JamieLinux; Jan 28, 2024 @ 7:56pm
Originally posted by JamieLinux:
other optimizations will be :

Setting up a cronjob to reboot the server, you can do this with
sudo crontab -e

m h dom mon dow command
minute hour dayOfMonth Month dayOfWeek commandToRun

Paste this at the bottom
0 */6 * * * /sbin/shutdown -r now (this would be every 6 hours)

I am using LGSM for hosting the server (easier to setup for a linux noob like me) and it makes it easier to setup cron jobs for restarts. More or less just have to tell it to write 1 command (./pwserver restart) and done. I've just been putting it off because for now, manual restarting works fine (ish) and i have not read up on how to setup the cronjob correctly yet.
JamieLinux Jan 28, 2024 @ 8:03pm 
Originally posted by Exactly 150 Snails:
Originally posted by TGrable:
Now I did try hosting this off a 4 vcore VPS and for whatever reason the memory leak on Linux is WAYYYY worse than windows.

Yeah... we could last for maybe 6 hours with 12GB of RAM. so i just said ef it and gave it 22. Now it will last a day before it NEEDs are restart.


sudo nano /etc/systemd/system/palworld.service

[Unit]
Description=Palworld Server
Wants=network-online.target
After=network-online.target

[Service]
RuntimeMaxSEc=86400
Type=simple
Restart=always
RestartSec=30s
MemoryMax=12G
User=userid
WorkingDirectory=/homeuserid/
ExecStartPre=/usr/games/steamcmd +force_install_dir '/home/userid/Steam/steamapps/common/PalServer' +login anonymous +app_update 2394010 +quit
ExecStart=/home/userid/Steam/steamapps/common/PalServer/PalServer.sh -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS > /dev/null
Restart=always

[Install]
WantedBy=multi-user.target

User id = the user id you will run palworld as a service under.

after you save it you will want to run

sudo systemctl enable palworld

sudo systemctl start palworld

sudo systemctl status palworld <<< shows you the status of the running service if its running or if it crashed with error

restart=no | always | on-success | on-failure | on-abnormal | on-abort | on-watchdog
MemoryMax= as low as .5mb - 32G (note: lower then .5mb is going to cause issues)
Last edited by JamieLinux; Jan 28, 2024 @ 9:30pm
JamieLinux Jan 28, 2024 @ 8:05pm 
Originally posted by Exactly 150 Snails:
Originally posted by JamieLinux:
other optimizations will be :

Setting up a cronjob to reboot the server, you can do this with
sudo crontab -e

m h dom mon dow command
minute hour dayOfMonth Month dayOfWeek commandToRun

Paste this at the bottom
0 */6 * * * /sbin/shutdown -r now (this would be every 6 hours)

I am using LGSM for hosting the server (easier to setup for a linux noob like me) and it makes it easier to setup cron jobs for restarts. More or less just have to tell it to write 1 command (./pwserver restart) and done. I've just been putting it off because for now, manual restarting works fine (ish) and i have not read up on how to setup the cronjob correctly yet.


understand well continue reading if you have any questions ask.. << likes linux obviously lol.
JamieLinux Jan 28, 2024 @ 8:06pm 
Originally posted by TGrable:
I have an old machine I was using for Ark back in the day for this. It is an old 4770k system with cpu sitting at 4.8 ghz. Windows 10 with an SSD for OS and one for Server. It only has 16gb of ram, but honestly Even with 16 people online (most i've had so far) Ram usage was something like 6.8gb for game.

Now, the game does appear to have a memory leak on the server side. Sometimes it will be fine, but other times you need to reboot it every 8-10 hrs as the memory will continue to increase.

Now I did try hosting this off a 4 vcore VPS and for whatever reason the memory leak on Linux is WAYYYY worse than windows.

correct the memory leak is worse, hence why you should reboot more, however the server overhead in linux is way less then windows. You can actually negate the leak mostly with turning off the raid mechanic atm.
Originally posted by JamieLinux:
/etc/sysctl.conf
bottom of file

vm.swappiness=10
vm.vfs_cache_pressure=50

My container does not have those variables in the config file.
I see a bunch of variables for networking, but not the aforementioned ones

this is the end of the .conf file:
https://prnt.sc/skaiB9kNjZM3
JamieLinux Jan 29, 2024 @ 9:21am 
Originally posted by Exactly 150 Snails:
Originally posted by JamieLinux:
/etc/sysctl.conf
bottom of file

vm.swappiness=10
vm.vfs_cache_pressure=50

My container does not have those variables in the config file.
I see a bunch of variables for networking, but not the aforementioned ones

this is the end of the .conf file:
https://prnt.sc/skaiB9kNjZM3

You need to manually enter them in under the line
#kernel.sysreq=438
Last edited by JamieLinux; Jan 29, 2024 @ 9:21am
< >
Showing 1-15 of 19 comments
Per page: 1530 50

Date Posted: Jan 28, 2024 @ 7:33pm
Posts: 19