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.
2 Answers
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?
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)