I have installed open edX koa on a cloud server with (7GB Ram and 2 dedicated cpu) and I use that server only for open edX but I think open edX is using a lot of memory
I have only 137M free memory !
{
total used free shared buff/cache available
Mem: 6.6Gi 5.2Gi 137Mi 0.0Ki 1.3Gi 1.1Gi
}
I have already found this on the web but it did not solve my problem
{ # Added in the following to /edx/app/edxapp/lms_gunicorn.py
max_requests =1000
max_requests_jitter =60
# Added in the following to /edx/app/edxapp/cms_gunicorn.py
max_requests =500
max_requests_jitter =60
}
How can I reduce the memory usage ( I only need lms and cms for now without other services like ecommerce)
The easiest way to conserve startup memory is to reduce the number of LMS and CMS gunicorn workers via the EDXAPP_WORKERS ansible variable. This is assuming you installed Koa via the native installation procedure - is that correct? Once you set that variable, you’ll need to run the playbooks again.
The default is 4 * the number of cores for the LMS, and 2 * the number of cores for the CMS. For you, that means the default is lms: 8, and cms: 4. You may want to hard-code that to lms: 4 and cms: 2, and see if it helps.
@tomg10, alright. It’s time to see what’s taking up so much of your memory. How familiar are you with Linux CLI tools for this purpose? Personally, I’m a fan of htop and atop (both of which you’ll have to apt install - they’re not there by default).
Also, can you tell how much is being taken up by the kernel cache, and how much by actual process resident memory? It’s normal for the cache to fill up to almost all available physical RAM.