htop is a great tool for viewing the basics of what a server is doing, in particular the real-time CPU and memory graphics. However, the colors in the bar graphs can make it difficult to distinguish between CPU tasks being executed (low-priority, normal, kernel and virtualiz), and the type of memory in use (used, buffers and cache).
In this case, the “no-color” option can be used which causes the bar graphs to use characters instead of colors for sub-categories.
% htop -C
I recently rebuilt the server for dalescott.net after a drive failure. When complete, it seemed ERPNext wasn’t as snappy as before.
My final conclusion was, at the time, the server was likely being subjected to a penetration attack. The server commonly has spikes of 1K+ penetration attempts in a 24hr period, which tend to occur sporatically in clusters. However reivewing server performance was still a useful exercise.
dalescott.net SaaS Architecture
The host server is a Intel Core2 CPU 6600 2.40GHz with 6GB of RAM. The VirtualBox vm running ERPNext is a single-core with 2GB RAM (essentially taking one core and 2GB from the host).
Load At Rest
Below is the virtual machine and host server when at rest (no logged-in ERPNext users, and no on-going brute-force ssh or web app login attempts). The vm load (top) is 3% and the host (bottom) server cores are 5% and 2% (the 2% core is the erpnext server).
Load When Stressed
Below is the server when an ERPNext user logs in and accesses an Item list. The vm load (top) has maxed out at 100% and is using half its available memory. On the host (bottom), core #2 is almost 70% (erpnext), but core #1 is only 35% and only half the total available memory is being used, which is good.
Clearly ERPNext is processor-constrained in this situation, but at least under normal server load is still very suitable for either presentations or training with a limited number of concurrent users.