Well, to be specific, I'm running my own content management system running on Linux Apache2 MySQL PHP server. The system is comparable to Linux kernel w/ modules.
--(request start)--
The system launches his "init" script that takes care of dependency-based module loading (only minimum modules are loaded, in proper order, so it "just works", but nothing else (disabled/unused modules are not loaded)).
Once the system is ready, request processing comes in - all the data gets loaded, parsed, processed, buffered, chewed and so on, until we have a complete (x)HTML page.
--(request end)--
Once the request is processed, the data are passed to browser and the system is killed. All this happens in a very short time, but the most cpu-intensive is the beginning part (preparating system for use).
I have a few options:
- Let system be in a way it's now (and risk performance issues after it's deployed for REAL usage (approx. 100-500 requests/s per system))
- Do some kind of preloading (preparing the system manually and not let anything magic happen then)
- Find a way to keep the system in ready-for-use state (all modules loaded, classes initialized, ready MySQL link, etc.)
Question is:
- Is there a way to accomplish point 3? (point 2 is what I want the least)
- If it's possible, how?
Thanks for any advices that'll point me right way!