archived-bot icon indicating copy to clipboard operation
archived-bot copied to clipboard

Player throttling

Open freyacodes opened this issue 9 years ago • 3 comments

It's a known fact that FredBoat sometimes suffers from extreme load causing the bot to stutter since it can't process music fast enough.

I want to create a system that throttles a number of players being actively used based on the CPU usage of the nodes.

I'm thinking the bot would reject new players from starting if the average node CPU usage is >98%. Paused players should be given a grace period of a few minutes to not introduce a fear of losing the right to play music when pausing.

If access is rejected the bot would instead send a message explaining the situation and how they can help.

freyacodes avatar Jan 07 '17 18:01 freyacodes

IDEA: make thread that constantly reads CPU usage...

knight-ryu12 avatar Jan 08 '17 02:01 knight-ryu12

Lavaplayer already does this for the remote nodes I am interested in.

freyacodes avatar Jan 08 '17 10:01 freyacodes

Info for anyone touching this in the future: check the NodesCommand class on how to access information from the nodes

schnapster avatar Mar 20 '17 16:03 schnapster