09
01
2008
My employer The First Post has been bought by Dennis Publishing. More details can been seen in this press release.
I look forward to working with the staff from Dennis Publishing in the near future.
Comments :
No comments »
Trackbacks :
No Trackbacks »
06
01
2008
I have been asked several times about why I choose APC over any other PHP opcode cache for our site. There are several around nowadays, the big open source ones being eAccelerator, APC and XCache. I am a big advocate of open source and I'm much more likely to get upper management to agree to free software than an expensive alternative from Zend. As far as speed difference goes there isn't a great deal of difference between them, I could make code optimisations that would give us a better performance increase.
First I had to admit it was not my first choice, we were using eAccelerator to start with, but we were then developing problems that were killing Apache processes. After a bit of research I found this was a known problem with no real fix (it may be fixed now, to be honest I haven't looked back). It was decided that we needed to evaluate the alternatives to eAccelerator as soon as possible.
I had a brief look at XCache and have no doubt it is a great project, but at the time it was still in its infancy. This would have been the last solution evaluated simply because we prefer software that is well established.
APC is well established and since it was announced that this would be included in PHP6 it has been stabilised very well. We tested it to death and it responded well, within a few days it was across our whole hosting platform.
Comments :
No comments »
Categories : PHP
Trackbacks :
No Trackbacks »
06
01
2008
I have been benchmarking APC and memcached to find which is the best in certain situations. Obviously APC is a much faster cache but memcached is designed for scaling across servers.
The most interesting thing I found is APC is a lot slower at storing arrays than memcached. In most cases it is still faster at reading them. For example on my test virtual server, with 4k of text memcached will do 100,000 writes in around 4 seconds whereas APC will do 100,000 writes in around 2 seconds. If I instead try to store a small array with 8 elements memcached constantly does 100,000 writes in 4 seconds, APC however takes 13 seconds! This figure seems to grow exponentially as the array grows as well. Reads speed appears to be consistent for each with around 4 seconds for 100,000 memcached reads and 0.5 seconds for 100,000 APC reads.
In the application I was working on we are storing some large arrays and some small segments of data. The smaller segments of text data also changes a lot less often than the arrays so we are storing the small text data in APC and the arrays in memcached.
Note: I am not using current versions of either APC or Memcached for this, I know both have had a couple of new releases and both have had speed improvements.
Comments :
No comments »
Categories : PHP
Trackbacks :
1 Trackback »