|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-10-09 20:00 UTC] basantk@php.net
Description: ------------ On Unix platforms, APC can be compiled with mmap or shared memory. This performs good for multiprocess php. However when we run inside single process multi-threaded Web Servers e.g Sun Web Server or Apache worker mpm with single process, mmap is simply overkill. Reading APC's compiled cache from in-process memory is much efficient than from mmap. To achieve the above, I introduced a configurable variable apc.single_proc which is set to 0 by default. When apc.single_proc is set to 1, cache is created inside process memory. Also mutex which is used to synchronize the cache can also be created as PTHREAD_PROCESS_PRIVATE. apc.single_proc can only be set to 1 when ZTS is enabled. Expected result: ---------------- Better performance for single process multi-threaded php servers. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 07:00:01 2025 UTC |
Documentation of apc.single_proc: -------------------------------- By default single_proc is set to 0 and APC creates mmap/shared memory to save cached php file and data. This can be set to 1 only if running inside single multithreaded server process e.g "ServerLimit 1" for Apache worker mpm or "MaxProcs 1" for Sun Web Server. When set to 1, instead of mmap/shared memory, APC creates cache in process memory. This option have no effect on single threaded multi process php e.g fastcgi.This patch has no effect on performance of APC so closing this bug. Here is my measurement on Solaris sparc on an ecommerce workload (using Studio 12) Excl. Incl. Excl. Incl. Excl. Incl. Name User CPU User CPU Total LWP Total LWP Sys. CPU Sys. CPU sec. sec. sec. sec. sec. sec. Using calloc: 4.243 7656.376 7.145 56560.845 0.610 2095.696 php5_execute Using mmap: 3.973 7644.517 6.715 54048.538 0.640 2071.839 php5_execute