Bandwidth for php files has doubled. What could be the cause?

Bandwidth for php files has doubled. What could be the cause?

by Ted O'Neill -
Number of replies: 4
I have a support request in with our Moodle provider, but would appreciate any additional help or insight. I do not have access to the server, php, etc. I do have admin access to Moodle itself.

Of course, with COVID our usage is up, but our bandwidth is through the roof and we are exceeding our limits. Looking at AWL stats comparing year on year for the same month, I get this:

May 2019 (full month)
php Hits=2,011,538 73.8 % Bandwidth=19.84 GB  approximately 85kb per php hit

May 2020 (1st-19th; classes started 11 May)
php Hits=2,983,758 70.6 % Bandwidth=56.72 GB approximately 160kb per php hit

We upgraded from Moodle 3.3 to 3.5 in between.

Provider's theory. A very small number of instructors are using the WebRTC to embed audio and video. But this is a handful of classes with very few students out of 1,000 students total. The audio and video embeds are not getting massive views--often just a few. And looking at the page source, those seem to be served as ogg and webm. AWL stats shows those file formats as minimal use of bandwidth.

UPDATE/EDIT: A few teachers have started using the Chat module. Could that really be the culprit?

That is all that has changed on our type of usage/tools/etc.

Any ideas why php is blowing up like that? Thank you!
Average of ratings: -
In reply to Ted O'Neill

Re: Bandwidth for php files has doubled. What could be the cause?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
By "bandwidth" I assume you mean the amount of data that has been downloaded from your site in a given month?

I'm struggling to understand how you are conflating the number of hits (on php files presumably) with the amount of data transferred. It just means more data was transferred. For example, bigger files were downloaded...
In reply to Howard Miller

Re: Bandwidth for php files has doubled. What could be the cause?

by Ted O'Neill -
I don't mean to conflate them. The number of hits is for comparison year on year to indicate the amount of use by students. Yes, I understand it means that more data was transferred. I'm trying to isolate the problem. Just "php" is opaque. The breakdown by filetype pdf, pptx, mp3, etc. doesn't show me clearly where to fix things. I have reduced the maximum file size, but if we reduce it much more it will become very difficult to use. Thanks for any suggestions.
In reply to Ted O'Neill

Re: Bandwidth for php files has doubled. What could be the cause?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Do you have any log analytics available to you? The difficulty with Moodle is that pretty much everything goes through a PHP script (even/especially file downloads).

It wouldn't take much. It only needs someone (for example) to load a massive banner image in a heavily used course....
In reply to Ted O'Neill

Re: Bandwidth for php files has doubled. What could be the cause?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators

On the "statistics" front you need more data. The monthly numbers for the months May to April at a minimum. Better the same numbers from the previous year.

BTW, could you explain the second number 70.6% in "php Hits=2,983,758 70.6 % Bandwidth=56.72 GB approximately 160kb per php hit"? Also, what are the tool and the method which give you these numbers?

On the network traffic side, there is no tool in the core to measure the traffic each learning material or activity has caused. If you have all the logs, it might be possible with a custom reporting tool. Check with the people doing Analytics and reporting https://moodle.org/mod/forum/view.php?id=8044.