APC Cache and Fragmentation

#1
My APC is showing

Fragmentation: 100.00% (296.0 KBytes out of 296.0 KBytes in 218 fragments)

Free: 296.1 KBytes (0.2%) Hits: 266255 (94.4%)
Used: 191.7 MBytes (99.8%)

Code:
apc.cache_by_default	1
apc.canonicalize	1
apc.coredump_unmap	0
apc.enable_cli	0
apc.enabled	1
apc.file_md5	0
apc.file_update_protection	2
apc.filters	
apc.gc_ttl	600
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	1000
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	default
apc.shm_segments	1
apc.shm_size	192M
apc.slam_defense	1
apc.stat	1
apc.stat_ctime	0
apc.ttl	3600
apc.use_request_time	1
apc.user_entries_hint	4096
apc.user_ttl	3600
apc.write_lock	1
What do i have to do here? I am running Litespeed 4.2 in suexec daemon mode.
 
#2
More stats can be seen below.

Please let me know what to do please.


File Cache Information
Cached Files 1034 (180.5 MBytes)
Hits 266255
Misses 15690
Request Rate (hits, misses) 875.61 cache requests/second
Hit Rate 826.88 cache requests/second
Miss Rate 48.73 cache requests/second
Insert Rate 34.66 cache requests/second
Cache full count 8022
User Cache Information
Cached Variables 345 ( 2.1 MBytes)
Hits 108696
Misses 16054
Request Rate (hits, misses) 387.42 cache requests/second
Hit Rate 337.57 cache requests/second
Miss Rate 49.86 cache requests/second
Insert Rate 43.66 cache requests/second
Cache full count 7249
 

webizen

Well-Known Member
#5
increase memory limit in LSPHP5 External App in Admin Console (Configuration => Server => External App). likely it is not enough to hold allocation for APC.
 
#6
Which variable exactly can you point out?

That value has to be the same for apc.shm_size also?

If you enable PM i can send you the apc stats URL.
 
#7
These are the current settings. When i set apc.shm_size to 350M i got blank white pages all over the sites.

Memory Soft Limit (bytes): 450M

Memory Hard Limit (bytes):500M

Process Soft Limit : 350

Process Hard Limit: 350
 
#9
Runtime Settings
apc.cache_by_default 1
apc.canonicalize 1
apc.coredump_unmap 0
apc.enable_cli 0
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 /tmp/apc.Djhyff
apc.num_files_hint 1000
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 default
apc.shm_segments 1
apc.shm_size 500M
apc.slam_defense 1
apc.stat 1
apc.stat_ctime 0
apc.ttl 3600
apc.use_request_time 1
apc.user_entries_hint 4096
apc.user_ttl 3600
apc.write_lock 1
These are the current settings.
 
#12
Increase apc size to 1024M and memory to 3000M. But seems like it will be the same results as it is approaching the 1024M soon, is there anything else that i should be looking at?
 
#13
Set apc size to 1500M and memory to 3000M. Can't really tell if the issue of fragmentation is fixed or not since either APC or Litespeed just restarts every around ~50 minutes.

Help please.
 
#15
apc.filters should be set to what? number of files to cache?

Any idea why APC (Or is it Litespeed) restarts every 1 hour and some minutes or so? Is that an issue or is it normal?
 
#16
>apc.filters should be set to what? number of files to cache?
no, should not. please refer:
http://www.php.net/manual/en/apc.configuration.php#ini.apc.filters

>Any idea why APC (Or is it Litespeed) restarts every 1 hour and some minutes or so? Is that an issue or is it normal?
there are many reasons to cause litespeed restarting. for example, you host thousands of accounts/virtual hosts under litespeed or apache. modifying configuration of a virtual host will cause a litespeed restart. if only host a few virtual hosts, and configuration is fixed, you will see litespeed will run there for weeks/months without restarting.
 
Top