Question

Managed Postgres & Django Rest Framework - High CPU load low CPU Usage

Posted April 3, 2021 375 views
ApacheDjangoDigitalOcean Managed PostgreSQL DatabaseDigitalOcean Droplets

Dear DO Community,

Regardless of whether it is the managed Postgres DB or my DRF droplets, it seems like the load average is very high while the cpu usage is still reasonable. This is true regardless of whether I am using $5 droplets, or $45 Premium Intel Droplets.

My Apache Max Keep Alive is set to 500 (up from 100, and there is some improvement). Are there any other variables that I need to remember to check? Thanks!

Load Testing wise, I am only getting around 3.5 RPS ($5 droplet) with both Locust / Apache and the load average already spikes up to 5-6 while cpu usage is maxed out. I am getting around 21RPS with the $45 Droplet. However, the RPS decreases quickly when I decrease the frequency of calls per client from every second to every 10 seconds and increase the number of clients by 10. I am doing this because I plan on running my IOT business with this setup and the devices will only call every 10 seconds (maybe even less frequently if it is too expensive). Is this normal? Thanks.

Is there something that I may be doing wrong? I am also getting around 10-20 random error messages for whatever reason in the apache log. Is that normal and should I ignore them? Thanks!

The attached are screenshots of my load testing. Thanks in advance.
(Top left is $45 droplet, and some screenshot include my $5 droplet at the bottom left terminal) (Some requests are directed to the LB( IP Adress 167....) and some are to the droplets themselves ($45: 12x…) ($5: 165…)
Google Drive Screenshot 1 (Locust load testing - $45 Droplet)

Thanks in advance.
Clement

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!