Best APC settings to reduce page execution time I have Drupal 7, apc with php-fpm and apache behind varnish and512 MB RAM.

I measure page execution time with devel module.

Database query time is low (62ms) compared to page execution time which is 854 ms.
That means there is problem with PHP and APC settings.

My current settings are just

apc.shm_size = 64
apc.stat=1 


How I can improve?

What are the best settings for Drupal given the above configuration?

Thanks
We run in a SVN push environment so we only clear the apc file cache with a script.

APC settings:

apc.ttl=604800
apc.user_ttl=3600
apc.shm_size=192M
apc.include_once_override=1
auto_globals_jit=Off
apc.num_files_hint = 2048

apc.stat_ctime = 0
apc.file_update_protection = 2
apc.stat = 0


PHP Script:

&lt;?php
$return = apc_clear_cache('opcode');
echo var_export($return);


604800 = 1 week.

After this, getting xdebug/xhprof up and running and doing a cache grind of the site should let you know what's slowing down the site. In short analyzing the cache grind output is the best way to speed up Drupal. Below I'm listing what patches and modules we use to speed it up; in your case it will be different most likely.

Drupal 6 Specific Answer Below

Once you get past this point and realize the APC isn't going to give you what your looking for, switch to pressflow and give these patches a whirl:


Core - Cache module_implements() 
Imagecache - use lock.inc instead of a file lock
Views - views_get_default_view() - race conditions and memory usage 
Views - Persistent caching for unpack_options() calls from building displays


Also try some of these modules as they improved our sites speed in a big way:


Imageinfo Cache
Advanced CSS/JS Aggregation