After literally years of wrestling with Apache performance tuning, I may have stumbled onto something that works for low-volume and even lower-resourced sites like this one.
I read through the httpd.conf file and noticed that I had the resource settings for the server set pretty high: I was creating a lot of listener clients, more than I needed, and the master process wasn’t killing them off very aggressively. It occurred to me I was setting things up to fail by picking (or simply defaulting to) arbitrary values.
So I simply noted how large a single httpd process was in memory — about 12 Mb — and divided that into the amount of RAM I have to work with. 256 / 12 = 21.3, but I need to set aside some memory for little things like the kernel and connection queues. I went with 13 clients.
Where I used to see:
May 21 09:20:00 red root: Watchdog checkfile detected: exiting
May 21 09:20:01 red root: Watchdog running: load of 11.11,
May 21 09:25:01 red root: Watchdog checkfile detected: exiting
May 21 09:25:01 red root: Watchdog running: load of 10.65,
May 21 09:30:00 red root: Watchdog checkfile detected: exiting
May 21 10:40:25 red root: Watchdog running: load of 11.56,
May 21 10:45:01 red root: Watchdog checkfile detected: exiting
May 21 10:50:01 red root: Watchdog checkfile detected: exiting
May 21 16:15:54 red root: Watchdog running: load of 12.21,
May 21 16:20:01 red root: Watchdog checkfile detected: exiting
I no longer have to deal with that.
Likewise, this:
May 19 11:05:29 red /kernel: swap_pager_getswapspace: failed
May 19 11:10:26 red /kernel: swap_pager_getswapspace: failed
May 19 11:10:44 red /kernel: swap_pager_getswapspace: failed
May 21 02:52:25 red /kernel: swap_pager_getswapspace: failed
May 21 04:18:29 red /kernel: swap_pager_getswapspace: failed
May 21 17:41:10 red /kernel: swap_pager_getswapspace: failed
And coincidentally(?) traffic volumes are up: mostly attempted spam, of course, but servicing more requests without adding any additional resources sounds good to me.