Hi all, so I recently tried the psrecord step on Streamlit’s blog and found out that for a single user my app uses a maximum of 150-200Mb which is reasonable (correct me if I’m wrong and you think it’s unreasonable).
HOWEVER, I’m curious to know how memory scales. Does that mean that only 5 users can use the app at one given moment (does it scale linearly; 200x5 = 1GB), or does it not scale at all and all the users’s processes are independent of each other?
It will entirely depend on your app. While there is some universal overhead, how your specific app scales will depend. How much you import from GitHub and how much caching you have will consume resources regardless of concurrent users. The more you load into session state, hold in variables, or perform computations will create an increase in consumption highly dependant on concurrent users.
@mathcatsand Interesting. So just as a general figure, if the app is using 200MB per session (as shown in the plot), does the mean it can only be used by ~ 5 users simultaneously before it peaks the resource limit?
I am unclear exactly how the 1GB “resource limit” combines hard disk vs compute vs RAM in the determination. So glossing over that detail, if your app consumes 200MB when a single user is active, then 5 would be a lower bound of concurrent users. The more of that 200MB goes into general overhead (constant files on disk; stuff stored in cache), then the less the incremental cost I would expect per user.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.