Doc #38678 [Asn]: APC docs need mmap infos

From: Date: Sat, 23 Oct 2010 15:52:23 +0000
Subject: Doc #38678 [Asn]: APC docs need mmap infos
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5384@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=38678&edit=1 ID: 38678 Updated by: gopalv@php.net Reported by: thomas-lists at mysnip dot de Summary: APC docs need mmap infos Status: Assigned Type: Documentation Problem Package: Documentation problem Operating System: Linux PHP Version: Irrelevant Assigned To: gopalv Block user comment: N New Comment: The shmmax limit is the reason there was a need for multiple segments in the first place. phpinfo() does mention that MMAP Support is enabled & the locking type used for an install. mmap() is a nicer and easier way to overcommit memory (i.e the OS will only use physical pages once you read/write a block) reducing the impact of memory allocation at startup. Also mmap() in that fashion ensures that the system reclaims memory quickly and easily when apache is shut down & restarted. It also lends itself to some nice tricks http://notmysock.org/blog/hacks/memory-rowr Shm mode is kept around just for one reason. It's the SysV standard to do this kind of thing. Previous Comments: ------------------------------------------------------------------------ [2010-01-17 15:45:14] bjori@php.net Gopal: could you help us out here? ------------------------------------------------------------------------ [2006-09-01 09:49:38] thomas-lists at mysnip dot de Description: ------------ coming from http://news.php.net/php.pecl.dev/4095 pointed here from http://news.php.net/php.pecl.dev/4096 The APC docs don't tell anything about how memory is used in mmap mode. e.g. that - maximum shm-segment-size told in /proc/sys/kernel/shmmax isn't in effect here - mmap uses only one segment and currently uses only the size specified in apc-config for the shm-segments (see bug http://pecl.php.net/bugs/bug.php?id=8609 , maybe that changes) - currently one can only guess which mode is used but I think the phpinfo tells at least "mmap is enabled" ( see bug http://pecl.php.net/bugs/bug.php?id=8608 at pecl.php.net) As mmap-mode is the default nowadays in apc it would be good to tell some more about its configuration :). If one could add the pros/cons of using mmap over shm it would be great too! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=38678&edit=1

« previous php.doc.bugs (#5384) next »