Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Memory usage question
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Memory usage question

DalCompDalComp Member
edited December 2012 in General

Sorry if I'm such a noob. This is my first VPS, which has been running for 2 months.

I have not seen all 2GB of RAM consumed (1.5GB+0.5GB burst). Normally it's 600MB or less. It's OpenVZ for some wordpress sites.
Is my usage actually consuming everything? Any idea how to fix it?

 top - 14:46:44 up 2 days, 16:19,  1 user,  load average: 1.28, 1.35, 1.46
Tasks:  86 total,   3 running,  82 sleeping,   1 stopped,   0 zombie
Cpu(s): 13.4%us,  4.9%sy,  0.0%ni, 77.2%id,  4.5%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2097152k total,  2049992k used,    47160k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3972 apache    15   0  112m  83m 6048 S  0.0  4.1   3:37.11 httpd
29889 apache    15   0 82328  54m 5088 S  0.0  2.7   0:04.88 httpd
18225 apache    15   0 70332  48m 5604 S  0.0  2.4   0:11.59 httpd
17844 apache    15   0 69980  48m 5712 S  1.3  2.4   0:10.49 httpd
 1177 apache    15   0 73776  48m 5364 S  0.0  2.4   0:06.49 httpd
17640 apache    15   0 70440  48m 5856 S  0.0  2.4   0:09.44 httpd
18291 apache    15   0 70476  48m 5880 S  0.0  2.4   0:12.26 httpd
16190 apache    15   0 69664  47m 5816 S  0.0  2.3   0:16.17 httpd
17532 apache    15   0 69520  47m 5760 S  0.0  2.3   0:10.85 httpd
16303 apache    15   0 69060  47m 5996 S  0.0  2.3   0:31.08 httpd
20379 apache    15   0 69096  47m 5752 S  0.0  2.3   0:13.24 httpd
22259 apache    15   0 68892  47m 5588 S  0.0  2.3   0:10.60 httpd
22295 apache    15   0 68756  47m 5692 S  0.0  2.3   0:07.58 httpd
19624 apache    15   0 69080  47m 5472 S  0.0  2.3   0:08.23 httpd
19915 apache    15   0 68928  46m 5328 S  0.0  2.3   0:11.55 httpd
20420 apache    15   0 68792  46m 5576 S  0.0  2.3   0:07.52 httpd
20328 apache    15   0 68288  46m 5612 S  0.0  2.3   0:07.74 httpd
26460 apache    15   0 67928  45m 5528 S  0.0  2.2   0:07.55 httpd
22032 apache    15   0 67892  45m 5000 S  0.0  2.2   0:06.63 httpd
20014 apache    15   0 67204  45m 5356 S  0.0  2.2   0:26.87 httpd
26309 apache    15   0 67000  45m 5472 S  0.0  2.2   0:06.38 httpd
28234 mysql     16   0  162m  43m 4964 S 15.7  2.1  20:03.40 mysqld
 5900 apache    15   0 63848  40m 5336 S  0.0  2.0   0:04.80 httpd
22329 apache    15   0 61076  39m 5788 S  0.0  1.9   0:12.02 httpd
32185 apache    15   0 61828  39m 5508 S  0.0  1.9   0:06.29 httpd
11523 apache    16   0 60724  39m 5832 S  0.0  1.9   0:03.35 httpd
 3072 apache    15   0 60568  39m 5796 S  0.0  1.9   0:10.73 httpd
 3130 apache    15   0 61292  39m 5564 S  0.0  1.9   0:03.62 httpd
 9335 apache    15   0 60388  39m 5776 S  0.0  1.9   0:06.87 httpd
 7294 apache    15   0 59844  38m 6020 S  0.0  1.9   0:25.72 httpd

Comments

  • It looks like there are many httpd processes running. It also looks like mysql is quite busy. Is your site experiencing a lot of traffic?

  • DalCompDalComp Member
    edited December 2012

    @Damian said: It looks like there are many httpd processes running. It also looks like mysql is quite busy. Is your site experiencing a lot of traffic?

    No. New sites, less than 200 visitors daily.
    SolusVM says it's been since 20.00 (GMT-8) last night.

  • can i see output from

    free -m
  • DalCompDalComp Member
    edited December 2012

    @arieonline said: can i see output from

                 total       used       free     shared    buffers     cached
    Mem:          2048       1887        160          0          0          0
    -/+ buffers/cache:       1887        160
    Swap:            0          0          0
    
  • You need to tune your apache configure. Too many idle apache processes.

  • DalCompDalComp Member
    edited December 2012

    @smile93 said: You need to tune your apache configure. Too many idle apache processes.

    After restarting apache it's quite stable below 600MB. But I'm afraid it might spiked again.
    Will be looking to configure these idle apache processes. Wouldn't refuse a hint, though.

  • maybe a httpd flood

  • You need to take a look at your Apache configurations as well as MySQL.
    Too much WordPress plugins will also leads to such situation.

  • Use nginx! (jk) But in all reality it would have probably done a little better with memory, especially with the number of httpd workers that you have spawned...

    If you are running WP, it's probably one of the plugins that's the culprit. Apache default settings are enough to handle 200 visitors daily.

  • It looks like he is hitting the cap on memory which is causing apache to freak out and run ultra slow, thus causing a backlog of processes. Change your keepalive timeout to 5 seconds and that should help a little.

Sign In or Register to comment.