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

Blueprint Lag #1051

Closed
ghost opened this issue Nov 30, 2019 · 10 comments
Closed

Blueprint Lag #1051

ghost opened this issue Nov 30, 2019 · 10 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Not a bug Works as intended / not a BentoBox bug. Type: Question Question or issue related to configuration, API or features.

Comments

@ghost
Copy link

ghost commented Nov 30, 2019

Description

Describe the bug

Not really a bug but the problem is that the server lags a lot when generating a blueprint. (This is the default one) there is 0 players on, always 20tps, 4gb ram etc but once you load the blueprint in, it drops to 17tps.

Steps to reproduce the behavior

Not really sure.

Expected behavior

Be optimized.

Screenshots and videos (Optional)

Environment

BentoBox Version (Mandatory)
30.11 23:59:30 [Server] Startup [22:59:30 INFO]: Running PAPER 1.14.4.
30.11 23:59:30 [Server] Startup [22:59:30 INFO]: BentoBox version: 1.9.0-SNAPSHOT-b1497
30.11 23:59:30 [Server] Startup [22:59:30 INFO]: Database: JSON
30.11 23:59:30 [Server] Startup [22:59:30 INFO]: Loaded Game Worlds:
30.11 23:59:30 [Server] Startup [22:59:30 INFO]: bskyblock_world (BSkyBlock): Overworld, Nether, End
30.11 23:59:30 [Server] Startup [22:59:30 INFO]: Loaded Addons:
30.11 23:59:30 [Server] Startup [22:59:30 INFO]: BSkyBlock 1.9.0 (ENABLED)
30.11 23:59:30 [Server] Startup [22:59:30 INFO]: Challenges 0.8.0-1.6.0 (ENABLED)
30.11 23:59:30 [Server] Startup [22:59:30 INFO]: Level 1.9.0 (ENABLED)
30.11 23:59:30 [Server] Startup [22:59:30 INFO]: Warps 1.8.2 (ENABLED)

Plugins (Optional)

Plugins (42): AsyncWorldEdit, AuthMe, BentoBox, ChatExpressions*, ChatInjector*, ChatReaction, Citizens, CommandNPC*, CoreProtect, CrazyCrates, CustomHeads*, Essentials, EssentialsChat, EssentialsProtect, EssentialsSpawn, FeatherBoard*, HolographicDisplays, Item2Chat, JukeBox, LibsDisguises, LiteBans, Lottery, MOTD, MVdWPlaceholderAPI*, NerfPhantoms, NoPoppyDrop*, NoteBlockAPI, PermissionsEx*, PlaceholderAPI, PlugMan, PremiumVanish, ProtocolLib, ShopGUIPlus, StaffChat, SuperTrails*, TAB, Vault, VoidSpawn, WildStacker, WorldEdit, WorldGuard, zAuctionHouseV2*

Additional context (Optional)

I just wish it was more optimized since we are hoping to release soon.
Timings report: https://timings.aikar.co/?id=44a7e66448a2413c8cfb79a907bba8d7#plugins
the last section was where the lag was.
[BentoBox::Task: world.bentobox.bentobox.blueprints.BlueprintPaster$$Lambda$4258/17429650 (interval:1)]

Ignore the PlugMan

@tastybento
Copy link
Member

I see from the timings, it is taking 6 seconds to paste and taking 40ms of each tick. That looks like a pretty big island? Anyway, you need to lower the pasted blocks per second in BentoBox's. Here's the default:

paste-speed: 128

Maybe reduce it by half and see if that helps. You may need to reduce it to 40 or so. That will cause pasting to take longer though.

@ghost
Copy link
Author

ghost commented Nov 30, 2019

image
it is this island and i'll reduce it now, see if it helps

@ghost
Copy link
Author

ghost commented Nov 30, 2019

image
there it is [look in chat]

@tastybento
Copy link
Member

What did you reduce the paste number to?

@ghost
Copy link
Author

ghost commented Nov 30, 2019

64, half of the original

@ghost
Copy link
Author

ghost commented Dec 1, 2019

just tried 40 and same results

@tastybento
Copy link
Member

check the timings and share. Also, try a lower number even, say 32. You have a Nether and End right? Those are also being pasted.

@ghost
Copy link
Author

ghost commented Dec 1, 2019

@tastybento
Copy link
Member

Okay, so from that report the scheduler is taking:

12,745.57ms per - 9.50ms/0.00 per tick

i.e., about 13 seconds paste all the islands and each async bit is 9.50ms, which is less than the tick length of 20ms. You can reduce the paste number even further if you like. Alternatively, start at 1 and then move up until the maximum acceptable TPS hit.

@tastybento tastybento self-assigned this Dec 1, 2019
@Poslovitch Poslovitch transferred this issue from BentoBoxWorld/BSkyBlock Dec 1, 2019
@Poslovitch Poslovitch added Status: In progress Working on the issue. Type: Question Question or issue related to configuration, API or features. labels Dec 1, 2019
Poslovitch added a commit that referenced this issue Dec 1, 2019
Should help mitigate issues such as #1051 for new servers.
@ghost
Copy link
Author

ghost commented Dec 8, 2019

turns out it was just a bad host, thanks for ur help

@Poslovitch Poslovitch added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: In progress Working on the issue. labels Dec 12, 2019
@Poslovitch Poslovitch added the Type: Not a bug Works as intended / not a BentoBox bug. label Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Not a bug Works as intended / not a BentoBox bug. Type: Question Question or issue related to configuration, API or features.
Projects
None yet
Development

No branches or pull requests

2 participants