Upgrading or Switching
Dragonfly public view
Build local server
Tips and Tricks
Rules & Regulations
v9 Developer's Manual
v10 Developer's manual
|2.8: Server/Resource impact
How much does it use?
Dragonfly uses more CPU and memory then simple webforms because it runs thru a pre-processor (PHP)
Pre-processor code like asp, php and perl is similar to plain coding in C, Pascal or ASM which means they still have to be processed/compiled to get it to work.
Since it needs to be processed, php uses memory and cpu to compile and execute the code. This document will explain the difference between CMS's and PHP setups so you know "how much" Dragonfly is using.
CGI or MOD
There are 2 ways to run PHP: CGI and as Module.
When your server runs PHP as CGI it will use more CPU then as Module due to the overhead of executing PHP upon each request. If PHP is loaded as Module inside the HTTP daemon like Apache it is only executed once when Apache starts and will stay in memory to prevent constant loading of PHP and reduces the overhead.
Most hosting providers use PHP in CGI mode because it is somewhat difficult to properly modify PHP inside Apache without adding security risks (mainly due to lack of setuid knowledge).
PHP vs PHP
That's right -- there is a difference in PHP files on how each way works.
Dragonfly aims to be #1 and #3 BUT #1 will only work if you have write access to the /cache/ directory.
So how does that work?
- Embed code in documents (fast)
- Echo documents (slower)
- Use templates (slowest)
We use themes and each theme consists of many images and template files. As you can see in #3 we must load variables, process the template file, and then finally display the merged result.
By using the /cache/ directory, Dragonfly only has to process the template file once and then stores a #1 compatible file inside the cache and loads that file instead for fast processing.
Due to this we reduce the the CPU load on a server drasticly, but this does mean a correct setup of the server.
There are many Operating Systems around but the best known are FreeBSD, Linux and Windows. To get the most speed out of your server it is advised to choose FreeBSD or Linux since they are faster in disk drive handling then Windows which results in faster loading of your webpage.
Also, if you or your host has the money it is advised to be on a SCSI drive instead of IDE, again due the speed especially for the database handling.
As mentioned above MySQL and PostgreSQL need many disk access for reading, searching and writing so a fast drive is essential for heavily visited websites. Second, if this occurs, it's best to have the databases on a seperate hardrive (NOT partition) to prevent huge sector positioning on the drive.
If your SQL server CPU goes pretty high then turn on the cache capabilities of your SQL server (if it has such available).