minecrafter / RedisBungee

The leading player synchronization system for BungeeCord
https://www.spigotmc.org/resources/redisbungee.13494/
Eclipse Public License 1.0
157 stars 122 forks source link

Performance issue #39

Closed caoli5288 closed 8 years ago

caoli5288 commented 8 years ago

Hi. There is a cluster handle >5000 players with 5 bungeecord instance, redis-server process hit near 100% usage some often, led player count shown on ping-list very unstable. I do profiling with redis-faina and got those output,

Overall Stats
========================================
Lines Processed         6130745
Commands/Sec            77283.89

Top Prefixes
========================================
player          1376    (0.02%)
proxy           791     (0.01%)

Top Keys
========================================
82353fd280c66f12cbb97bcee9742436bc12eaff        3724    (0.06%)
redisbungee-data                                1182    (0.02%)
proxy:bungee-1:usersOnline                      445     (0.01%)
proxy:bungee-2:usersOnline                      240     (0.00%)
uuid-cache                                      165     (0.00%)
proxy:bungee-3:usersOnline                      106     (0.00%)
heartbeats                                      93      (0.00%)
cd3e910d736fd9b688896f2ab014943c64ed9c94        45      (0.00%)

Top Commands
========================================
EVALSHA         3769    (0.06%)
PUBLISH         1182    (0.02%)
HSET            1075    (0.02%)
SISMEMBER       440     (0.01%)
HMSET           330     (0.01%)
SREM            181     (0.00%)
HDEL            181     (0.00%)
SADD            165     (0.00%)

Command Time (microsecs)
========================================
Median          9410.0
75%             15512.0
90%             31177.0
99%             35909.25

Heaviest Commands (microsecs)
========================================
EVALSHA         78011941.5
PUBLISH         1053010.75
HSET            121188.0
SISMEMBER       50740.0
HMSET           32968.75
PING            21658.0
SREM            7867.0
HGETALL         7761.5

Slowest Calls
========================================
160504.25       "PUBLISH" "redisbungee-data" "{\"target\":\"8689c20f-7fdb-3777-b                                                                                        2b5-7a19e97d1604\",\"source\":\"bungee-1\",\"action\":\"SERVER_CHANGE\",\"payloa                                                                                        d\":{\"server\":\"BW-Lobby2\",\"oldServer\":\"Lobby11\"}}"
114051.0        "PUBLISH" "redisbungee-data" "{\"target\":\"4ab12c36-aabe-38ad-b                                                                                        4f1-f9f0144c312d\",\"source\":\"bungee-1\",\"action\":\"SERVER_CHANGE\",\"payloa                                                                                        d\":{\"server\":\"Lobby3\"}}"
109571.25       "EVALSHA" "82353fd280c66f12cbb97bcee9742436bc12eaff" "0" "Skywar                                                                                        s-10"
109020.25       "EVALSHA" "82353fd280c66f12cbb97bcee9742436bc12eaff" "0" "SG-9"
93490.75        "PUBLISH" "redisbungee-data" "{\"target\":\"1277fcc1-8d09-30e7-a                                                                                        3fe-111bae852c7e\",\"source\":\"bungee-1\",\"action\":\"SERVER_CHANGE\",\"payloa                                                                                        d\":{\"server\":\"BedWars-16-37\",\"oldServer\":\"BW-Lobby3\"}}"
92390.0         "EVALSHA" "82353fd280c66f12cbb97bcee9742436bc12eaff" "0" "Master                                                                                        Builder-14"
92299.25        "EVALSHA" "82353fd280c66f12cbb97bcee9742436bc12eaff" "0" "TheWal                                                                                        ls-14"
88056.0         "EVALSHA" "82353fd280c66f12cbb97bcee9742436bc12eaff" "0" "BedWar                                                                                        s-16-8"
minecrafter commented 8 years ago

Whoops - can you try the latest build?

caoli5288 commented 8 years ago

@minecrafter I'll try, THX:-)

caoli5288 commented 8 years ago

@minecrafter I'm sorry, you just remove RedisBungee#getPlayersOnServer but called in RedisBungeeListener, line 172 and 190.:-)

minecrafter commented 8 years ago

Fixed.

caoli5288 commented 8 years ago

@minecrafter I'll feedback someday after, good luck:-)

minecrafter commented 8 years ago

Closing since the issue is now fixed. Long-term, I can't keep gluing this thing together with ugly hacks - this plugin is in desperate need of a rewrite.