(Performance Adjustment) Removed AsyncLoadVariables from InterserverTimer.Check() in both zone and world. By watching the MySQL general.log file on mass zone idle activity, you can

see that the query 'SELECT varname, value, unix_timestamp() FROM variables where unix_timestamp(ts) >= timestamp' is called every 10 seconds. This function is loading
	variables that are initially loaded on World and Zone bootup. When running a large amount of zone servers, the amount of MySQL chatter that is produced is enormous and
	unnecessary. For example, if I ran 400 zone servers, I would see 3,456,000 unnecessary queries from all idle or active zone processes in a 24 hour interval.
This commit is contained in:
Akkadius 2014-04-05 03:38:58 -05:00
parent fb3c6365e1
commit 7cfc5b085e
3 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,10 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50) EQEMu Changelog (Started on Sept 24, 2003 15:50)
------------------------------------------------------- -------------------------------------------------------
== 04/05/2014 == == 04/05/2014 ==
Akkadius: BOOGABOOGABOOGA Akkadius: (Performance Adjustment) Removed AsyncLoadVariables from InterserverTimer.Check() in both zone and world. By watching the MySQL general.log file on mass zone idle activity, you can
see that the query 'SELECT varname, value, unix_timestamp() FROM variables where unix_timestamp(ts) >= timestamp' is called every 10 seconds. This function is loading
variables that are initially loaded on World and Zone bootup. When running a large amount of zone servers, the amount of MySQL chatter that is produced is enormous and
unnecessary. For example, if I ran 400 zone servers, I would see 3,456,000 unnecessary queries from all idle or active zone processes in a 24 hour interval.
== 04/01/2014 == == 04/01/2014 ==
demonstar55: Implemented ability for a merchant to open and close shop. demonstar55: Implemented ability for a merchant to open and close shop.

View File

@ -461,7 +461,7 @@ int main(int argc, char** argv) {
if (InterserverTimer.Check()) { if (InterserverTimer.Check()) {
InterserverTimer.Start(); InterserverTimer.Start();
database.ping(); database.ping();
AsyncLoadVariables(dbasync, &database); // AsyncLoadVariables(dbasync, &database);
ReconnectCounter++; ReconnectCounter++;
if (ReconnectCounter >= 12) { // only create thread to reconnect every 10 minutes. previously we were creating a new thread every 10 seconds if (ReconnectCounter >= 12) { // only create thread to reconnect every 10 minutes. previously we were creating a new thread every 10 seconds
ReconnectCounter = 0; ReconnectCounter = 0;

View File

@ -447,7 +447,7 @@ int main(int argc, char** argv) {
if (InterserverTimer.Check()) { if (InterserverTimer.Check()) {
InterserverTimer.Start(); InterserverTimer.Start();
database.ping(); database.ping();
AsyncLoadVariables(dbasync, &database); // AsyncLoadVariables(dbasync, &database);
entity_list.UpdateWho(); entity_list.UpdateWho();
if (worldserver.TryReconnect() && (!worldserver.Connected())) if (worldserver.TryReconnect() && (!worldserver.Connected()))
worldserver.AsyncConnect(); worldserver.AsyncConnect();