Tag Archives: eAccelerator

Optimize PHP, Apache & MySQL for performance

Two MySQL tuner scripts

MySQLTuner (Perl) and MySQL Performance Tuning Primer (Shell) are two scripts that can help diagnose MySQL database performance issues, and provide recommendations on how to solve them.  While both scripts output similar information, the diagnosis can be slightly different with each script, so I like to use both.  Below are directions on how to use them, as well as a few screenshots.

# Download MySQLTuner and MySQL Performance Tuning Primer to ~/scripts.
# To avoid having to invoke Perl/SH each time, make both files executable.
chmod +x ~/scripts/mysqltuner.pl
chmod +x ~/scripts/tuning-primer.sh

# After that, give them a go!
~/scripts/mysqltuner.pl
~/scripts/tuning-primer.sh

Continue reading Optimize PHP, Apache & MySQL for performance

WordPress memory usage reduced from 14MB to 1.4MB

About two weeks ago, I wrote a short article called eAccelerator reduces WordPress memory usage which outlined how I was able to reduce WP memory usage to 8MB.  While looking into the Zend Framework, I came across Zend Optimizer again, which I hadn’t messed with in a while.  I decided to install it on a whim.  The results were unexpected…

WordPress memory usage*
Standard PHP installation 14MB
eAccelerator 8MB
eAccelerator & Zend Optimizer 1.4MB
* WP memory usage recorded by TPC! Memory Usage

Continue reading WordPress memory usage reduced from 14MB to 1.4MB

eAccelerator reduces WordPress memory usage

In my quest to minimize the memory usage of our beloved blogging platform, WordPress, I came across eAccelerator.  After using Zend Server, and experiencing the performance boost their caching mechanism created, I started looking for something that would work easily with cPanel/WHM.  Lo and behold, there exists a program called eAccelerator which is quoted as being “a free open source PHP accelerator, optimizer, and dynamic content cache.”

eAccelerator in EasyApache
eAccelerator in EasyApache (Go to WHM > Click EasyApache under Software > Choose eAccelerator in the Short or Exhaustive Options screen)

Immediately, I saw the average WordPress memory usage go from 14MB to less than 8MB.  That is roughly 57% percent of the original memory usage.  Needless to say, I was quite pleased with the results!

Thoughts: In other languages, such as C# and Java, one has the ability to introduce libraries as needed without the extra burden of loading every last file, like in WordPress.  Would it be possible to come up with a custom autoload function to do the same sort of thing?  I believe Joomla uses a similar idea with the jimport() function.