LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   General (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=25)
-   -   APC Cache and Fragmentation (http://www.litespeedtech.com/support/forum/showthread.php?t=6325)

eagle eyes 10-22-2012 10:59 PM

APC Cache and Fragmentation
 
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.

eagle eyes 10-22-2012 11:00 PM

More stats can be seen below.

Please let me know what to do please.


Quote:

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 10-23-2012 12:50 PM

High fragmentation usually means memory allocated is not enough. Try increase apc.shm_size 384M or bigger.

eagle eyes 10-23-2012 01:13 PM

Quote:

Originally Posted by webizen (Post 35489)
High fragmentation usually means memory allocated is not enough. Try increase apc.shm_size 384M or bigger.

all pages on server turn white when i increase it to 350mb

webizen 10-23-2012 01:30 PM

increase memory limit in LSPHP5 External App in Admin Console (Configuration => Server => External App). likely it is not enough to hold allocation for APC.

eagle eyes 10-23-2012 01:56 PM

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.

eagle eyes 10-23-2012 02:01 PM

These are the current settings. When i set apc.shm_size to 350M i got blank white pages all over the sites.

Quote:

Memory Soft Limit (bytes): 450M

Memory Hard Limit (bytes):500M

Process Soft Limit : 350

Process Hard Limit: 350

eagle eyes 10-23-2012 02:49 PM

Quote:

Memory Soft Limit (bytes): 1024M

Memory Hard Limit (bytes):1024M
And set apc.shm_size 500M

After 7 minutes up time it is now using close 499M and fragmentation is back to 100 percent.

eagle eyes 10-23-2012 02:56 PM

Quote:

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.

webizen 10-23-2012 03:37 PM

seems you have alot of php files to cache. you may increase apc.shm_size and memory_limit (soft/hard) again.


All times are GMT -7. The time now is 03:36 PM.