How to know how much storage was occupied by a Python/Django application?

Asked

Viewed 43 times

1

I developed a web application with Python and Django. I would like to limit the amount of space used for each user, because in the application it is possible to insert images and documents.

I use Postgres as DBMS.

How do I know the amount of storage occupied by a user in Python and Django?

  • Including all overhead that DBMS uses or only net user data?

  • Both cases, overhead and also net data.

  • Start studying here: https://www.postgresql.org/docs/current/storage.html. You will need to study in depth.

  • According to Django’s documentation, storing images in the DBMS is not a good idea, Heim!

  • I am only storing the image address on SGBD @Sidon

  • So why worry about space? if you need to worry about it or there is something wrong or the system is unviable. :-)

  • Because as I described in the question, I want to LIMIT the space of every user that uses my system. Unless you provide me with a server with unlimited, free storage space, then worrying about space is indispensable :-) @Sidon

  • You quoted the DBMS, and the space occupied by strings in the DBMS is insignificant, it should not be limited to this space but climb if necessary. Now... if you’re talking about the storage space on the File System, that’s another story, the quotas of space per user should be determined by the Infra admin and not by your app and, finally, If you are storing image type artifacts in the same FS in which you deploy your app, I suggest rethinking the strategy, tb is not a good idea.

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.