Jump to content

Best Setting For Apc?


Recommended Posts

I'll throw these out there for you start with.

apc.shm_segments = (experiment); 1 apc.shm_size = (experiment); 30 apc.optimization = 1 apc.num_files_hint = 1000 apc.user_entries_hint = 20 apc.ttl = 300 apc.user_ttl = 180 apc.gc_ttl = 60 apc.cache_by_default = 1 ;apc.filters = '' ;apc.mmap_file_mask = '' apc.slam_defense = 50 apc.file_update_protection = 2 apc.enable_cli = 0 apc.max_file_size = 1M apc.stat = 1 ; You may want to set this to 0 if you don't update your files often and are willing to restart webserver when you do apc.write_lock = 1 apc.report_autofilter = 0 apc.include_once_override = 1 apc.rfc1867 = 0 ;apc.rfc1867_prefix = 'upload_' ;apc.rfc1867_name = 'APC_UPLOAD_PROGRESS' apc.rfc1867_freq = 0 apc.localcache = 1 apc.localcache.size = (experiment); 512

The ones that say (experiment) I can't really define for you. Firstly, I don't know your setup - how many servers you have, whether it's shared/vpn/dedicated, how much memory you have, and so on. I put the default values after the comments basically so you can get an idea.

Some of these things you should also try out different settings, besides what I marked "(experiment)". i.e. apc.localcache you may get better performance with it off, or you may get better performance with it on. If you run other scripts on the server it can change your "optimal" configuration as well.

apc.enabled = 1
























Link to comment
Share on other sites

  • 2 years later...
  • 5 months later...
  • 2 months later...

I'm using IPB 3.1.2, LiteSpeed and APC (both latest), user online count tops at 1200 on busy periods but is usually between 600-800.

Although there are vast performance improvements with APC enabled (load avg 1-3 instead of 3-10), I'm worried about cache fragmentation and full cache counts. No matter what settings I use, fragmentation builds up and I also get a whole bunch of cache full counts, which is what I want to disappear.

Using cache size = 300 MB, stat = 0, file and user ttl = 0, I get this after a couple hours:

post-147607-0-72278900-1287604885_thumb.

Using bfarber's settings (file ttl=300 and user ttl=180), fragmentation still builds up, although much slower (takes almost a day). Cache full counts, however, shows really high numbers (10000+), reverts to 0, them builds up again to high numbers, reverts to 0, and so on, all in interval of minutes.

Almost every webpage there is about APC fragmentation/cache full count says I should limit what is being cached using the filters options. That's ok for files, but analyzing the stats it seems user cache is getting too full and is causing the fragmentation.

How do I limit what's going into the user cache?

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

[quote name='cpturbo' timestamp='1287605564' post='2031818']
I'm using IPB 3.1.2, LiteSpeed and APC (both latest), user online count tops at 1200 on busy periods but is usually between 600-800.

Although there are vast performance improvements with APC enabled (load avg 1-3 instead of 3-10), I'm worried about cache fragmentation and full cache counts. No matter what settings I use, fragmentation builds up and I also get a whole bunch of cache full counts, which is what I want to disappear.

Using cache size = 300 MB, stat = 0, file and user ttl = 0, I get this after a couple hours:

post-147607-0-72278900-1287604885_thumb.

Using bfarber's settings (file ttl=300 and user ttl=180), fragmentation still builds up, although much slower (takes almost a day). Cache full counts, however, shows really high numbers (10000+), reverts to 0, them builds up again to high numbers, reverts to 0, and so on, all in interval of minutes.



How much available free ram do you have on your system? I read that you should allot 30% of that to APC.

Link to comment
Share on other sites

[quote name='Abnormalist' timestamp='1288540209' post='2035850']
How much available free ram do you have on your system? I read that you should allot 30% of that to APC.

The server has 12 GB of RAM, 10 GB is allocated to MySQL (MyISAM) and I usually have 400-700 MB free.

I got the the point I don't know what else to do, so I'm not doing anything:

post-147607-0-66914400-1288625629_thumb.

I'm just trying to get this working since I get some occasional mysql lockups every few days, in which I can see dozens of sleeping mysql processes (up to max_connections), and I think it's somewhat related, as it doesn't happen when apc is disabled.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...