MyBB Community Forums

Full Version: Reducing APC fragmentation?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using APC as my opcode cache and just went in to check it's stats. After a week's uptime, it's hit 100% fragmentation. Not good.

Here's the fragmentation details:

Fragmentation: 100.00% ( 1.9 MBytes out of 1.9 MBytes in 17 fragments)

General Cache Information
APC Version	3.1.13
PHP Version	5.4.15
APC Host	localhost
Server Software	nginx/1.4.1
Shared Memory	1 Segment(s) with 16.0 MBytes 
(mmap memory, pthread mutex Locks locking)
Start Time	2013/05/17 21:56:07
Uptime	1 week, 4 days, 22 hours and 16 minutes
File Upload Support	1

Runtime Settings
apc.cache_by_default	1
apc.canonicalize	1
apc.coredump_unmap	0
apc.enable_cli	1
apc.enabled	1
apc.file_md5	0
apc.file_update_protection	2
apc.filters	
apc.gc_ttl	3600
apc.include_once_override	0
apc.lazy_classes	0
apc.lazy_functions	0
apc.max_file_size	1M
apc.mmap_file_mask	
apc.num_files_hint	4096
apc.preload_path	
apc.report_autofilter	0
apc.rfc1867	0
apc.rfc1867_freq	0
apc.rfc1867_name	APC_UPLOAD_PROGRESS
apc.rfc1867_prefix	upload_
apc.rfc1867_ttl	3600
apc.serializer	igbinary
apc.shm_segments	1
apc.shm_size	16M
apc.shm_strings_buffer	4M
apc.slam_defense	0
apc.stat	1
apc.stat_ctime	0
apc.ttl	7200
apc.use_request_time	1
apc.user_entries_hint	4096
apc.user_ttl	7200
apc.write_lock	1

I'm not having any issues with performance or anything, but 10% fragmentation is obviously bad when blogs I've seen say it's best kept under 10%...
You can try setting apc.ttl to 0, in apc.ini

That's what google says Toungue

http://www.litespeedtech.com/support/for...hp?p=21735
It's worth trying I guess. it's worth noting I've used the same config on other servers with no issues. Just seem to be having this problem on a new Linode.
I have same problem on my VPS.

extension=apc.so
apc.shm_size=256M
apc.ttl=3600
apc.user_ttl=7200


My APC's fragmentation is 100.00% but VPS working good.

Hits: 60553592 (100.0%) Used: 192.8 MBytes (75.3%) Misses: 2707 (0.0%)