My latest performance bottle-neck in PHP has been the frequent memory allocation/deallocation that happens on every request. I’ve created a speed freak’s patch to help with this by pre-allocating memory and letting it persist across requests. This removes the interaction with the kernel memory management, and the rest of the internal emalloc/efree calls are dealt with similar to that of a pool allocator. It’s horribly memory inefficient in the hopes of making some CPU gains. The patch for PHP-5.2.6 is available, I’d like to hear feedback about it’s success/failure in different environments.
Leave a reply