Community

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Maeve_McCooey
Community Contributor

Storage Quotas - how do instructure convert bytes to MB, GB, TB, etc?

Jump to solution

Hi All,

I'm working on a root account level storage report to inform how storage is allocated to our courses/users and have ran into a few quandaries. Could anyone clarify how instructure convert bytes to MB, GB, TB, etc?

 would normally divide by 1,024 (to first convert to KB), and then divide by 1,024 again (to end up in MB). If I wanted to convert to gigabytes, you would divide by 1,024 three times (once to get to KB, once to get to MB, and then once to end up in GB).

There seems to be a substantial difference between what is reported in the Canvas data portal files_fact and what is reported within the system itself. 

It would also be greatly appreciated if any of you lovely Canvas community folk would like to depart their wisdom or advice on storage calculations or quotas.

Thank you in advance,

 @Maeve_McCooey ‌

1 Solution

Accepted Solutions
James
Community Champion

 @Maeve_McCooey ,

Canvas uses the number_to_human_size() function that is part of Ruby on Rails. The examples in the documentation show that it is not using the method common to hard drive manufacturers where they consider 1KB to be 1000bytes, but uses the 1KB=1024 bytes.

Without having more information, I wonder if it's an issue of certain things not counting against the quotas, but still showing up in the files. For example, assignment submissions do not count against the quota (generally).

You may find this blog and the ensuing discussion useful in understanding what is going on: https://community.canvaslms.com/groups/admins/blog/2017/10/16/course-storage-report-and-quotas 

View solution in original post

2 Replies
James
Community Champion

 @Maeve_McCooey ,

Canvas uses the number_to_human_size() function that is part of Ruby on Rails. The examples in the documentation show that it is not using the method common to hard drive manufacturers where they consider 1KB to be 1000bytes, but uses the 1KB=1024 bytes.

Without having more information, I wonder if it's an issue of certain things not counting against the quotas, but still showing up in the files. For example, assignment submissions do not count against the quota (generally).

You may find this blog and the ensuing discussion useful in understanding what is going on: https://community.canvaslms.com/groups/admins/blog/2017/10/16/course-storage-report-and-quotas 

Maeve_McCooey
Community Contributor

Thank you  @James  , that is really useful and a good discussion that addresses some issues we have encountered. You're right, we seem to be having difficulty of establishing what is counting against the quotas but it also seems like the storage quotas indicators in the system aren't reflective of the storage used (for example all users seem to have have 0% of 52.4 MB used). 

I have used the Canvas Data Portal files_fact to detail our storage usage and this is reporting that the size of files totals 145.07GB. The system, through root level statistics, is reporting file storage  of 172 GB Uploaded Files and 22.4GB in Media Files. Instructure have advised that deleted file sizes are not included in the file_fact file.

At the minute we are advising users to contact our support team to advise when they are approaching their storage limits, which are then increased incrementally on an individual basis. What I am attempting to do is get a picture of how storage is being used by users, groups and courses to inform how we will set quotas and allocate additional storage going forward. Do you know if I am using the wrong data file to establish this or if this is even possible to establish?



Thanks,
Maeve