tekrat

日本 ’09 Recap

Friday
Sep 25,2009

After receiving an offer from the Japan PHP Users group to speak at their conference this past month I decided it would be a good chance to speak, meet some fellow  engineers in Japan, and to take some time off from work at the same time.   I’m sorry this post is a little late, as I just returned to San Francisco, and didn’t spend too much time on the computer till now.   I had a wonderful time, and met a number of really great people there.   We started with a presentation on APC at the PHP Japan Conference.

The talks where streamed live and you can view part of it below:

My Prezi presentation is now available as well:

This was my first presentation being given with a translator (who was very helpful). Unfortunately I was a little too concerned about time and ended a little too early, but I got to hear a lot of good questions from the audience which was great. (I even got a question via Twitter! Perhaps future Q&A should be done this way!)

Lucas and I then ran off to Hokkaido in search of cool weather and Onsen, we found plenty of both! I found Hokkaido very enjoyable, but I think I’d like to come back for a skiing trip sometime soon. We traveled via overnight train to Hakodate, then Noboribetsu, and Sapporo. Then to Otaru and Sounkyu and back to Tokyo via domestic airlines AirDo. An excellent trip to the northern part of Japan.

Upon return to Japan some conference organizers and others at Rakuten had setup a tour of their building and a brief talk and discussion about scalability. After a marathon run through the stairways at Rakuten we sat down for a quick Prezi presentation and discussion, slides for this are available online:

It was a great opportunity to get to talk with Rakuten and learn more about their company and what a Japanese web company is like and how their challenges may or may not differ from those I see in the valley.

I spent the rest of the trip meeting up with really cool people from Gree, Rakuten, Mixi, Nico Video, and others. Oh and lots of clothes shopping and Anime/Manga! Thanks to everyone who took time to visit with me on the trip and organize the talk, conferences, and social events!

  • 0 Comments
  • OSCON ‘09 Slides

    • Filed under: tech
    Friday
    Jul 24,2009

    I just finished giving my talk on High Performance APC at OSCON.  I was lucky enough to have Graham Kelly, currently the primary contributor to the PHP Optimizer project, speak with me about the optimizer and the work he has going on there.  You can view the slides online via prezi.com, or you can download the zip file (~11MB) to view offline on your Windows or Mac OS.  Enjoy, please contact Graham or myself if you have any questions or suggestions!  Also, thanks to those of you who where present and participated.

    http://prezi.com/135715/

    OSCON09_HighPerformanceAPC.zip

  • 0 Comments
  • PHP|Tek 2009, presentation download

    • Filed under: tech
    Wednesday
    May 27,2009

    I finished up my presentation at PHP|Tek 2009 this past week, and while I didn’t get to invest as much time making it beautiful as I had hoped it was a good first use of Prezi.  Despite Prezi missing a lot of much needed features it enabled me to qucikly get my ideas down in a format that was presentable, and I felt that the presentation flowed smoothly and conveyed the technical ideas well.

    Responses from the audience seemed good, stating that the “zooming” affect of Prezi really helped hone in on important or detailed aspects of the presentation.  I think this is especially useful for technical presentations where there may be a significant amount of data, as well as code that isn’t always easily visible to the audience.  This years presentation contained some basic information from last year but I steered clear of the dreary INI configuration and instead tried to focus more on optimization, special usage, and work that’s currently in development for APC including lazy loading, no-copy usage of shared memory, and the GSoC project that may open some more doors for APC and other extensions.

    I wish I had more time to spend at PHP|Tek this year, it was a good conference as usual and I was happy with the projectors here that enabled me to get something other than your typical low resolution display.   Unfortunately I had to rush back for a tennis tournament here in SF so I had to punch out early and fly home just in time to loose both my matches in the first round and get sick (some sort of pig flu or something I suppose?).   Anyways, I’m on the mend and looking forward to upcoming projects and other speaking engagements this and next year!

    Prezi slides can be viewed interactively online or via an application download compatible with either Mac or Windows (Sorry Linux, check out the online vension).

    Online: http://prezi.com/84786/view/

    Download: http://tekrat.com/talks_files/phptek2009.zip

  • 2 Comments
  • xlog v1.0.2

    Thursday
    Mar 19,2009

    xlog version 1.0.2 is now available.  This fixes some compatability issues with PHP-5.3.

  • 0 Comments
  • Managing my task list

    Wednesday
    Mar 11,2009

    I’ve gone through several iterations with my to-do list.  I usually have a pretty large list of things that need to be done either as long term goals or short term by the hour or day tasks.  I’ve found that a lot of people use plain text files to track their lists or notes,  I did this for a while but found that I really wanted hierarchical formatting to better organize my thoughts and text files don’t necessarily offer the best feature set or visual display of this type of information.  For a long time I was using OmniOutliner for this purprose but this was a bit heavy handed (feature and price wise) and not really it’s intended purpose.  Edgies is another great application for this sort of thing, and my good friend uses these, but I didn’t find that they suited me for really long lists of tasks that I may not actually get to until a year from now.

    taskpaper

    I’ve finally landed on TaskPaper, it’s my ideal tool for tracking tasks, goals, notes, and most other things.  It works like a plain text editor, but understands special formatting like a ‘-’ character to start a bullet point or a ‘:’ following a word to signify a project, as well as proper indenting to show a hierachy.  It also supports marking tasks as done, arhiving, searching, and tagging.  All very necessary features.   I do have a few complaints such as the ability to drop photos or other files.  I also find it’s not really feasible to paste a large block of code or text like an email.  Despite this however, I’ve been very satisfied and definitely recommend it.  Now I just need to actually complete some items…<sigh>

  • 2 Comments
  • APC Lazy Loading: Initial support

    • Filed under: tech
    Tuesday
    Mar 10,2009

    Recently I posted to the PHP Internals regarding lazy loading support for APC.  I’ve been working on this for a while internally at Facebook, and we’ve actually become quite dependent on this feature.   When you run an include in PHP with APC loaded, you incur a cost of copying opcode and associated data for the compiled files.  APC files are stored in a shared memory segment, but sometimes this data needs to be copied into the local process space.  Lazy loading is a feature that avoids this cost based upon the concept that large code frameworks are only likely to actually require a portion of their code.

    While not entirely accurate or proven, a good way to describe this is with the 80-20 rule or Pareto principle which estimates that in many situations 80% of the effects (in this case processor time) are caused by 20% of the causes (code).   With this in mind we can optimize for this situation by delaying copying of functions and classes from the APC cache until we actually need them, thus reducing our number of copies.  Of course this depends entirely upon the structure of the code, for example using the autoloading feature can often significantly reduce these costs as well.  If you’re running code that is very intelligent with it’s includes, you also probably won’t see  a significant gain unless your you have a significant amount of code or are very performance oriented.  It’s been my experience, however, that includes often get out of hand as demonstrated by the inclued graphs that people have generated.  It’s also logical to assume that you won’t always be using every method in a class, or every function in an included file.  As an example, a database include that has read, write, and search functions is likely to only use one call depending on the request.  Sometimes good organization costs us in other un-obvious ways.

    To get started with lazy loading you’ll need to get the latest version of APC from CVS, and apply some patches to PHP.   I’ve posted the patch for php-5.3 here: http://tekrat.com/downloads/bits/apc_lazy_php53.patch

    Two INI settings enable lazy loading for functions and classes respectively:

    apc.lazy_functions=On|Off

    apc.lazy_classes=On|Off

    This is just a first run, and I will be making some more optimizations in the near future including looking at method level lazy loading and reducing the cost of tracking lazy loaded entries themselves.  I would love to hear any feedback, results, problems you encounter with this feature!

  • 4 Comments
  • PHP|Tek 2009

    • Filed under: tech
    Saturday
    Mar 7,2009

    tek_09_badge_speaker_bigIt’s been a while since I’ve given my last talk, and my next one will be in May at PHP|Tek 2009 in Chicago.  I need all the time I can get to prepare too as I intend to completely re-factor my previous talk with updated benchmarks, information, and overall format.  My goal is to make my next session as up to date as possible, which means I’ll be tinkering with it until May comes around.  I also want to challenge myself to make this talk more engaging visually as well as useful for attendees (I’m talking to you conference nappers!).   I’ll be cutting out most things you can find in a manual, and instead focus on giving attendees a better understanding of APC and creating a truly high performance web site.

    If you’ve attended any of my past talks, or you have any suggestions on what you think would be useful regarding content or anything else, please send me suggestions via comments or email and I’ll do my best!

  • 0 Comments
  • Saturday
    Mar 7,2009

    I’m very excited to be contributing a case study for a book on “Quality Assurance in PHP Projects” by Sebastian and Stefan. My particular section will focus on performance testing, something that I feel engineers often don’t think about from a quality assurance perspective or often measure incorrectly, leading to poor results and wasted time and effort.  My hope is to share some of the techniques I have used when testing scalability and performance, what has been useful, and what has not:

    Incorrect application functionality is a detriment to any project, but poor performance and scalability can often lead to end-user dissatisfaction and exorbitant hardware expenses.

    In the case of modern web application, expectations have made it necessary to provide responses within as little as 100 to 500 milliseconds. This puts a tremendous burden on not only achieving excellent performance, but maintaining consistent performance as code changes and …. (read more at the Quality Assurance in PHP Projects site)

    We’ll be posting more case studies and news as time progresses, feel free to subscribe to our RSS feeds to learn more.  Now, if you’ll excuse me I have some more writing to do…

  • 0 Comments
  • Saturday
    Feb 28,2009

    The PHP INI include patch is now updated for php-5.3.0-cvs.  You can download it here.  Let me know of any problems!

  • 0 Comments
  • xlog v1.0.1

    • Filed under: tech
    Thursday
    Feb 26,2009

    xlog v1.0.1 is available which includes a simple fix for anyone that needs to statically compile xlog with PHP.

  • 0 Comments