slide Posted October 2, 2015 Report Share Posted October 2, 2015 I just did a 10s timing window during a lag event and here are the results: http://timings.aikar.co/?url=12636395 Quote Link to comment Share on other sites More sharing options...
c45y Posted October 2, 2015 Author Report Share Posted October 2, 2015 After more debugging today we've confirmed the source is CobraCorral, Database.java in the getHorse function, every recorded call to getHorse is a cache miss, resulting in a database query being made on the main thread ( which is the 1000ms delay per horse ) Debugging functions (shown below with logs) were written into the plugin, producing the following output https://gist.github.com/stevommmm/0fa7948c2fabb60fb904 At this stage I am handing off to the rest of the tech team, I will be gone the next 3-4 days. Best of luck guys Quote Link to comment Share on other sites More sharing options...
totemo Posted October 2, 2015 Report Share Posted October 2, 2015 Thanks, C45Y. Those are some very interesting numbers. The measurements for "Horse found, checking for lock and updating; duration=" are all 1001, 1002, 2001 or 2002 ms. Is something sleeping for precisely one second? It seems to me that we could simply disable CobraCorral and re-enable the lock-horses setting in KitchenSink. Everybody's horse would then be locked to the person who tamed it, right? We would lose the ability to share horses, except by the temporary sharing feature built into KitchenSink, and we would lose fancy stuff like GPS. But the server would be playable. Perhaps we could get TheAcademician to comment on how well CobraCorral would cope with being disabled for a while until the database issue is fixed? Quote Link to comment Share on other sites More sharing options...
redwall_hp Posted October 2, 2015 Report Share Posted October 2, 2015 CobraCorral appears to exclusively use entities uniqueIds behind the scenes, so I'd assume it would pick things up properly when re-enabled, if it were temporarily taken out. Quote Link to comment Share on other sites More sharing options...
totemo Posted October 2, 2015 Report Share Posted October 2, 2015 CobraCorral appears to exclusively use entities uniqueIds behind the scenes, so I'd assume it would pick things up properly when re-enabled, if it were temporarily taken out. The reason I asked, of course, was in case the CobraCorral fix was going to take a long time. Or if we run the new version and things turn out to be not as simple as was thought. I had a chat to TheAcademician today, in game, and she said that new locked horses wouldn't get registered with the DB if we disabled CobraCorral. So GPS data would be off. However she also said that it would eventually resolve itself and otherwise shouldn't be an issue. So given that there is a new version in the works, I look forward to seeing what it does for the lag. And I'm still mystified by these 1000ms pauses. Quote Link to comment Share on other sites More sharing options...
slide Posted October 2, 2015 Report Share Posted October 2, 2015 So right now we have a version that just removes some cache clearing during onPlayerQuit in version 1.2.3 and migrated the database from sqlite to mysql. So far the main lag point of a cache miss, and resultant sql lookup, seems to be gone. Quote Link to comment Share on other sites More sharing options...
redwall_hp Posted October 2, 2015 Report Share Posted October 2, 2015 So far, the lag spikes seem to have cleared up now that CobraCorral is using a mysql backend. TheAcademician is working on some further optimization to the plugin, but overall, it's looking good. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.