Friday, May 29, 2009

Zend Server (Lesson 3) Solving a performance problem

In this Zend Server video lesson I will be dealing with a performance problem in my CMS Drupal. Performance problems happen in all sorts of scenarios and applications, so am not picking on Drupal project at all, just using it as an example in this lesson as a way to educate. Sometimes in a project, even one that's so mature like Drupal, a performance problem can be introduced just by adding in a simple tweak or new module to the core Drupal. With my site the problem is that it's sooo slow, the pages are rendering more then 5 secs with only a single user on the site, that's way too slow. I'm using the latest version of Drupal 6.12 free open source software (FOSS) code right off the site today Download Drupal 6.x and am using Zend Server + PHP5.2.9 + Zend Studio to get to the root cause of the performance problem and fix it fast. You'll soon see what the site owner did to cause this performance problem. In this video I reduce the page render time from 5sec down to 0.19sec and that's a 26 TIMES speed improvement, nice. If you want to follow along with me, review my prior lesson 1 and lesson 2 to prep for this one. And let me know what your own results are with tracking down performance issues. The lessons learned here will help you in your own PHP app, or any other PHP app on sourceforge.net

PS: I had to keep these videos short for Youtube to accept the download so its a quick 5min video lesson


3 comments:

Liviu said...

In case you don't know, Drupal has a solid caching system, with multiple caching strategies, so your point is really useless

Edward Kietlinski said...

Yup I do know that drupal has a caching system. I mainly used Drupal to show full page caching of Zend Server as many custom portals and websites written in PHP dont have such a caching option. But Zend Server URL caching is still faster then Drupal caching.

I also ran some performance stress test using JMETER on my system comparing both the internal caching of Drupal (12.0 requests/sec) .vs. using Zend Server full page caching ( 21.8 req/sec) .vs. not using any caching (0.67 req/sec) So full page caching will always be faster then the built in Drupal caching.

One last note is that fullpage URL caching shouldnt be used on a blog that accepts comments or feedback (because its caching the entire page for a certain length of time, the comment will not showup till the page timeout expires in the rule) Utilizing the caching API is still better for those types of situations and you can always mix full page URL caching with partial page caching like the caching used internal to Drupal. Feel free to use both where they make sense on your drupal site.

martha said...

I recently came accross your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.


Susan

http://8080proxy.com