2

Is there any limitation of the apc.shm_size? As i calculated im gonna need more or less 2 GB cache size, but if i set even 1 MB more then 1024MB, Apache wont start.

McCon
  • 23
  • 3
  • 1
    If you don't mind, please share how you calculated it. Might help us help you. – KM. Oct 16 '12 at 21:30

2 Answers2

0

2 GB cache seems a bit excessive, but if that's what you need then that's what you need. make sure your system has enough memory as far as I know apc doesn't have any limitation in that regards, what does your apache log says when you try to start it and it won't start?

alexus
  • 12,342
  • 27
  • 115
  • 173
0

You should know that Apache will start certain number of threads; each thread will be eventually able to take up to 1024MB of mem just for APC part. If you have default settings I would assume you system has between 4 and 6 GB RAM;

My advice would be to set apc.shm_size to 128 Mb for start; set up apc.php and monitor how that 128 MB of memory is being used then scale up as needed (which I honestly doubt will be neded)

Hrvoje Špoljar
  • 5,162
  • 25
  • 42