I decided to do a quick run at writing a mongrel handler to do 
the work of the radiant cache - turns out there is zero performance
gain in doing so. 

Modifying the mongrel handler to serve up html files using xsendfile, I get:
          2014 bytes                    534.96 [#/sec] (mean)
          2916 bytes                    532.33 [#/sec] (mean)
         11918 bytes                    517.82 [#/sec] (mean)
        101920 bytes                    414.64 [#/sec] (mean)
       1001922 bytes                    189.68 [#/sec] (mean)

Adding in the overhead of reading the cache metadata however, slows the handler 
back down:
          2014 bytes                    160.34 [#/sec] (mean)
          2916 bytes                    151.10 [#/sec] (mean)
         11918 bytes                    159.20 [#/sec] (mean)
        101920 bytes                    147.14 [#/sec] (mean)
       1001922 bytes                    104.51 [#/sec] (mean)

Those are pretty much exactly the same figures as I could pump out of radiant 
without a custom mongrel handler. So it looks like there's no advantage in 
moving the cache logic into mongrel.

(I also tried changing from yaml metadata to Marshall metadata, but that 
also made no difference). 

And just for comparison, figures for radiant where mod_x_sendfile is not used:
          2014 bytes                    161.23 [#/sec] (mean)
          2916 bytes                    151.79 [#/sec] (mean)
         11918 bytes                    147.70 [#/sec] (mean)
        101920 bytes                    110.64 [#/sec] (mean)
       1001922 bytes                     35.62 [#/sec] (mean)

And serving up the same pages as raw html with apache:
          2014 bytes                   2264.03 [#/sec] (mean)
          2916 bytes                   2341.65 [#/sec] (mean)
         11918 bytes                   2251.93 [#/sec] (mean)
        101920 bytes                   1609.84 [#/sec] (mean)
       1001922 bytes                    565.91 [#/sec] (mean)


(Note these figures are for my hardware - AMD Sempron 3000, 1gb RAM, 
7200rpm SATA disks in a raid1 array - the actual figures aren't 
important here, just the differences)

_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to