Russ Thompson on 17 Jan 2012 13:28:51 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Tuning Apache/PHP memory use...


Doug,

Thanks for the information.  I'm with you on the database storage of cache, not a fan of that design at all.  

In Paul's case since memory is an issue, I would move to the disk based solution or alternatively setup Apache disk caching which can be dropped in fairly easily and just requires an Apache reload to activate.

It could be a lot of different issues but some potential things to look at:

Apache - potentially too many threads being spawned for the amount of memory available.
Kernel/Sysctl - modified rmem/wmem settings causing high memory usage per connection.
mySQL - Caching is too aggressive (would need to see show global status to determine).
Drupal Caching potentially too aggressive (although I haven't played with Drupal in years, not sure)
Memory leak (php/drupal).
Combination of factors above.

Chances are you can find ways to save memory.  Most Linux installs come bloated (even many server installs), tuning is very helpful.  Disabling services, getty terminals etc.  In addition the Kernel is bloated these days, recompiling from source and removing the bloat is always beneficial.

-Russ

On Tue, Jan 17, 2012 at 4:05 PM, Douglas Muth <doug.muth@gmail.com> wrote:
On Tue, Jan 17, 2012 at 3:49 PM, Russ Thompson <vigornj@gmail.com> wrote:
>
> Is Apache currently exhaustion of all physical memory?  Honestly going in
> the route of caching is very desirable, assuming you have some memory to
> spare.  Apache has built in caching through modules (afaik) mod_mem_cache
> and mod_disk_cache.  However the preferred method is generally Squid or
> Varnish.  It will certainly improve load times and performance.
>
> I'm also not familiar with your application, so it's a bit difficult to
> judge.
>

I can fill in a couple of the gaps there.  Drupal actually does its
own caching.  Normally, the cached pages are stored in the database
(ick), but the third-party Cache Router module
(http://drupal.org/project/cacherouter) can stored cached data on disk
in serialized format.

The original poster is almost certainly using MyISAM.  Drupal has a
history of not playing nice with InnoDB, specifically with the way it
handles sessions. (Though I'd love to hear if anyone had success with
InnoDB under Drupal.)

-- Doug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug