Ram disk and general server setup questions

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Cheetohz

New Member
Jul 29, 2019
56
0
0
Hey guys, I am repurposing an old server. It has an Intel core I7 3770 ivy bridge CPU, 16gb ram and 2tb WD caviar black w 64MB cache(sata 6Gb/s) I have a 20Mb down and 20Mb up connection here. But generally averages about 80/10

I am planning on using a ramdisk, is 10Gb a decent size? And will this script work for me?

Code:
#script to create ramdisk
mv -r /home/gameserver/ftb/world /home/gameserver/ftb/worldbackup
mount -t tmpfs -o size=10G tmpfs /home/gameserver/ftb/world
cp -r /home/gameserver/ftb/worldbackup/* /home/gameserver/ftb/world/
 
#cron */5 * * * * /home/gameserver/ftb/backup.sh
TIME=$(date +"%Y-%m-%d.%H:%M")
tar -czf /home/gameserver/ftb/tarbackup/world-$TIME.tar.gz /home/gameserver/ftb/worldbackup
cp -r /home/gameserver/ftb/world/* /home/gameserver/ftb/worldbackup/
 
#script to unmount
cp -r /home/gameserver/ftb/world/* /home/gameserver/ftb/worldbackup/
umount -v /home/gameserver/ftb/world
mv /home/gameserver/ftb/worldbackup /home/gameserver/ftb/world

I plan on also copying from world to worldbackup every 5 min as a safe measure.

How big do world files end up getting?

Also how many users can I expect to support?

Any great admin tools I should know about?

What else should I look out for?

Sent from my Galaxy Nexus using Tapatalk 4 Beta
 

Cheetohz

New Member
Jul 29, 2019
56
0
0
Updated my script

#script to create ramdisk
mv -r /home/gameserver/ftb/world /home/gameserver/ftb/worldbackup
mount -t tmpfs -o size=10G tmpfs /home/gameserver/ftb/world
cp -r /home/gameserver/ftb/worldbackup/* /home/gameserver/ftb/world/

#cron */5 * * * * /home/gameserver/ftb/backup.sh
TIME=$(date +"%Y-%m-%d.%H:%M")
tar -czf /home/gameserver/ftb/tarbackup/world-$TIME.tar.gz /home/gameserver/ftb/worldbackup
cp -r /home/gameserver/ftb/world/* /home/gameserver/ftb/worldbackup/

#script to unmount
cp -r /home/gameserver/ftb/world/* /home/gameserver/ftb/worldbackup/
umount -v /home/gameserver/ftb/world
mv /home/gameserver/ftb/worldbackup /home/gameserver/ftb/world
 

Quantax

New Member
Jul 29, 2019
22
0
0
Use rsync instead of cp, and I'd rather first rsync from ram to disk and then tar. And it might good idea to temporarily turn off world saving while rsyncing/backuping in order to ensure backup integrity.

Taking backups every 5 minutes seems rather excessive to me since with a decent sized map you'll fill your 2 TB quickly with 2016 backups a week. Your map size will of course be depended on your player count but even with a small player base your map will most likely be in the gigabyte range in a short time.

I'm running an FTB server for our gaming community with a dozen or so active minecraft players (and few more infrequent players) and the map is already 2GB after 11 days of running. Of course the expansion rate slows down after everybody settles their bases but the size certainly isn't going down. I actually had to drop the server from ramdisk due to not having enough spare memory to ramp up the ramdisk. So far haven't had any complaints about lag so it seems FTB pack handles better than the custom build mod pack we were using on the previous server. But when I was running on ramdisk I rsynced to disk every 5 minutes and took backups twice a day.