-2

I need some advice as I have a VPS OpenVZ with 1GB Ram and 1GB burstable. I am running a site on wordpress and my site users are about 2000 per day. My DB size is about 90MB and I am using latest wordpress 4.2.2. I have a problem that my site is consuming all the ram on my server. I tried by re-installing the whole server and after restore it again went in to same state. I analyzed that before reinstallation the most of the memory was consuming by mysqld service and turning off that service cool down the ram and now after reinstallation apache server is consuming the memory and httpd service could not stop. Please tell me what should I do to resolve the issue. My top commands results are as following.

top - 14:49:04 up 24 min,  2 users,  load average: 1.84, 1.89, 2.51 
Tasks:  88 total,   2 running,  86 sleeping,   0 stopped,   0 zombie 
Cpu(s): 28.3%us,  4.1%sy,  0.0%ni, 67.6%id,  0.0%wa,  0.0%hi,  0.0%si, 0.0%st 
Mem:   1048576k total,  1047576k used,     1000k free,        0k buffers 
Swap:  1048576k total,   917004k used,   131572k free,    54892k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND 
 3439 apache    20   0  375m  39m 3860 S 34.5  3.9   0:02.79 httpd  
 3663 apache    20   0  378m  42m 3816 S 20.0  4.1   0:01.22 httpd  
 1254 mysql     20   0 1672m  19m 2980 S 16.6  1.9   1:15.50 mysqld  
 3942 apache    20   0  375m  35m 3604 R 14.5  3.5   0:01.36 httpd  
 3930 apache    20   0  375m  36m 3788 S 11.0  3.6   0:00.91 httpd  
 3407 apache    20   0  369m  33m 3572 S  1.4  3.3   0:01.93 httpd  
 3844 apache    20   0  375m  39m 4036 S  1.4  3.9   0:00.95 httpd  
 3652 apache    20   0  375m  39m 4044 S  0.7  3.9   0:02.57 httpd 
 4144 root      20   0 15028 1016  724 R  0.7  0.1   0:00.01 top
    1 root      20   0 19236   24   24 S  0.0  0.0   0:00.01 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd/183
    3 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper/183   
  129 root      16  -4 10644    0    0 S  0.0  0.0   0:00.00 udevd   
  479 root      20   0  243m  340  140 S  0.0  0.0   0:00.13 rsyslogd   
  498 named     20   0  308m 1188  592 S  0.0  0.1   0:00.67 named   
  519 root      20   0 66220  184  128 S  0.0  0.0   0:00.02 sshd   
  527 root      20   0 21720    4    4 S  0.0  0.0   0:00.00 xinetd   
  562 root      20   0 11312  280  280 S  0.0  0.0   0:00.01 mysqld_safe   
  692 root      20   0 19268  120  120 S  0.0  0.0   0:00.00 dovecot   
  694 dovecot   20   0 12988   80   80 S  0.0  0.0   0:00.00 anvil   
  695 root      20   0 13116  116  116 S  0.0  0.0   0:00.00 log   
  706 root      20   0 98388  116  116 S  0.0  0.0   0:00.14 sshd   
  708 root      20   0 66404    0    0 S  0.0  0.0   0:00.00 saslauthd   
  709 root      20   0 66404    0    0 S  0.0  0.0   0:00.00 saslauthd   
  785 root      20   0 80860  184  104 S  0.0  0.0   0:00.03 master   
  793 postfix   20   0 80940  136   76 S  0.0  0.0   0:00.00 pickup   
  794 postfix   20   0 81124  112  112 S  0.0  0.0   0:00.00 qmgr   
  796 nobody    20   0  164m  140   52 S  0.0  0.0   0:00.01 proftpd   
  804 root      20   0  340m 1424  208 S  0.0  0.1   0:02.91 httpd   
  813 root      20   0 20024  324  248 S  0.0  0.0   0:00.00 crond   
  825 root      20   0 21108    0    0 S  0.0  0.0   0:00.00 atd   
  947 root      20   0 12892  316  316 S  0.0  0.0   0:00.06 bash  
 2519 root      20   0 15028  556  556 S  0.0  0.1   0:00.08 top  
 3192 apache    20   0  369m  33m 3540 S  0.0  3.3   0:05.06 httpd  
 3196 apache    20   0  372m 5048 3476 S  0.0  0.5   0:01.92 httpd  
 3204 apache    20   0  375m  38m 3492 S  0.0  3.7   0:02.17 httpd  
 3392 apache    20   0  375m  37m 3464 S  0.0  3.7   0:01.02 httpd
1
  • 1
    Are you having an actual problem with performance or something? Or would you just prefer your server waste more RAM? May 18, 2015 at 19:40

2 Answers 2

1

Are you experiencing any site performance issues? The thing with Linux is that it's not a bad thing for top to show that all your RAM is in use. Try giving us the output of free -m. When an application is finished with the memory it used, the kernel doesn't immediately purge the pages of data and mark it as free memory again. For instance, my desktop VM I have running right now shows that I have 7.9G / 8.0G RAM used in top. However, if I run that free command, I can see that I have 1.2 GB used and 6.7 cached.

So again I ask, have you noticed a performance degradation or is your only concern top showing you've used too much RAM?

0

WordPress uses a lot of RAM - and cpu. There's not much to do, than to upgrade your server if you want to continue using WordPress. The alternate could be to use another system for your server, or get someone to code your website. In that way, the RAM-usage will not be as high - if the coder does his job right, of course.

Not sure if this helped, but that's what I have experienced with WordPress. It makes your whole site much slower than if it was self-coded.

Thank you,

Marcus.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .