Hi all, (first of all, sorry for my english)
I'm start using Drupal and this is my setup:
Gentoo Linux 64bit with:
nginx
Fastcgi PHP-FPM
PHP 5.3
MySQL Server 5.1
xCache Opcode cache
Drupal 7.9 with heavy / large modules ... (views, panels, display suite, entity API ... etc) using the InnoDB engine.
Quad-core Intel CPU
3x2GB (6GB) DDR3 RAM
500GB 7200rpm SATA HD
In this machine, plus the installation of Drupal, there are also a OpenX Ad Server 2.8 (myisam engine & memcached).
I'm trying to have the best performance with current hardware, so far I have no problem with OpenX but yes with drupal ...
If you turn ON page cache, get timeouts often with little load on the server ... I do not understand that can happen, if it's like a module or something waits in a loop. My idea was initially put up with drupal page cache and later use memcached to store caches...
Once the page is cached no problem of course....
Then I found the module entity cache, and with this module ON and page cache OFF pages load more slowly but stable without timeouts. make sense?
my traffic is all anonymous users, so a page level caching is the best solution I think, except for this problem of performance and I can not find the cause.
So...
the drupal page cache.... bypass the panels, views, entity caches....? I mean, do make sense to enable them if you use the system page cache?
cache stack (layers) ?
1) page cache
2) panels
3 ?) entity
4) views
is that correct?
makes sense for example, activate simultaneously entity cache, views and page caches? taking into account that 90% of traffic are anonymous users.
thank you very much for helping!!!!
Comments
See omega8cc for 'anonymous users' on nginx (cached)
Take the time to read the following links:
http://groups.drupal.org/node/157779
Link: https://github.com/omega8cc/nginx-for-drupal
2) Use APC - via http://drupal.org/project/apc
Then devote at least 800Mb to the APC cache: I use apc.shm_size = 1024M
Notes: Take your PHP Max Memory (memory_limit) and * 2 for APC
Statically compile APC into PHP-FPM
Using the APC D7 Module add the following:
$conf += array('cache_backends' => array('./sites/all/modules/apc/drupal_apc_cache.inc',),
'apc_show_debug' => FALSE,
'page_cache_without_database' => TRUE,
'page_cache_invoke_hooks' => FALSE,
'page_cache_maximum_age' => 3600,
'cache_lifetime' => 0,
'cache_default_class' => 'DrupalAPCCache',
'cache_class_cache' => 'DrupalAPCCache',
'cache_class_cache_block' => 'DrupalAPCCache',
'cache_class_cache_bootstrap' => 'DrupalAPCCache',
'cache_class_cache_content' => 'DrupalAPCCache',
'cache_class_cache_filter' => 'DrupalAPCCache',
'cache_class_cache_form' => 'DrupalAPCCache',
'cache_class_cache_menu' => 'DrupalAPCCache',
'cache_class_cache_page' => 'DrupalAPCCache',
'cache_class_cache_pathdst' => 'DrupalAPCCache',
'cache_class_cache_pathsrc' => 'DrupalAPCCache',
'cache_class_cache_update' => 'DrupalAPCCache',
'cache_class_cache_users' => 'DrupalAPCCache',
'cache_class_cache_views' => 'DrupalAPCCache',
'cache_class_cache_views_data' => 'DrupalAPCCache',
);
There is also a D6 cache_backport at http://drupal.org/project/cache_backport
3) Use Pressflow 7 - via https://github.com/pressflow/7
or Pressflow 6 - via https://github.com/pressflow/6
4) Read the reports: http://www.dynamiteheads.com/blog/jakub-suchy/migrating-your-site-pressf...
-and- http://stackoverflow.com/questions/4908736/is-drupal-7-slower-than-drupal-6
--
Linux: Web Developer
Peter Bowey Computer Solutions
Australia: GMT+9:30
(¯`·..·[ Peter ]·..·´¯)
Hi Peter,thank you very much
Hi Peter,
thank you very much for responding!!!
This is my xcache config, maybe you should increase the size of the cache?
xcache.admin.enable_auth="On"xcache.cacher="On"
xcache.size="64M"
xcache.count="2"
xcache.slots="8k"
xcache.ttl="0"
xcache.gc_interval="0"
xcache.var_size="8M"
xcache.var_count="1"
xcache.var_slots="8K"
xcache.var_ttl="0"
xcache.var_maxttl="0"
xcache.var_gc_interval="600"
xcache.readonly_protection="Off"
xcache.mmap_path="/dev/zero"
xcache.coverager="Off"
xcache.coveragedump_directory=""
xcache.optimizer="Off"
I had problems with APC and XCache works best for me. I only use it for php Opcode cache, anything else for.
I read that memcahed is better than APC as a backend for the drupal cache. I have memcached installed (512MB asigned) but I'm not using Drupal at the moment.
I've seen that the differences between drupal 7 and Pressflow 7 are minimal.
As I said I have not found bottleneck with page caching enabled and with a global low server load.
I found no module to know the runtime module level, only the full page. Exactly that module/part is causing such poor performance when creating the page cache on first access.
I enabled the mysql server slowqueries log but not record nothing
slow_query_log = 1
slow_query_log_file = / var / log / mysql / slow-queries.log
long_query_time = 2
I searched a lot but I have not found information on the use of different API cache systems at same time (views, panels, entity, page....). Recommendations to combine, for example...
thanks.
Xcache changes are good!
Hi pepejose,
The xcache.size="64M" is likely far to small!!
I (very) recently used and heavily tested xcache, and I had good results with this php.ini:
[xcache]
; Notes: Our 'xcache' is STATICALLY compiled into PHP
; ini only settings, all the values here is default unless explained
; select low level shm/allocator scheme implemenation
xcache.shm_scheme = "mmap"
; to disable: xcache.size=0
; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows
xcache.size = 896M
; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count = 4
; just a hash hints, you can always store count(items) > slots
xcache.slots = 128K
; ttl of the cache item, 0=forever
xcache.ttl = 7200
; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval = 900
; same as aboves but for variable cache
xcache.var_size = 128M
xcache.var_count = 4
xcache.var_slots = 128K
; default ttl
xcache.var_ttl = 7200
xcache.var_maxttl = 5400
xcache.var_gc_interval = 900
xcache.test = Off
xcache.experimental = Off
; N/A for /dev/zero
xcache.readonly_protection = Off
; for *nix, xcache.mmap_path is a file path, not directory.
; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
; 2 group of php won't share the same /tmp/xcache
; for win32, xcache.mmap_path=anonymous map name, not file path
xcache.mmap_path = "/dev/zero"
; leave it blank(disabled) or "/tmp/phpcore/"
; make sure it's writable by php (without checking open_basedir)
xcache.coredump_directory = ""
; per request settings
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off
[xcache.coverager]
; per request settings
; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)
xcache.coverager = Off
; ini only settings
; make sure it's readable (care open_basedir) by coverage viewer script
; requires xcache.coverager=On
xcache.coveragedump_directory = ""
I only switched to APC because I liked the idea of APC's in-built serialize() and unserialize() functions,
plus a few other atomic locking features only available in the latest APC vs Xcache.
Otherwise I love them both :-)
--
Linux: Web Developer
Peter Bowey Computer Solutions
Australia: GMT+9:30
(¯`·..·[ Peter ]·..·´¯)