Referencia
Informe de rendimiento (spark)
Informe del profiler spark de sofyCore con 200 jugadores en Paper 26.3, junto al mismo servidor sin plugins. TPS, tiempo por tick, CPU y árbol de llamadas.
Este informe sale de spark, el profiler que usa la mayoría de servidores de Minecraft para medir el lag. Pusimos en marcha dos servidores con el mismo mundo, los mismos 200 jugadores y el mismo tráfico: uno con sofyCore y todos sus módulos activos, y otro sin plugins. spark registró cada uno desde el servidor vacío, pasando por la entrada de los jugadores y cinco minutos de carga completa, hasta que todos salieron.
Durante la carga completa los jugadores chatean, envían mensajes privados y usan comandos, unas 50 acciones por segundo en todo el servidor.
TPS con carga
20,0020,00
igual que Paper sin plugins
Tiempo por tick (mediana)
16,3ms+4,1ms
con todos los módulos activos; queda libre el 59 % de cada tick de 50 ms
Margen antes del lag
24,4ms18,3ms
libres incluso en el 5 % de ticks más lentos
CPU
0,8núcleos+0,6núcleos
para rangos, chat, scoreboard, bossbars, nametags, moderación y staff a la vez
Hilo principal
2,0 %
lo que ocupa sofyCore, medido por spark
Desconexiones
00
13.938 acciones de jugadores sin errores
Duración del tick durante todo el perfil
Valores que spark registra cada 10 segundos. La línea discontinua es el límite de 50 ms a partir del cual un servidor empieza a tener lag.
- Profiler
- spark 1.10.196 · muestreo async cada 4 ms
- Servidor
- Paper 26.3-257-d81ca50 (MC: 26.3)
- Perfilado
- 7 min 42 s · 9221 ticks
- Jugadores
- 200 jugadores · 13.938 acciones de jugadores · con carga durante 5 min
- Hardware
- AMD Ryzen 5 8600G w/ Radeon 760M Graphics · 6 hilos de CPU · 4 GB RAM
- Java
- Eclipse Adoptium 25.0.5
Estadísticas por minuto
spark agrupa el perfil en ventanas de un minuto. En gris, Paper sin plugins; a continuación, Paper + sofyCore (CPU: núcleos que añade).
| Minuto | TPS | MSPT mediana | MSPT máx. | Jugadores | CPU (núcleos) |
|---|---|---|---|---|---|
| 1 | 20,0020,00 | 0,20,3 | 1,01,5 | 00 | 0,00,1 |
| 2 | 20,0020,00 | 18,421,7 | 65,764,8 | 200200 | 1,0+0,5 |
| 3 | 20,0020,00 | 15,320,5 | 50,161,2 | 200200 | 0,8+0,5 |
| 4 | 20,0020,00 | 14,418,3 | 52,456,0 | 200200 | 0,8+0,5 |
| 5 | 20,0020,00 | 13,919,6 | 46,249,7 | 200200 | 0,7+0,5 |
| 6† | 19,8819,79 | 4,511,9 | 603,4931,4 | 00 | 0,4+0,3 |
- †Se desconectan los 200 jugadores al mismo tiempo, en los dos servidores.
Tiempo del hilo principal por origen
Parte del tiempo muestreado del hilo principal que corresponde al código de cada plugin. El resto es el propio servidor (Paper y Minecraft), incluido el tiempo que espera al siguiente tick.
- Servidor (Paper / Minecraft)97,8 %
- sofyCore2,0 %
- ViaVersion0,11 %
- spark0,06 %
- ViaBackwards0,00 %
Árbol de llamadas (Server thread)
Métodos que ocupan al menos el 0,5 % del tiempo perfilado. Haz clic en una fila para desplegarla. «Esperando al siguiente tick» es tiempo libre.
Thread.run()100,0 %
Thread.runWith()100,0 %
0x00000000230eedd8.run()100,0 %
MinecraftServer.lambda$spin$0()100,0 %
MinecraftServer.runServer()100,0 %
MinecraftServer.recordTaskExecutionTimeWhileWaiting()Esperando al siguiente tick65,0 %
LockSupport.parkNanos()63,7 %
Unsafe.park()63,7 %
so.Unsafe_Park()63,7 %
so.Parker::park()63,7 %
6.pthread_cond_timedwait()63,7 %
- native./usr/lib/x86_64-linux-gnu/libc.so.6()63,7 %
MinecraftServer.pollTask()1,3 %
PacketProcessor.executeSinglePacket()0,8 %
- PacketProcessor$ListenerAndPacket.handle()0,8 %
- MinecraftServer.pollTaskInternal()0,5 %
MinecraftServer.processPacketsAndTick()34,9 %
DedicatedServer.tickServer()34,6 %
MinecraftServer.tickServer()34,6 %
MinecraftServer.tickChildren()34,6 %
ServerLevel.tick()25,1 %
ServerChunkCache.tick()21,1 %
ChunkMap.tick()12,1 %
ChunkMap.newTrackerTick()12,1 %
ServerEntity.sendChanges()6,3 %
ChunkMap$TrackedEntity.sendToTrackingPlayers()6,0 %
ServerCommonPacketListenerImpl.send()6,0 %
ServerCommonPacketListenerImpl.send()6,0 %
Connection.send()5,9 %
Connection.sendPacket()5,6 %
SingleThreadEventExecutor.execute()5,6 %
SingleThreadEventExecutor.execute0()5,6 %
SingleThreadEventExecutor.execute()5,6 %
SingleThreadIoEventLoop.wakeup()5,6 %
EpollIoHandler.wakeup()5,6 %
Native.eventFdWrite()5,6 %
so (deleted)._init()5,6 %
6.eventfd_write()5,6 %
- 6.__write()5,6 %
ChunkMap$TrackedEntity.moonrise$tick()5,7 %
ChunkMap$TrackedEntity.updatePlayer()5,4 %
CraftPlayer.canSee()2,2 %
HashMap.containsKey()2,1 %
- HashMap.getNode()2,1 %
ChunkMap.isChunkTracked()1,3 %
RegionizedPlayerChunkLoader.isChunkSent()1,3 %
- LongOpenHashSet.contains()1,3 %
- ReferenceOpenHashSet.add()1,1 %
ServerChunkCache.tickChunks()6,9 %
ServerChunkCache.tickChunks()6,9 %
ServerChunkCache.tickSpawningChunk()5,2 %
NaturalSpawner.spawnForChunk()5,2 %
NaturalSpawner.spawnCategoryForChunk()4,3 %
NaturalSpawner.spawnCategoryForPosition()4,1 %
EntityGetter.getNearestPlayer()1,9 %
EntityGetter.getNearestPlayer()1,9 %
- Entity.distanceToSqr()0,7 %
NaturalSpawner.isValidSpawnPostitionForType()1,3 %
NaturalSpawner.canSpawnMobAt()0,7 %
NaturalSpawner.mobsAt()0,7 %
ChunkGenerator.getMobsAt()0,6 %
EnvironmentAttributeReader.getValue()0,6 %
EnvironmentAttributeReader.getValue()0,6 %
EnvironmentAttributeSystem.getValue()0,6 %
EnvironmentAttributeSystem$ValueSampler.getValue()0,6 %
- EnvironmentAttributeSystem$ValueSampler.computeValuePositional()0,6 %
NaturalSpawner.createState()1,2 %
0x0000000023863ac8.query()0,9 %
ServerChunkCache.getFullChunk()0,9 %
0x00000000241e4ae0.accept()0,8 %
NaturalSpawner.lambda$createState$0()0,8 %
EnvironmentAttributeReader.getValue()0,7 %
EnvironmentAttributeReader.getValue()0,7 %
EnvironmentAttributeSystem.getValue()0,7 %
EnvironmentAttributeSystem$ValueSampler.getValue()0,7 %
EnvironmentAttributeSystem$ValueSampler.computeValuePositional()0,7 %
0x00000000236a08c0.applyPositional()0,6 %
EnvironmentAttributeSystem.lambda$addBiomeLayerForAttribute$0()0,6 %
BiomeManager.getBiome()0,6 %
- Level.getNoiseBiome()0,5 %
ChunkMap.tick()1,1 %
ChunkMap.processUnloads()1,1 %
ChunkHolderManager.autoSave()1,1 %
NewChunkHolder.save()1,1 %
NewChunkHolder.saveEntities()1,0 %
ChunkEntitySlices.save()0,9 %
ChunkEntitySlices.saveEntityChunk()0,9 %
ChunkEntitySlices.saveEntityChunk0()0,9 %
Entity.save()0,8 %
Entity.saveAsPassenger()0,8 %
Entity.saveAsPassenger()0,8 %
Entity.saveWithoutId()0,8 %
- Entity.addAdditionalSaveData()0,5 %
RegionizedPlayerChunkLoader.tick()0,9 %
- RegionizedPlayerChunkLoader$PlayerChunkLoaderData.updateQueues()0,7 %
EntityTickList.forEach()2,6 %
0x000000002386e1b8.accept()2,6 %
ServerLevel.lambda$tick$0()2,6 %
Level.guardEntityTick()2,3 %
0x00000000241fcb90.accept()2,3 %
ServerLevel.tickNonPassenger()2,3 %
ServerPlayer.tick()0,9 %
- AbstractContainerMenu.broadcastChanges()0,5 %
AbstractHorse.tick()0,8 %
Mob.tick()0,8 %
LivingEntity.tick()0,8 %
AbstractHorse.aiStep()0,6 %
Animal.aiStep()0,6 %
AgeableMob.aiStep()0,6 %
Mob.aiStep()0,5 %
- LivingEntity.aiStep()0,5 %
ActivationRange.activateEntities()1,3 %
Level.getEntities()1,2 %
EntityLookup.getEntities()1,2 %
ChunkEntitySlices.getEntities()1,0 %
- ChunkEntitySlices$EntityCollectionBySection.getEntities()1,0 %
DedicatedServer.tickConnection()7,1 %
MinecraftServer.tickConnection()7,1 %
ServerConnectionListener.tick()7,1 %
Connection.tick()6,8 %
ServerGamePacketListenerImpl.tick()6,6 %
ServerGamePacketListenerImpl.tickPlayer()6,2 %
ServerPlayer.doTick()5,0 %
Player.tick()4,4 %
LivingEntity.tick()4,2 %
Player.aiStep()3,8 %
LivingEntity.aiStep()3,4 %
Player.travel()2,6 %
LivingEntity.travel()2,6 %
LivingEntity.travelInAir()2,6 %
LivingEntity.handleRelativeFrictionAndCalculateMovement()2,5 %
Entity.move()2,4 %
Entity.setPos()1,9 %
Entity.setPos()1,9 %
Entity.setPosRaw()1,9 %
ServerWaypointManager.updateWaypoint()1,3 %
- ImmutableSet.copyOf()0,7 %
- ServerWaypointManager.updatePlayer()0,5 %
Entity.absSnapTo()1,1 %
Entity.absSnapTo()1,1 %
Entity.setPos()1,1 %
Entity.setPosRaw()1,1 %
- ServerWaypointManager.updateWaypoint()0,7 %
CraftScheduler.mainThreadHeartbeat()1,9 %
CraftTask.run()1,8 %
0x0000000023ac6758.run()sofyCore0,5 %
- BukkitChatModule.a()sofyCore0,5 %
Informe completo
Los dos perfiles que registró spark, con todas sus muestras, para que los abras en su propio visor.
- Paper + sofyCoresofycore-paper-26.3-200-players.sparkprofile· 4,4 MBDescargar perfil
- Paper sin pluginspaper-26.3-200-players.sparkprofile· 3,5 MBDescargar perfil
Descarga un perfil y arrástralo al visor de spark. Verás el informe completo: todos los hilos, el árbol de llamadas entero, las estadísticas por minuto y la memoria y el GC del servidor.
Abrir el visor de sparkCómo leerlo
- TPS: 20 es el máximo. Un servidor por debajo de 20 TPS tiene lag.
- ms por tick (MSPT): lo que tarda el servidor en procesar cada tick. Por debajo de 50 ms el servidor mantiene 20 TPS; cuanto más bajo, más margen queda para más jugadores, mundos y plugins.
- Tiempo del hilo principal por origen: cuánto del trabajo del hilo principal corresponde a cada plugin. Es la misma vista «Sources» que muestra el visor de spark.
- Árbol de llamadas: en qué gasta el tiempo el hilo principal, método a método, tal como lo muestrea spark.
Mide tu propio servidor
spark viene incluido en Paper, así que puedes perfilar tu servidor con sofyCore en unos segundos:
spark profiler start
# espera unos minutos con jugadores conectados
spark profiler stopspark te da un enlace a su visor con el informe completo.