I've been wondering what the average memory usage for a Drupal 6 is. I've been working on installing APC and testing cache systems like Varnish, but I see that my site still consumes the same amount of memory when loading a page.
I have 150 modules enabled on my production site, testing with devel module I get:
Page execution time was 1677.15 ms. Executed 462 queries in 301.65 milliseconds.
Memory used at: devel_init()=0.72 MB, devel_shutdown()=48.46 MB.
These results are with only Drupal basic cache enabled, no external cache.
I'd Like to know if these numbers are OK for an out of the box Drupal site, and if things like Varnish really help reduce these numbers.
Thanks for any feedback
Comments
Please post your
Please post your settings.
You should see a vast improvement with APC.
If you are going for a 'high
If you are going for a 'high performance' site I would say 1677 ms is very high, ideally you'd want to be well under 1000 ms, say at least between 500 ms and 750 ms - but that's all relative anyways since every site's needs are unique. Also, 'out of the box' and 150 modules enabled don't really describe the same Drupal site. Any one of those modules could be consuming an unnecessary amount of memory or making unnecessary database calls. If you drill into the 'devel' performance you settings you should be able to see what the most time consuming processes/functions are – since these may not even implement caching properly, making your choice of cache backend moot.
APC will prevent php
APC will prevent php recompiling on every page load, but it will not affect the memory your application uses to run. The effect should be an overall improvement in page time since it reduces the overhead of compiling php. However, once the code is compiled and drupal loads up (i.e. what devel displays), it should not make a difference in the time reported or memory usage.
APC helps reduce memory usage
APC does reduce memory consumption.
The first process after Apache is restarted would use more memory as it loads all the PHP files and compiles them. However, subsequent processes, will be smaller in size considerably.
You can see how much APC saves memory in this article:
Memory usage revisited: when Open Buffet is not to blame.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Well, I stand corrected.
Well, I stand corrected. Thanks for the great link @kbahey. I guess you can't really separate the php compilation steps from the rest of the application.
Results from recent site
Here are the results from a recent site we were tuning for a client. It is a somewhat complex site, Drupal 7 and Commerce, with lots of modules.
This is the effect of APC:
With APC disabled:
APC enabled
The difference is peak memory speaks for itself.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
kbahey, do you care to show
kbahey, do you care to show the execution time of these two results?
Thanks!
When Solr is eliminated from
When Solr is eliminated from the picture (stubbed out in /etc/hosts), then we get the following figures:
First access:
Page execution time was 1401.16 ms. Memory used at: devel_boot()=6.54 MB, devel_shutdown()=112.22 MB, PHP peak=113.25 MB.
Subsequent accesses:
Page execution time was 645.71 ms. Memory used at: devel_boot()=2.15 MB, devel_shutdown()=55.74 MB, PHP peak=56.75 MB.
Memory is less because Solr fails and therefore all the operations on the result set fails (node lookups, rendering, themeing, ..etc.)
Don't count on these figures as canon, they are specific to this site.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.