We have a CF8 web application that can be run in two modes: Database or Static file. Under heavy load, the Database mode out performs the Staticfile mode noticeably. And I am trying to figure out why.
First some context:
We run Solaris Zones & Oracle; ColdFusion 8, 32 bit, w/ JRun 4
In database mode, all data is obtained from an external database server running Oracle 10g.
In Static file mode, all the data needed for the app to function are generated ahead of time from the DB, and placed on the web server running CF, and called in via CFINCLUDE.
During a load test where virtual users perform per-defined actions repeatedly, in DB mode we were able to run 31600 sessions (in CDATA table), while in static file, it was 25900 sessions. This is over the course of 60 mins. The average time to complete an iteration (login, perform action, logout), in DB mode is 22 seconds, and in static file mode is 33 seconds. Max java heap usage was ~ 800MB in DB mode, ~ 700 MB in static file mode.
Here is why I would expect static file to be better:
- Data is on the same server; only operation is file I/O. The files have already been generated earlier.
- There is no additional network traffic to the DB servers and back.
Any ideas on why this might be? Where can I look (or ask the respective admins - DB, OS, App) to look to see why this might be?
Thanks!
KM
It's most likely because you're saving on the latency of accessing the disks. The Oracle DBMS will keep everything it can in the buffer cache so you may be doing very little disk access except right at the start. You'd also have to compare the relative speed of the disk sub-systems. Companies will spend a lot on a fast disk array for a DB server that they won't spend on an application server.