Open edX performance profiling

Hello!
Our edX instance sometimes works very slow. It takes up to 7 minutes to get a response from it. But sometimes it works pretty well.

Here is some output from our server:

root@vmi125644:~# grep 'model name' /proc/cpuinfo
model name	: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
model name	: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
model name	: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
model name	: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
root@vmi125644:~# nproc
4
root@vmi125644:~# cat /proc/loadavg
0.03 0.19 0.30 1/543 2438
root@vmi125644:~# egrep --color 'Mem|Cache|Swap' /proc/meminfo
MemTotal:       12303680 kB
MemFree:         3778424 kB
MemAvailable:    3949540 kB
Cached:           521096 kB
SwapCached:       169044 kB
SwapTotal:       1953120 kB
SwapFree:         658608 kB

And here is htop status. (I’m unable to attach an image to post since I’m a new user)

So it looks pretty good, isn’t it? Could you help me figure out where to start looking for performance issues?

Thanks a lot.

It’s not so great statistics. Edx is a platform with many separate services working together and consuming resources and also they are always hungry. Your memory information report shows that the system has been out of memory at least for a while and so it has forced to use swap which is very slow and not recommended. In our case we have assigned 30 GB of memory to our server but it’s still lower that what should be. I suggest you to setup a new server and separate your MySQL server and MongoDB server. Also ES is a powerful memory eater so it’s a good idea to give it a dedicated machine too. I’m not sure but I heard that edx.org is distributed on over 50 virtual machines (which is not so many because of their high traffic). After that you can use monitoring services like Zabbix to monitor your servers and mange your resources.

Thanks a lot for your response. We are a small team and have not a lot of traffic. So I’m trying to figure out is migration to a new server required or not.

Here are some more details: website is working perfectly well for students, but it works slow (sometimes) for administrators. It takes up to 5-6 minutes to load a page (as I mentioned above).

Anyway: I understood your point, it’s better to migrate for a server with more resources.

According to the official documentation for a running edx-plaform server with a few hundreds of registered students you need at least 8GB of memory. For production envs you have to increase resources until you achieve a stable status. so it’s your job to decide if it’s necessary to migrate or not.