Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I admin a dedicated server that hosts a multiplayer game.

This game uses a map that now is 1.5 GB but will be soon 2.3 GB. We have just one SATA HD.

We would like to save the map every hour in the same HD to have the possibility of fresh rollbacks.

If I use rdiff-backup the players experience some "lag" (avarage is 15 seconds of 50% ticks per seconds) due to (I think) HD business. I know that some lag is necessary but what could be the best solution?

The map files are modified very often but in theory if exists a process that make slowly a backup but "consumes less HD", I think that would be the best option. Or is a stupid idea?

The map is stored in many files, like 2500, but the changing files are less than 500.

I'm very new to admin a server and I don't know so many things (english as well), so be kind.

share|improve this question
1  
Pre-emptive strike: I think this should be moved to serverfault, and not to gaming if any move is going to take place. –  alexanderpas Jan 8 '12 at 23:03
    
I don't see any reason to move it. SF wouldn't want this - this is clearly personal use as opposed to a server in a professional environment. Game servers don't really fit well into games.se either. This is really the best place for it. –  Journeyman Geek Jan 8 '12 at 23:19

1 Answer 1

up vote 1 down vote accepted

I assume your talking about Minecraft (although the general idea should be applicable to other games too).

I understand that the large major servers use ram disks for the live map. They then periodically copy this off. I would guess that you could use 2 separate ram disks, copy the live to the temporary backup, then copy the temporary backup to long term storage. If your server crashes and you loose the ram you could loose some updates though.

The main disadvantage is you need a server with a lot of ram. At least enough to host the game server and the ramdisk of the map with the 2nd ramdisk if possible.

If you want to archive snapshots and disk space is an issue it might be worth looking for some way to just store the changes as much as possible The obvious way would be to compare file hashes/modify times (which rdiff it likely to be doing) but you can also look at doing binary diffs/patching so only the changes that actually happen are stored (I don't know how well that would work for Minecraft as it compresses it's Chunk data with the gzip algorithm).

You could also look at using Btrfs as it has built in snapshot functionality. That might actually let you 'save' the current state of the map rather than having to copy the entire thing across, then you can mount the snapshot version and copy it across when you want. Of course if your providing downloads then you would need them all to be accessible and compressed.

For limiting copy speed I know that rsync has a '--bwlimit=KBPS' command to limit bandwidth.

share|improve this answer
    
Minecraft, right! Well we have some RAM but not 6 GB more.. so i'll check Btrfs thank you. –  Fabio F. Jan 8 '12 at 23:20
    
ramdisks might make sense here, or possibly SSDs. I'd note, should the system have the capability, the amounts of ram we're talking about, amusingly enough, may be the cheapest solution. I'd also suggest taking a look at zfs if its viable –  Journeyman Geek Jan 8 '12 at 23:21
    
May I ask why the backups need to be on the same HDD that the backp is being taken from. I admin 2 minecraft servers myself and couldn't fathom putting my backups on the same disk, both for performance issue like you are having but in case a disk fails, you won't lose anything. However, for same disk backup, SSD would be a great solution here. –  Paperlantern Jan 9 '12 at 3:59
    
We have only one HD, another partition could be useful? –  Fabio F. Jan 9 '12 at 10:48
    
Another partition would only help protect against filesystem corruption which is fairly unlikely. You have more chance of either hardware failure making the whole drive unreadable or corruption of the file itself (which could also be caused be hardware failure). You should at the very least have someone download the latest map on a schedule. –  David C. Bishop Jan 12 '12 at 7:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.