Forum OpenACS Q&A: Response to Is OpenACS extremely slow?

Posted by carl garland on
I think the main reason to point out here in concern to what is the difference in resource usage between AOLserver/OpenACS vs Apache/PHP is to understand the underlying architecture.

Apache works in a forking model which create/destroy new processes as needed. PHP stores no cache information (in memory ... it does in files) at all so each page execution requires merely the weight in memory of the apache process.

AOLserver/OpenACS on the other hand has hundreds of procs that are compiled into each interpeter and an extensive cache which expands during the course of an aolserver process life to speed up its dynamic execution. The memory allocation scheme of AOLserver is such that any time it needs more memory for potential new cache items it determines if there is any free memory left since last allocation and then if not creates a new block of memory to use until that is used up. This is a *zippy* fast memory allocator but also has a high level mark indicator for its footprint meaning that a process can only grow not shrink over time. According to Amadahl's law the bottleneck of any system determines overall throughput. Since memory is faster than disk it was determined to take advantage of this fact but heavily using the memory of a system to improve performance.

AOLserver was built to handle large load efficiently but requires memory for this. OpenACS adds the datamodel, interface to that model on top of AOLserver speeding application development. You very well could duplicate this architecture on Apache but would require a substantial amount of effort.

Anyway as a side note I did alot of development on an AOLserver/Postgres backed site on a celeron with 32 Meg of RAM couple years ago and worked pretty fast/well if tuned to minimum settings. The extra layer of OpenACS though is too much of a footprint to not use more ram.