Jump to content
c45y

PvE lag topic

Recommended Posts

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...