Commenting on Monitoring Per-Process Memory Usage with Munin
If you've got an OpenID, you should use it to log in below. You'll be automatically registered, no fuss. And that means you won't have to wait for your comment to be moderated. You'll also be able to edit your comments.
Replying to:
-
Thanks for sharing the plugin, looks like it will come in handy for diagnosing some memory issues I'm dealing with myself.
As to your problem, was FCGI really that big a win? Deployment of php apps with apache mpm-prefork + mod_php is incredibly well understood, and it is the default and best tested approach for most opensource PHP apps. You've traded that for a bunch of troubleshooting. Judging from your graphs, once you get things smoothed out, you'll save, what, 20MB? I guess that's something on a VPS with 224MB of memory, but even then, its maybe a 25% increase in memory available for cache and buffers?
I took a different approach on my VPS. I set up nginx to serve static files and reverse proxy everything else to apache + mod_php. Its still nonstandard, but Apache + mod_php does what its good at, and nginx does what it is good at, and the interface between the two is simple. After the initial config, I've had to do very little fussing.
The config could be even simpler if I'd forgone serving the static files with nginx, which is not as important as it would seem, because apache hands off everything (static files, dynamically generated HTML, etc) to nginx, which buffers it, leaving Apache free to move on to a new request.
I think apache should provide an easy option of using a hybrid configuration. One of their threading or polling servers as a front end, handling static files, buffering dynamic requests, redirects, etc, and prefork for mod_php, etc.
eas
Thu, 17/12/09 – 9:06am
Reply