What happened?
I'm experiencing high CPU usage, causing server lag. 190 players on averageDEDICADET:
12 RAM
CPU(s): 4
Model name: Intel(R) Xeon(R) E-2286G CPU @ 4.00GHz
CPU MHz: 4008.000
How to Reproduce?
Just leave 190 Players online or more.Relevant log output
Lua:
[08/10/2021 10:33:08]
Thread: 1 Cpu usage: 87.9966% Idle: 11.9939% Other: 0.00951842% Players online: 0
Time (ms) Calls Rel usage % Real usage % Description
193882 2940 73.44309% 64.62740% std::bind(&Game::checkCreatures, this, (index + 1) % EVENT_CREATURECOUNT)
15537 1971 5.88570% 5.17922% std::bind(&Game::executeDeath, &g_game, getID())
13137 482199 4.97641% 4.37907% std::bind(&Game::checkCreatureWalk, &g_game, getID())
10705 5418 4.05517% 3.56841% std::bind(&LuaEnvironment::executeTimerEvent, &g_luaEnvironment, lastTimerEventId)
6467 1023 2.44980% 2.15574% std::bind(&Game::checkDecay, this)
4875 7959 1.84684% 1.62515% functor
4125 46177 1.56265% 1.37508% &Game::playerSay
3064 82369 1.16082% 1.02148% std::bind(&Game::updateCreatureWalk, &g_game, getID())
3020 114524 1.14436% 1.00699% std::bind(&Game::checkCreatureAttack, &g_game, getID())
2138 3539 0.80999% 0.71277% std::bind(&Game::playerUseWithCreature, this, playerId, fromPos, fromStackPos, creatureId, spriteId)
2009 15701 0.76137% 0.66998% &Game::playerUseWithCreature
1043 237 0.39509% 0.34767% std::bind(&GlobalEvents::think, this)
1002 29616 0.37976% 0.33417% &Game::playerMove
583 143084 0.22106% 0.19453% std::bind(&ProtocolGame::parsePacketFromDispatcher, getThis(), msg, recvbyte)
403 13273 0.15301% 0.13464% &Game::playerSetAttackedCreature
264 5474 0.10034% 0.08830% std::bind(&Spawn::scheduleSpawn, this, spawnId, sb, interval - NONBLOCKABLE_SPAWN_INTERVAL)