mpratt wrote:
I will try to keep a watchful eye and let this ride without reloading httpd and see what happens now. It seems like I never have a swap of zero. There is always at least a swap of 5 out of 250. So I don't know if that is to be expected or a swap of zero is what we are shooting for. I have noticed prior to tuning that any swap in the double digits seems to spell impending trouble.
I wouldn't worry about a small non-zero swap value - most of my machines have a small single digit value. In fact, even a larger value is fine as long as it's not causing actual swapping (e.g., you could have some process space forced out to swap but if it's not part of your working set, it'll just sit there). It's just that looking at the swap value is a quick way to judge.
You could run "vmstat 1" for a short while and check the swap columns. Unless you're getting large values there (which in turn will likely reflect large I/O wait percentages in the top display, though other disk access can contribute to that latter number) I wouldn't sweat the actual swap space usage.
For longer term monitoring, heavy swap will pump up the disk I/O graphs on the Linode manager, but those combine all disk accesses. If you use a monitoring took (e.g., munin or equivalent) you can watch I/O specifically to your swap device over time.
But that's fine tuning, and you can go a long way by just setting conservative Apache parameters, hitting your site with enough parallel test queries with "ab" (use a URL that invokes your entire application stack) and observing memory usage with top to make sure you always have a little free (allocated to cache) and that your machine remains responsive for management purposes.
Quote:
So I am less perplexed and now more focused on lowering the httpd process amount. If I may ask another question, is the httpd process amount not only a function of the apache configuration and modules, but is it also a function of the software I am running as well--namely the bloated drupal site?
Depends on your configuration. In a default mod_php setup, then yes, your entire application stack (memory and CPU) - well, sans database - is going to count against the httpd process, since mod_php runs inside of the Apache process. If you're using other mechanisms (such as fastcgi which runs php in a separate process) then your drupal application stack will count against that process, and not Apache's httpd.
Also be aware that in both cases, such processes may come and go (Apache recreates when it uses a single child process for the set maximum number of requests, not sure about php-fpm's pool management), so over time there isn't necessarily a single process that will accumulate all your aggregate stats.
Quote:
I have another specific question, but I don't know if I should ask it here or in another thread. But here it goes, anyways, since it is related to decreasing resource load. Since I am using nginx as reverse proxy to serve static files, is it redundant to use something like drupal's boost which serves html files to anonymous users?
I'm not familiar with boost, but if nginx is handling the static requests without ever proxying them to Apache/drupal, then it seems like it would be redundant yes. Of course, this assumes you are properly configured to capture all possible static files in nginx (e.g., a consistent URL prefix to identify them or something) so I'm not sure it hurts all that much to leave such support enabled on the drupal side - if it's never used I suspect it's impact is small. Unless of course there's a bunch of configuration/management associated with it, or a large memory footprint required even when not used, that you'd like to avoid.
-- David