Best performance configuraction for APC

Best performance configuraction for APC

by Jai Gupta -
Number of replies: 3
Hi,

I am trying out APC configuration for Moodle... currently my settings are :-

General Cache Information

APC Version 3.0.14
PHP Version 5.2.3
APC Host somedomain.com
Server Software Apache/2.0.52 (CentOS)
Shared Memory 1 Segment(s) with 2.0 GBytes
(mmap memory, file locking)
Start Time 2007/08/14 12:19:33
Uptime 11 hours and 28 minutes
File Upload Support 1

File Cache Information

Cached Files 8390 (988.3 MBytes)
Hits 285156
Misses 9529
Request Rate (hits, misses) 7.13 cache requests/second
Hit Rate 6.90 cache requests/second
Miss Rate 0.23 cache requests/second
Insert Rate 0.21 cache requests/second
Cache full count 0

User Cache Information

Cached Variables 5 (140.8 KBytes)
Hits 136
Misses 0
Request Rate (hits, misses) 0.00 cache requests/second
Hit Rate 0.00 cache requests/second
Miss Rate 0.00 cache requests/second
Insert Rate 0.00 cache requests/second
Cache full count 0

Runtime Settings

apc.cache_by_default 1
apc.enable_cli 0
apc.enabled 1
apc.file_update_protection 2
apc.filters
apc.gc_ttl 3600
apc.include_once_override 0
apc.localcache 1
apc.localcache.size 2024
apc.max_file_size 1M
apc.mmap_file_mask
apc.num_files_hint 10000
apc.report_autofilter 1
apc.rfc1867 0
apc.shm_segments 1
apc.shm_size 2024
apc.slam_defense 10
apc.stat 1
apc.stat_ctime 0
apc.ttl 7200
apc.user_entries_hint 5000
apc.user_ttl 7200
apc.write_lock 1

Some questions...

  1. APC uses files to store cache... can I use RAM to store cache files?
  2. What should be ttl value if the server is only going to have Moodle as an web application.
  3. What configuration do you recommend?
Average of ratings: -
In reply to Jai Gupta

Re: Best performance configuraction for APC

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers

Jai

1. Yes, I believe that the idea is that the cache files are stored in RAM. The 2G size of your segment seems rather large for Moodle. I use a much smaller one based on the size of Moodle (1 Segment(s) with 128.0 MBytes) and have never come close to using all of it.

2. I left the ttl set to the default of 7200 and have not had problems.

3. I'm not familiar with CentOS but I would stick primarily with the defaults.

Peace - Anthony

In reply to Anthony Borrow

Re: Best performance configuraction for APC

by Jai Gupta -
thanks for the reply Anthony...

yea you are right, Moodle is not that big but our server is running multiple Moodle installations... even when my cache size is 2GB (1.3GB filled) my total RAM usage is only around 1GB with 3GB still left free...

The cache size set in APC is not reflecting on the memory consumption on my server... Is this a behavior of APC or something wrong with my server?

Jai
In reply to Jai Gupta

Re: Best performance configuraction for APC

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
To be honest I am not sure. I have been fortunate that apc just seems to work on our server so I have had no reason to really learn more. Peace - Anthony