Rasmus Lerdorf Talk

6 views
Skip to first unread message

Ivan Barrios

unread,
Jun 8, 2010, 1:40:12 AM6/8/10
to hacker-...@googlegroups.com
Hi All - here's an overview of what Rasmus discussed tonight:

The topic was performance optimization. It's pretty clear from his talk that Rasmus knows his stuff when it comes to performance at every level - system, network, PHP executor, etc.

A few key takeaways:
1) You have to be aware of the cost of "features" (i.e. functionality on a web page), in terms of how long it's taking to load those features.
- As a rule-of-thumb if your pages load in less than 500ms then that's good enough. (That's the standard that Yahoo sets for itself internally) More than 1s is dismal.
2) You can't understand the performance tradeoffs of a given feature without some tools to profile and display what the application is doing.
- A few helpful tools:
a) YSlow - Firefox/Firebug add-on that grades (A-F) the performance of a web page your visiting. (Provides practical recommendations for improvement)
b) PageSpeed - Google equivalent
c) Siege - benchmark tool to measure how long it takes your server to respond to a request.
- Key parameters to look at: "Response time" & "Transaction Rate"
d) APC - enable APC to perform bytecode caching of your PHP and get an instant boost in performance. (Get APC from PECL)
e) Valgrind - Rasmus' most recommended tool! He says they don't release a PHP version without it. Use Callgrind subtool to view graphical version of code execution profile. Very cool!
f) XDebug

Rasmus walked through a few example cases of characterizing the performance of a simple WordPress blog and a Twitter aggregator he wrote. He also demonstrated that an APC-enhanced web app (Twitter aggregator) ran faster than the same application compiled into native code by Facebook's HipHop compiler. (HipHop converts PHP into C++, then compiles it into native code to optimize for performance) He walked through all of the tools' analysis data to narrow down the reason for the HipHop version of the application being slower. (It turned out to be a single issue with time zones getting resolved on every HTTP request) Even with that fixed, performance was still at parity.

For more detail visit http://talks.php.net/show/dojo where Rasmus has posted his slides. (There's also lots of other good presentations on other topics he's got up there! By the way, Scott, Rasmus has a presentation up there on security - maybe you can "leverage" some of that content for our security discussion! see http://talks.php.net/show/flux)

All in all, a very educational talk!

Cheers,

Ivan

Caryl Westerberg

unread,
Jun 8, 2010, 2:14:15 PM6/8/10
to hacker-...@googlegroups.com
Thanks Ivan, for the great summary.  I was sorry to miss the talk last night!

Caryl
--
Caryl Westerberg
cjw...@acm.org

Mohandas Gandhi's "Seven Blunders of the World" (plus one by Arun Gandhi)
- When Arun Gandhi last saw his famous grandfather, the old man gave the boy a piece of paper with this list of mistakes that lead to violence:

1.  Wealth without work
2.  Pleasure without conscience
3.  Knowledge without character
4.  Commerce without morality
5.  Science without humanity
6.  Worship without sacrifice
7.  Politics without principle

Later Arun Gandhi added:
8.  Rights without responsibilities

Steve "The Almighty" Nelson just added:
9. Actions without consequences

Any more?

Scott Haines

unread,
Jun 8, 2010, 2:47:09 PM6/8/10
to hacker-...@googlegroups.com
Ivan,
Thanks for posting all that on Optimization those notes are great. Thanks for sharing your information with everyone.

On Mon, Jun 7, 2010 at 10:40 PM, Ivan Barrios <ivan.b...@gmail.com> wrote:



--
Scott Haines
Founder / Creative Director / Lead Architect
Newfront Creative LLC
P 408.905.8473 C 408.705.7833
http://www.newfrontcreative.com
http://www.twitter.com/newfront

Doug Chang

unread,
Jun 8, 2010, 5:25:05 PM6/8/10
to hacker-...@googlegroups.com
We should try replicating what he did in the talk and create a working session to teach people how to profile like Rasmus does.

His systems experience is what makes him so good.

These techniques are transferrable to other languages.




Doug Chang

unread,
Jun 9, 2010, 9:12:35 PM6/9/10
to hacker-...@googlegroups.com
I would be interested in meeting once a week using the same time slot the php class is in to see if we can make progress in replicating what Rasmus did in his slides. That would be very useful.


------ Original Message ------
Received: 10:41 PM PDT, 06/07/2010
From: Ivan Barrios <ivan.b...@gmail.com>
To: hacker-...@googlegroups.com
Subject: Rasmus Lerdorf Talk


Hi All - here's an overview of what Rasmus discussed tonight:

The topic was performance optimization. It's pretty clear from his talk that Rasmus knows his stuff when it comes to performance at every level - system, network, PHP executor, etc.

A few key takeaways:
1) You have to be aware of the cost of "features" (i.e. functionality on a web page), in terms of how long it's taking to load those features.
- As a rule-of-thumb if your pages load in less than 500ms then that's good enough. (That's the standard that Yahoo sets for itself internally) More than 1s is dismal.
2) You can't understand the performance tradeoffs of a given feature without some tools to profile and display what the application is doing.
- A few helpful tools:
a) YSlow - Firefox/Firebug add-on that grades (A-F) the performance of a web page your visiting. (Provides practical recommendations for improvement)
b) PageSpeed - Google equivalent
c) Siege - benchmark tool to measure how long it takes your server to respond to a request.
- Key parameters to look at: "Response time" & "Transaction Rate"
d) APC - enable APC to perform bytecode caching of your PHP and get an instant boost in performance. (Get APC from PECL)
e) Valgrind - Rasmus' most recommended tool! He says they don't release a PHP version without it. Use Callgrind subtool to view graphical version of code execution profile. Very cool!
f) XDebug

Rasmus walked through a few example cases of characterizing the performance of a simple WordPress blog and a Twitter aggregator he wrote. He also demonstrated that an APC-enhanced web app (Twitter aggregator) ran faster than the same application compiled into native code by Facebook's HipHop compiler. (HipHop converts PHP into C++, then compiles it into native code to optimize for performance) He walked through all of the tools' analysis data to narrow down the reason for the HipHop version of the application being slower. (It turned out to be a single issue with time zones getting resolved on every HTTP request) Even with that fixed, performance was still at parity.

For more detail visit http://talks.php.net/show/dojo where Rasmus has posted his slides. (There's also lots of other good presentations on other topics he's got up there! By the way, Scott, Rasmus has a presentation up there on security - maybe you can "leverage" some of that content for our security discussion! see http://talks.php.net/show/flux)

All in all, a very educational talk!

Cheers,

Ivan


Scott Haines

unread,
Jun 9, 2010, 9:30:46 PM6/9/10
to hacker-...@googlegroups.com
Doug,
I could make it for most of the nights on Tuesday to work on this. I've used ySlow a bunch in optimizing my sites, it is useful to know what you can fix and what is limited on server compatibilities. (eg. Use a CDN, if your a smaller site, this might not apply, but how can you get the same things accomplished using say ec2 ( most small business don't realize this, most start-ups think they have to go streight to the colocation centers.). 

Then a bunch of tricks can also be done with Apache (fill in server being used on site), and you can use auto-inflate, deflate to gzip you served files automatically. 

Using php Headers, you can also set cache-control and if you use the mem-cached apache module you can read the cache for most repetitious tasks. 

I would do a seminar on ySlow and simple optimization techniques. I'd need a while to plan, my wife and I are trying to get our first house, and the process is killing me!

KevBurnsJr

unread,
Jun 14, 2010, 7:46:44 PM6/14/10
to Hacker Dojo PHP
Hello all,

I was at the Lerdorf talk and I enjoyed it quite a bit.
I noticed cs900 on Hacker Dojo twitter feed and figured I'd drop in if
there's space.
I noticed cs900 lists class topics through 6/8, but nothing for
tomorrow.

Still planning on showing up tomorrow at 7 at Hacker Dojo?
Got room for me?

I'm sure I could drop some knowledge about running PHP in production
mode and show you some weird PHP techniques I bet you've never seen
before :)

- Kev
c: 650-521-7791


On Jun 9, 6:12 pm, "Doug Chang" <do...@stanfordalumni.org> wrote:
> I would be interested in meeting once a week using the same time slot the php class is in to see if we can make progress in replicating what Rasmus did in his slides. That would be very useful.------ Original Message ------Received:10:41 PM PDT, 06/07/2010From:Ivan Barrios <ivan.b...@gmail.com>To:hacker-...@googlegroups.comSubject:Rasmus Lerdorf TalkHi All - here's an overview of what Rasmus discussed tonight:

Scott Haines

unread,
Jun 14, 2010, 8:37:47 PM6/14/10
to hacker-...@googlegroups.com
Hey Kev,
Tomorrow I won't be running cs900. We finished the first cycle and I am wrapping up what worked and what didn't work from the class so I can restructure it better for next time.

Next Wave of cs900 is going to be Intermediate to Advanced to begin with, I had to force feed OOP so quickly (4 weeks for PHP core), (4 weeks for OOP PHP  + Amazon Cloud / Linux / s3, etc!!). So next one is going to be focused on the fun stuff, basically throttling PHP and using the more advanced features.

Also contemplating whether or not to host the Zend certification test preparation. Probably be around $250/p which will cover the prep book / practice exams, and q+a. Covering the main 9 sections of the Zend Test which also covers everything you will ever need to succeed professionally in the PHP world.

Let me know if you would be interested in either course, (anyone else out there as well, shoot me a reply and I will see what people are most excited about and that is what I will end up running next. *got about 6 people interested in a cs900 follow up whihc will end up being the more advanced PHP course.

KevBurnsJr

unread,
Jun 15, 2010, 1:59:25 PM6/15/10
to Hacker Dojo PHP
I'm confused because of this.
http://events.hackerdojo.com/

Is there a meetup tonight or not?

Cause HackerDojo seems to think there is.

- Kev
> > ivan.barr...@gmail.com>To:hacker-dojo-...@googlegroups.comSubject:Rasmus
> > > For more detail visithttp://talks.php.net/show/dojowhere Rasmus has
> > posted his slides. (There's also lots of other good presentations on other
> > topics he's got up there! By the way, Scott, Rasmus has a presentation up
> > there on security - maybe you can "leverage" some of that content for our
> > security discussion! seehttp://talks.php.net/show/flux)

Scott Haines

unread,
Jun 15, 2010, 2:17:42 PM6/15/10
to hacker-...@googlegroups.com
Kev,
The class material that was prepared was only until last week. If you would like to meetup and learn some PHP I will be doing a short course / quick lesson on Thursday the 17th. That will be covering PHP with Amazon ec2 / s3.

The Events system is new, and I am happy to continue doing the class, just need to make sure I have the time to prepare my next round of materials. The class is in fully open mode right now, eg. I am continuing to update the Google Group pages with information and examples, but I won't we doing another full class until probably closer to July 15th.

In the meantime, we have been figuring out how to best use the time, one idea was to have a Design Patterns meetup group to just talk about PHP / OOP design patterns, have someone present what they know, and teach a more narrow concept to the group.

I will see if anyone else was expecting to come tonight, and if that is the case, then we can begin the discussion group in the mean time.

* What is your background in programming / PHP? Just Curious.

KevBurnsJr

unread,
Jun 15, 2010, 3:16:51 PM6/15/10
to Hacker Dojo PHP
I've been doing web design/development for 6 or 7 years. PHP for 3 or
4.

I've written my own MVC frameworks from scratch and I'm a contributor
to Recess. http://recessframework.org/

I've used Propel and Doctrine, Symfony, Zend, Cake, Rails, and others.

I work for a company in Oakland, though I'll be leaving soon and I'm
looking to do some networking to find myself a new job.

Perhaps I could join in as a TA?

- Kev
> > > > > For more detail visithttp://talks.php.net/show/dojowhereRasmus has
Reply all
Reply to author
Forward
0 new messages