How does ProMods calculate the Server load

You can talk about anything here (but respect the rules)
Posts: 5
Joined: 22 Aug 2017 10:13
Location: Portugal

05 Jul 2019 08:30

Just a random question I got. How does ProMods calculate the Server load? :?: I know you need to have some knowledge of web creation and programming, as a current undergraduate in Computer Engineering it would be interesting to know

User avatar
Posts: 218
Joined: 24 Dec 2016 22:15
Donation rank:
Location: Wellington

05 Jul 2019 11:29

Basically we know what our provider allocates in terms of bandwidth for each server in the load balancer pool - if we have lets say 4 servers that our provider states can do 500Mbit each we know technically in the pool we've got 2Gbit of bandwidth. Our provider also states that each server may burst their bandwidth.

So, I pull the current network interface speed using System Activity Report (Sysstat) from our servers every minute or so, add them together and then work out a percentage figure of "load" based on the bandwidth we should have from our provider. As there are no scripting languages installed on the web servers that host the free downloads (keeping these as light as possible to handle as many connections as possible) this is done with good ole bash scripting.

This does mean you'll see figures over 100% (or even 300% like the other day) but it gives a crude figure of how much bandwidth our servers have available (or not) so people know the download may be slower than normal if it is bursting over 100%.

We also use Debian Linux on our servers - this is rather lightweight and so the actual server load doesn't go above around 10% at all times on these servers since they're only serving static content behind a bunch of rules behind Cloudflare. This is important as without Cloudflare and these rules, one user who is using a download accelerator can indeed peak the actual CPU load on a given server making it unable to allocate a connection for somebody else also wanting that download. We do hit this problem every now and then but this is when the "Server Load" on the homepage is well above 100% anyway.

Perhaps we should rename this from "Server Load" to "Network Load" ;)
Promods Server Administrator

Posts: 5
Joined: 22 Aug 2017 10:13
Location: Portugal

05 Jul 2019 22:05

Thank you! It was an intereseting read for a student like me!

Moderators can close this post if they wish
Last edited by bmwGTR on 06 Jul 2019 11:32, edited 1 time in total.
Reason: remove quote, please do not quote the post above yours

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests