Drupal 7 site experiencing slow execution/load time for first page visit and slower execution/load time for login. The web server and database servers are dedicated and well resourced, the site has no traffic currently.
Settings already in place
- JS/CSS compression enabled
- Cron is run via crontab every hour and disabled in Drupal
- Cache warming 2 times a day with min, max cache expiry time at 1 day for anon
- APC is set to 192MB and using about half memory
- Database is on another dedicated box lots of RAM
- Update manager disabled
- Content translation disabled
- No missing modules
Setup info
- About 100 modules: 70 contrib, 30 custom
- Drupal core and modules are on NFS server
- apc.stat=1 , apc.stat_ctime=Off, apc.ttl=3600
- php.ini - realpath_cache_size=512k
- settings.php - database set via IP (not hostname)
- Mysql - query_cache_size no effect with both enabled or disabled
- Mysql - innodb_flush_log_at_trx_commit =2
- Mysql - innodb_buffer_pool_size=4G #current DB is 100mb total
DB queries are < 110 ms. XHprof snapshots below.
Update1: Login after few silent hours
Update2: Update.php XHprof timing
Update: NFS info
%nfsstat -m Flags: rw,nosuid,nodev,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=xx.xx.xx.xx,mountvers=3,mountport=xxxx,mountproto=udp,local_lock=none,addr=xx.xx.xx.xx
Any suggestions to improve load times?
Update 3: Cache configurations in settings.php When I enable and run test for cache and APC cache using Drupal's Testing module. I get fatal errors with "Class 'Database' not found"
I am using APC cache module, below are my settings. Is something wrong with this config. APC has 192MB and used about 110MB
/****
* APC Caching.
****/
$conf['cache_backends'][] = 'sites/XYZ/modules/apc/drupal_apc_cache.inc';
// cache - is used for all common cache purposes. is a default cache bin for Drupal.
$conf['cache_class_cache'] = 'DrupalAPCCache';
$conf['cache_class_cache_admin_menu'] = 'DrupalAPCCache';
// cache_block - is used for storing block's cache
$conf['cache_class_cache_block'] = 'DrupalAPCCache';
$conf['cache_class_cache_bootstrap'] = 'DrupalAPCCache';
$conf['cache_class_cache_field'] = 'DrupalAPCCache';
// cache_filter - is used for storing filtered input
$conf['cache_class_cache_filter'] = 'DrupalAPCCache';
// cache_form - is used for storing forms.
// This cache bin should not be assigned to volatile storage
//$conf['cache_class_cache_form'] = 'DrupalAPCCache'; // use Database
//$conf['cache_class_cache_image'] = 'DrupalAPCCache';
$conf['cache_class_cache_libraries'] = 'DrupalAPCCache';
// cache_menu - is used for storing assembled and processed menu
$conf['cache_class_cache_menu'] = 'DrupalAPCCache';
// cache_page - is used to store cached pages
//$conf['cache_class_cache_page'] = 'DrupalAPCCache';
$conf['cache_class_cache_path'] = 'DrupalAPCCache';
$conf['cache_class_cache_path_breadcrumbs'] = 'DrupalAPCCache';
// cache_update - if module Update status' is enabled this
// bin stores Drupal, modules and themes update information.
$conf['cache_class_cache_update'] = 'DrupalAPCCache';
//$conf['apc_show_debug'] = TRUE; // Remove the slashes to use debug mode.
/*****
* Contributed module cache
****/
// Browscap module
$conf['cache_class_cache_browscap'] = 'DrupalAPCCache';
// Entity cache module
// This will cache items in Database when not pointed to another cache
// There is no way to disable this caching for particular entity, it is
// all or nothing, erasing the potential little benefit for enabling this
// module for caching entity_user to increase performance of web services
/*
//$conf['cache_class_cache_entity_comment'] = 'DrupalAPCCache';
//$conf['cache_class_cache_entity_file'] = 'DrupalAPCCache';
//$conf['cache_class_cache_entity_node'] = 'DrupalAPCCache';
//$conf['cache_class_cache_entity_taxonomy_term'] = 'DrupalAPCCache';
//$conf['cache_class_cache_entity_taxonomy_vocabulary'] = 'DrupalAPCCache';
$conf['cache_class_cache_entity_user'] = 'DrupalAPCCache';
*/
//Panels module
$conf['cache_class_cache_panels'] = 'DrupalAPCCache';
// Registration module
//$conf['cache_class_cache_entity_registration'] = 'DrupalAPCCache';
//$conf['cache_class_cache_entity_state'] = 'DrupalAPCCache';
//$conf['cache_class_cache_entity_type'] = 'DrupalAPCCache';
// Rules module
$conf['cache_class_rules'] = 'DrupalAPCCache';
// Token module
$conf['cache_class_cache_token'] = 'DrupalAPCCache';
// View module
$conf['cache_class_cache_views'] = 'DrupalAPCCache';
//$conf['cache_class_cache_views_data'] = 'DrupalAPCCache';
// Default DB for the ones that change too frequently and are small
$conf['cache_default_class'] = 'DrupalDatabaseCache';
// THIS MUST BE SERVED FROM DB FOR STABILITY
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';