Long callback times and high Hard Drive usage.

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

Re: Long callback times and high Hard Drive usage.

Postby psychoninja911 » Sat Jul 08, 2017 1:49 am

try this
I tried it, and it disabled all the reward mobs. I'm going to give it a test, but I'm already getting callback times on stuff as simple as "quit timers".

Is there anything that can effect this? Like latency? Crappy hardware? HDD instead of SSD?
psychoninja911
DOL Novice
 
Posts: 51
Joined: Fri Oct 07, 2011 6:46 pm

Re: Long callback times and high Hard Drive usage.

Postby Leodagan » Sat Jul 08, 2017 6:31 am

Are you using MySQL or SQLite Database ?

Your Disk Usage seems to Max Out pretty quickly, the rates displayed are low (333Kb/s Write is really low !)

It's possible that database "overload" is normal here with someone killing lot's of Mob at the same time with an Animist, I'm pretty sure every loot getting inside Inventory are immediately saved to database and other event can trigger immediate database saving (gaining a level for example...)

A regular Hard Drive should support around 60 Database Transactions/second when configured for flushing to disk every transactions, you should try to bench you hard drive (big file copy, small files copy, or maybe some dedicated tool)

Ultimately you should check if you can disable your database "flushing to disk" synchronously (both MySQL and SQLite have this kind of options) this way the database will be way more reactive (tens of thousand of transactions/second) but you can lose some data in case of power failure... (in-Memory transactions that couldn't be written to disk before failure)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Long callback times and high Hard Drive usage.

Postby psychoninja911 » Sat Jul 08, 2017 6:40 am

Ultimately you should check if you can disable your database "flushing to disk" synchronously (both MySQL and SQLite have this kind of options) this way the database will be way more reactive (tens of thousand of transactions/second) but you can lose some data in case of power failure... (in-Memory transactions that couldn't be written to disk before failure)

If I lose data in the event of a power failure, is this data that is crucial? Will it corrupt the server? Or is it just character progress in a short Window of time?

Edit: Super emberassing... But I ran some HD tests on my server (with everything shut down), and my 4k Q32 read/write speeds are horrible. Both under 1MB/s...
I ran them on my SSD (main computer), and they're ~277mb/s.
So basically, less than .5% as effective. I'm testing some other hard drives, or worst case scenario - buy an SSD for it.
I'll keep you updated :oops:
psychoninja911
DOL Novice
 
Posts: 51
Joined: Fri Oct 07, 2011 6:46 pm

Re: Long callback times and high Hard Drive usage.

Postby Leodagan » Sat Jul 08, 2017 7:55 am

There is really low chance of data corruption with DOL behavior.

It's only updating database "row by row", there is no real transactional behavior, and "foreign keys" are rarely created when a character is playing (references are used when creating a character or creating a guild/alliance, maybe when triggering some Quests...)

If you're not editing your server content (properties, mobs, items, quests) the only data that can be lost would be a short progress window like you said (and probably quest steps, player trades and other events from this short time window)

Synchronized flush to disk is only needed for highly critical system (Monetary Transactions...) but is a requirement for ACID validation of a Database Engine, so most of the time it's enabled by default, you can safely move to asynchronous disk flush for DOL Server if you're not in a country with unreliable grid power :)

Your 4K QD32 value for a hard drive is completely normal by the way ! (you should have a typical 0.5~1Mb/s in this bench) if your sequential speed is around 100Mb/s your disk is probably healthy...

MySQL have flush options that guarantee data in the last "second" is written to disk, this is clearly good enough for DOL player progress, and only flushing every second already allows for thousands of transaction if your disk have enough sequential throughput (data to be written is concatenated for the asynchronous flush)

SQLite have option to use a WAL file (Write Ahead Log), it flush transactions to this file before replaying them on the main database file, in case of power failure it will be able to replay this log and write all uncorrupted data to your database, it use less hard drive I/Os because the WAL file is only appended (no random access) and then it's asynchronously merged to your main database (with near sequential behavior...)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Long callback times and high Hard Drive usage.

Postby psychoninja911 » Sat Jul 08, 2017 8:15 am

Hmm, I guess I could try the asynchronized disk flush...

I have had crappy power lately. Lots of storms here in Texas. Seriously the server restart 3x the other night. However, when the storms aren't here, power is fine.

In fact, this is run off a laptop, so the only thing that shuts off is the router.
psychoninja911
DOL Novice
 
Posts: 51
Joined: Fri Oct 07, 2011 6:46 pm

Re: Long callback times and high Hard Drive usage.

Postby Leodagan » Sat Jul 08, 2017 9:02 am

Battery-backed hardware is totally eligible for asynchronous writes :)

This is how critical systems works using RAID disks with a battery-backed RAM cache...

On a laptop you could just need a small script that shutdown DOL gracefully when battery is getting low to make sure you'll never lose any data :D
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Long callback times and high Hard Drive usage.

Postby Loki » Sat Jul 08, 2017 9:35 am

So the script is not the problem it seems :D as Leodagan knowledge is far superior to mine triple fold :oops:

Anyhow it disabled your mobs because I named it different

Change
Code: Select all
public class Rpbpmob: GameNPC
to
Code: Select all
public class RewardMob : GameNPC

Hope you get your problem sort soon.
“ If debugging is the process of removing software bugs, then programming must be the process of putting them in. ”

Join https://discord.gg/r3T2U7S Official DOL Discord Chat
User avatar
Loki
Developer
 
Posts: 468
Joined: Fri Jun 23, 2006 2:14 am
Location: uk

Re: Long callback times and high Hard Drive usage.

Postby psychoninja911 » Sat Jul 08, 2017 4:22 pm

So it looks like I'm using MariaDB. It has a function on linux called Galera Cluster, however I'm reading that it does not exist on Windows.

Does it not do this all together? Or does Windows MariaDB have a similar feature that can't be disabled?
And it looks like MariaDB generally has better performance than MySQL...

I'm not sure what to do at this point. Other than run a Raid configuration or buy a SSD.
psychoninja911
DOL Novice
 
Posts: 51
Joined: Fri Oct 07, 2011 6:46 pm

Re: Long callback times and high Hard Drive usage.

Postby Leodagan » Sun Jul 09, 2017 6:29 am

https://mariadb.com/kb/en/mariadb/xtrad ... trx_commit

This is the parameter to change for MariaDB when using InnoDb Storage Engine
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest