In eaccelerator every different process cosumes the same amount of memory defined in the php.ini file. So if I had 16 processes running and each was using 20MBs of RAM for caching which means 16*20MBs of memory used. That's 320MBs of RAM used! I don't think this is efficient enough and think possibly xcache could do something about this. I'm running lighttpd with php 4.4.1 via fcgi and I think if xcache fixed this problem then many lighttpd users especially would have more reason to move to xcache instead of ea. The 20MBs used for each processes caching is normally the bare minimal of what hosts use. I'm not making a any big accumption but I've seen on forums where a tutorial is posted about how to install ea and it's memory used for caching is about 64MBs. Now imagine 64MB*16, that's a gig gone when they're all caching exactly the same code. My two cents, hope moo replies.
on 25.05.2006 09:23
on 25.05.2006 12:41
it's same with ea/apc/xcache. but you're doing something wrong. it depends on who and when fork the childs. you have something like spawn-fcgi or lighttpd creating many individual php-fastcgi, i guess. the 3 cachers allocate shm/mmap at parent process before php-cgi-fcgi forks many childs, so the childs share 1 shm/mmap. see http://trac.lighttpd.net/trac/wiki/TutorialLighttpdAndPHP the example create 2 groups of 16 childs of php (2*16 total), it's running 2 cache.
on 26.05.2006 14:41
Ah thanks, explains a lot now. Before I had 2 procs and 4 childs but the stats given from top or ps auxf just all didn't add up or were not the same so I figured that every process had it's own shm. Now that you've told me otherwise I've changed it to use one proc and now see the bigger picture. Thanks moo!

