Need Apache optmization for reduce RAM usage

cbu

Active Member
Aug 17, 2013
28
0
1
cPanel Access Level
Website Owner
I have a Linux VPS. This VPS is Apache+Nignx. The Apache global configuration uses default settings. Its Wordpress blog uses a W3total cache (disk enhanced cache, disk HTML, JS, CSS minify, XCache for database caching, browser cache and CDN) with cloudflare.

A few months ago I have 5,000 daily page preview, this month it reduced to 3,500 daily levels. But my VPS RAM memory usage doesn't reduce in peak and off peak time. If there are only 8-15 active visitors on all the sites (according to Google analytic) VPS RAM usage more than 1GB.

How do I optimize Apache in this situation without reducing my performance?

These are its information.

  • OS:- Cent OS v6.4
  • Apache version: -Apache/2.2.26 (Unix)
  • Apache run back end Nginx (nginx admin v4.4) backend.
  • Two active wordpress site.
  • RAM:- 2.5GB (guaranteed)
  • CPU:- Two CPU (Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz)
  • PHP 5 Handler: fcgi
  • Default PHP Version (.php files) 5
  • Apache suEXEC: on
  • Apache Ruid2: off
  • PHP memory_limit :- 128M
  • max_execution_time:- 60
  • MySQL memory allocated 7%
  • Zend optimizer installed
  • Zend Guard Loader enabled.
  • Zend Memory Manager enabled
  • Zend Signal Handling disabled.

Apache Global Configuration.
fileetag: None
keepalive: On
keepalivetimeout: 3
maxclients: 150
maxkeepaliverequests: 100
maxrequestsperchild: 10000
maxspareservers: 10
minspareservers: 5
root_options: ExecCGI, FollowSymLinks, IncludesNOEXEC, Indexes, SymLinksIfOwnerMatch
serverlimit: 256
serversignature: Off
servertokens: ProductOnly
sslciphersuite: ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP:!kEDH
startservers: 8
timeout: 300
traceenable: Off

Top memory usage:- top.png (highlighted each cPanel user names)

This is my httpd.conf:- httpd.conf - Pastebin.com
This is my nginx (global) :- Nginx global configuration. - Pastebin.com

This is Apache status (off peak time).

Parent Server Generation: 0
Server uptime: 40 seconds
Total accesses: 29 - Total Traffic: 38 kB
CPU Usage: u.12 s0 cu0 cs0 - .3% CPU load
.725 requests/sec - 972 B/second - 1341 B/request
1 requests currently being processed, 9 idle workers
Server uptime: 13 minutes 45 seconds
Total accesses: 266 - Total Traffic: 633 kB
CPU Usage: u1.12 s.09 cu0 cs0 - .147% CPU load
.322 requests/sec - 785 B/second - 2436 B/request
1 requests currently being processed, 8 idle workers
According to webpagetest.org my sites average page loading time is 4 seconds (full load 7 seconds) and 480 ms First Byte Time.

In this situation how do I reduce my RAM usage?

Any help really appreciate.
 
Last edited: