2

The output of top

Tasks:  68 total,   1 running,  67 sleeping,   0 stopped,   0 zombie
Cpu(s): 96.0%us,  3.7%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st
Mem:   3840492k total,  1175776k used,  2664716k free,    27248k buffers
Swap:        0k total,        0k used,        0k free,   316212k cached

3202 www-data  20   0  796m 301m 4272 S 49.5  8.0  14:07.96 apache2
2769 www-data  20   0  796m 302m 4256 S 48.1  8.1  14:34.19 apache2

Also when I press C during top it shows this

(wsgi:oursite.com)  -k start
(wsgi:oursite.com)  -k start

The rest of the processes use relatively small amounts in lower single digit percentages. And of some of the relevant(?) info from apache2.conf

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5

I'm running Django with mongodb as my database. Does anyone have any suggestions or strategies for figuring out why it's using so much CPU or how to reduce it? At the moment all the site is doing is querying a DB and getting a list of images. Nothing too computational. It makes the AJAX request every second

user1561753
  • 69
  • 1
  • 6

1 Answers1

1

I would recommend you start with mod_status to see what is happening behind the curtain:

This looks like a nice and simple guide.

Falcon Momot
  • 25,244
  • 15
  • 63
  • 92
JeanPijon
  • 11
  • 1