MySQL + Ramdisk

We run our servers in a vspere hypervisor. The database is running on a linux server on the same virtual cluster as the windows box hosting the game server. With 30 players on one server, mysql server cpu is at; 17mhz average and 40mb of ram....
Average disk usage is at 69kbps.

Im sure that the ramdisk is a waste of money.
 
OK, let me place my hat in this too. I ran a Dayz RAM disk awhile back and it did not work out well due to the fact that software was shit. You can spend a few more like 1,000$ for software that will use more than the 4 GB. But IMHO.. not worth it.

Now with that said. I found that I could run 4x Dayz servers, 1 x MSO and a Minecraft on:

Windows 2008 SP1
Intel® Xeon® Processor E3-1240
16gb DDR3
2x 500 GB 7200 rpm HDD's
1 GB data connection
My setup was that I ran Dayz/arma/Mysql from the 1x500 GB drive and the config's and log files on the other 1x500 GB drive.
With all these going and one night we had 127 players on all 6 servers total and my processor was around 65-72% with all 8 cores running. My hard drives ran with 92% speed capacity on the arma/mysql and 67% capacity on the log one.
I was told that Dayz avg was 17 FPS, MSO around 11 FPS. Miinecraft 30 FPS
Total memory used was 8 GB.
Total avg of 10-12% total network capacity used.
So basically good processor and good drives will make a good system.
 
I was just about writing an large post about why a ramdisk could drasicly improve performance when I came to realize that almost nobody knows what a ramdisk does and how it works and how it could improve the dayz server performance.

Statements like
With 30 players on one server, mysql server cpu is at; 17mhz average and 40mb of ram....
Average disk usage is at 69kbps.
Im sure that the ramdisk is a waste of money.
are totally unqualified because you obviously dont know how it works.

Everyone who posts their CPU and Memory Capacity here: CPU and Memory are some of the lesser performance factors when running a Database server for DayZ. Yes shure you need some power and some speed, but for a DayZ Server the requirements are not really high.

But what DOES improve the performance on the Database side drasticly is to speed up writing operations and aspecialy combined with the locking operations of the tables.

Let me explain that:
For every write operation, some tables (or rows, depends on your setup. MyISAM = Table level locking, innoDB=Row level locking) gets locked. This ensures that now writing collission occures (imagine 2 operations at the same time, trying to update the same data!).
Now when the DayZServer is under heavy load 'many' write operations get executed, resulting in locks for every write operation. (which is a good thing, remember?) however, the read operations are getting slowed down because while writing data the reading of the table/index has to wait.

Now at first this may sound not so slow, I mean: 3, 4 write operations per second? this isnt much.
How slow that really is in combinations with read operations you can even test yourself.
Try to execue the following:
Code:
select max(`sL`.`start_time`) AS `start_time`,
min(`sL`.`start_time`) AS `first_start`,
`sL`.`unique_id` AS `unique_id`
from `survivor` `sL`
group by `sL`.`unique_id`
What this statement does is that it selects the first starttime (when the player first appeared on the server) and when he startet his current survival attemt. this is grouped by the unique_id to make more sense.


This Database operation should be a dab for a Database server. This is why Database server even exist instead of text files.
However, You will notice that this statement runs a lot faster on an empty server than on an 40 player server.
Execute it multiple tims. The first time may be slow anyways because there is no execution plan yet (the server caches the statement), but after that it should give you a result very fast.

Stats on my (empty) server (virtualized):
First Time Execution: 0,203sec. (this is ok)
Every other Time: 0,093sec (this is also ok, even if it could be faster)

I cant post full server stats yet because of the local time nobody plays currently ^^

Now what a ramdisc does here will not improve the execution time on an empty server. They will almost stay the same.
With a ramdisc write operations can be executed there instead directly to disc which will then happen much faster. With faster writing you automaticly get faster reading because the tables are not locked so often, or at least get much faster unlocked.



I operate several Servers and Clusters of Servers (not DayZ releated) and I can tell you for some applications it can change the world to have a ramdisc running (if its correct configured)

For DayZ it has to be testest yet. (which I will do these days because Im also not a fan of ppl not getting saved, admin tools are slow, etc...)
 
Interesting post, can t wait to look at the result on a full server. But here, nobody is complaining when server is full, ill do the test tonight and post my results
 
RAMDisk for DayZ? Talk about overkill....

That RAM would be much better used to actually host your server unless you have lots going spare.
 
... Ramdisk for DayZ is overkill and makes the entire issue more complicated then it needs to be ... There is NO reason to have a Ramdisk for a low performing database read/write system like DayZ. None, Zero, Zilch, Nada, not sure how many other ways I need to spell it out in. The performance you gain is minimal. I am not talking about Ramdisk vs harddrives read/writes, I am talking about MySQL performance on the Ramdisk system as it pertains to DayZ. DayZ does not write to the database nearly enough to even warrant the thought process it would take to get this done.

This does not also talk about the implications of having your LIVE data sitting in a volatile file system like a ramdisk. Loss of power = instant data loss, ramdisks should only be used for MySQL temp files, never for full production data.

http://policystat.github.com/run-mysql-from-a-ram-disk-in-ubuntu/
 
Who wants to put the live data on a ramdisc? that would be insane.
Also with a SSD it really wouldn't improve much that it would matter.
For DayZ itself it also would not make any difference.

And the reasons why I want to reduce locking (or at least the impact of it) are completely different of what this thread was originally about. (I have heavy external reading operations going on)
 
Nice talk from all of you.

But I use ramdisk for dayz. Never lost data, and it also makes a backup every 30 minutes. when does a server crash btw ? ( full system crash ) That would only be on hardware failure. If I lose 30minutes dayz data.. I don't give a shit tbh......

However it's true that it don't really speed the dayz server up :D I still like the idea that I know the database isn't a real bottleneck anymore. it's just the dayz code/server files.. I cannot say it enough :D Never EVER hosted with shitty files like dayz...

Example: Server 1 lags like hell... And my second server on the same machine runs smooth on 45/50 fps. Good example that it's not my server hardware ;)
 
Back
Top