Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After the update Towny Gringotts lags on the server. #71

Closed
Darutan92 opened this issue Nov 16, 2021 · 17 comments
Closed

After the update Towny Gringotts lags on the server. #71

Darutan92 opened this issue Nov 16, 2021 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@Darutan92
Copy link

Darutan92 commented Nov 16, 2021

Hi. After in the spring of 2020 you released an updated version of the plugin (Gringotts 2.11.2-SNAPSHOT-rf77e523), there were no problems, everything worked fine on 1.15.2 and 1.16.5 with all versions of Towny until recently.

But recently I have updated Towny from version 0.96.7.4 to the latest currently 0.97.2.0. And after that, Gringotts began to load the server heavily. The other day you updated Gringotts to 2.12.1, I installed it in the hope that it would help fix the situation, but no.

Why can this be so? It all started after updating Towny from version 0.96.7.4 to 0.97.2.0, before that there were no problems.
M8B0Dm0A5QY
4wMi5ioiCsQ

@Darutan92 Darutan92 changed the title After the update Towny Gringotts began to load the server. After the update Towny Gringotts lags on the server. Nov 16, 2021
@nikosgram nikosgram self-assigned this Nov 17, 2021
@nikosgram nikosgram added the bug Something isn't working label Nov 17, 2021
@nikosgram
Copy link
Owner

Hello @Darutan92 , that is really interesting.

I go through the change-list from version 0.96.7.4 to 0.97.2.0 of Towny and I couldn't find something that could cause slowdowns on Gringotts. It's actually Gringotts slowing down Towny rather than Towny slowing down Gringotts.

Of my understanding it has to do with the database. Is taking more that x time to extract data from the database. What kind of database are you using? Are you using a "portable" database like sqlite, h2 or a server like database, for example mysql or mariadb?

F.Y.I. @LlmDl

@LlmDl
Copy link

LlmDl commented Nov 17, 2021

It might be that you're making an OfflinePlayer out of the town/nation name passed by Towny through Vault?

As an aside I'm currently trying to get a PR accepted by Vault which would get OfflinePlayers out of the Economy entirely, in favour of UUIDs. This sort of thing might interest you: MilkBowl/VaultAPI#112

@nikosgram
Copy link
Owner

I think I figure out the issue :) Working on it.

@nikosgram nikosgram reopened this Nov 17, 2021
@nikosgram
Copy link
Owner

nikosgram commented Nov 17, 2021

Hello @Darutan92

Can you try the same with the following version of Gringotts?

https://github.com/nikosgram/Gringotts/releases/download/2.12.2-SNAPSHOT/gringotts-2.12.2-SNAPSHOT.jar

In theory, the problem should be fixed, but, I'll keep the ticket opened until you verify that the problem got fixed :)

P.S. this is a pre-release version. Please backup your server before using it.

Thanks.

@Darutan92
Copy link
Author

Darutan92 commented Nov 17, 2021

Hello @Darutan92

Can you try the same with the following version of Gringotts?

https://github.com/nikosgram/Gringotts/releases/download/2.12.2-SNAPSHOT/gringotts-2.12.2-SNAPSHOT.jar

In theory, the problem should be fixed, but, I'll keep the ticket opened until to verify that the problem got fixed :)

P.S. this is a pre-release version. Please backup your server before using it.

Thanks.

I'll just tell you what I did yesterday. I installed the latest preliminary version of Towny 0.97.2.18 and Java 17 - after that the error in the console, which is in the second screenshot, passed. But the increased load on the server remained.

Towny's files are stored in yaml - flatfile.

Now I will install your version of Gringotts, I will be able to report the effect only after about 24 hours, now there is little online on the server and there was a restart - and the lags are going upward over time. Therefore, it takes time to understand whether it helped. I will definitely write later!

@Darutan92
Copy link
Author

Darutan92 commented Nov 18, 2021

Unfortunately, we did not notice much of a difference.
7WhNzh5TqA0

@LlmDl
Copy link

LlmDl commented Nov 18, 2021

Although the above is red, it did do 1210 of them in just 7.335 seconds. What was your timings duration for that screenshot?

@Darutan92
Copy link
Author

Although the above is red, it did do 1210 of them in just 7.335 seconds. What was your timings duration for that screenshot?

These are 1 hour timings.

@nikosgram
Copy link
Owner

Hmm, that might be the bstats telemetry gathering. I'll provide you with an option to disable it until I found a way to make it faster. :) Working on it

nikosgram added a commit that referenced this issue Nov 18, 2021
@nikosgram
Copy link
Owner

@Darutan92 can you try this version?

https://github.com/nikosgram/Gringotts/releases/download/2.12.2-SNAPSHOT-R0.2/gringotts-2.12.2-SNAPSHOT-R0.2.jar

By default, gathering total server balance and vaults for bstats will be disabled. Though, dependencies and denominations are still being part of the telemetry report, as the process of gathering that kind of data is not a heavy one :)

Please let me know if you still having the same issue. :) Thanks.

@Darutan92
Copy link
Author

Sorry for the delay, couldn't reply earlier.

After your first snapshot, the server's mspt got better. But, as I said, the red ticks remained.

The second snapshot did not really change the situation, the ticks became smaller, but there is still a delay.

My programmer suggested that it would be a good idea to handle balances asynchronously.

image

@Darutan92 Darutan92 removed their assignment Nov 20, 2021
@Darutan92
Copy link
Author

Damn, accidentally pressed ...
image

@nikosgram
Copy link
Owner

Hello :)

It took me forever to reply, though, that was because I had almost no free time the last few months.

I implemented some changes that should help with the lag spikes.

gringotts-2.12.3.jar.zip

Is it possible to give it a try with the attached version of gringotts?

@Darutan92
Copy link
Author

Hello. It is OK, it happens. I hope you are fine. Unfortunately, I don't have the opportunity to test the plugin right now, as my server is being reworked and frozen until the new summer season.

@roracle
Copy link

roracle commented Feb 28, 2023

This issue is why I didn't go with Gringotts this last time. I would love to get rid of a virtual economy, but it's so slow with Towny. I would be happy to help test things out if there's any test server set up. I might even set one up if necessary, and whitelist those who want to join it. A good testbed is necessary for better bug reports.

@GroobleDierne
Copy link

GroobleDierne commented Mar 13, 2023

@roracle my server decided to use Gringotts with Towny some time ago and we faced the same issues. However I did two PRs (#114 & #124) which greatly reduced the lag making it imperceptible, recently we hit around 35 active towns and the lag started coming back again (it is still far less than at the beginning though).
If you don't have more than that amount of towns you shouldn't experience lag.
I will try to further improve the performances in the coming days, also take into consideration that the lag caused by Gringotts is now mainly storage bound so it will depend n the quality of your hard drive/ssd/nvme.

@roracle
Copy link

roracle commented Jul 24, 2023

@roracle my server decided to use Gringotts with Towny some time ago and we faced the same issues. However I did two PRs (#114 & #124) which greatly reduced the lag making it imperceptible, recently we hit around 35 active towns and the lag started coming back again (it is still far less than at the beginning though). If you don't have more than that amount of towns you shouldn't experience lag. I will try to further improve the performances in the coming days, also take into consideration that the lag caused by Gringotts is now mainly storage bound so it will depend n the quality of your hard drive/ssd/nvme.

I think at this point I've landed on TNE as the economy system on my server since it can do virtual and physical together, making Towny easier to work with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants