Feeds:
RSS
Atom
RDF

More and more I hear that people have performance issues in TYPO3. Yes, TYPO3 is resource-hungry. But it really can do lots of transactions per second if you configure your hardware and system software properly. In 4.1 we added several performance enhancements and will do more in 4.2.

At the moment there are several things that should be avoided in TYPO3:

  • Indexed search
    This gives huge performance impact. Its results are not cached and when you hit search button, it makes lots of queries to database. Most of them do not have optimal indexes and for some queries it is not possible to have such indexes at all. This is what sometimes follows good ideas: straighforward implementation that does not really care about performance. This is a common problem in software development. I see it almost daily...
  • sys_stat
    sys_stat records page visiting statistics to database. If you have request rate up to 2-3 requests per second, these statistics do not harm. However if get 20 and more requests, collecting statistics may (and most likely will!) slow your server down. Why does it happen? Because each hit inserts a new record to database table. And unless corresponding table uses InnoDB, the whole table will be locked until insert request is completed. Now imagine 50 or 100 table locks waiting in a queue and 50 or 100 clients waiting for a page. It can take long time: the more records in the table, the more time inserting takes...

Often performance problems do not come from TYPO3 core or two points about but from custom extensions (meaning any extension, which is not in typo3/sysext). Most common problems with custom extensions:

  • They are unnecessarily made USER_INT
    Yes, it is easier to write USER_INT than to create a proper cHash for each execution of a plugin. But USER_INTs are not cached and plugin executed with all its logic
  • Extensions disables page caching at all
    Several times I saw extensions that used $TSFE->set_no_cache() when it was executed. What does it mean? It means that the whole page is not cached. So any static data on the page and anything that is not changed, is still regenerated. This may increase page load times by hudrets or even thosands!
  • Extension processes items in FrontEnd
    Normally extensions keep data in the database records. Often these records are very simple and rendering does not require much resources. But sometimes they are very complex and rendering requires image generation or serious calculations or calls to external programs.
    If extension chooses the wrong way - to perform all this complex logic during FrontEnd phase, it kills performance. Normally extensions must use TCEmain hooks to do post-processing if data and generation of any otherdepended data but not many do.
    Now imagine what happens if this extension also is USER_INT or uses $TSFE->set_no_cache()...

Performance topic is large and complex. No systems are the same. Each time performance problems must be reviewed individually and appropriate solution created for each case. TYPO3 core team makes its best to ensure that core runs as fast as possible. Extension authors must follow. Do your best too, extension authors!

Like it? Then bookmark it! digg.comdel.icio.usgoogle.comMyLink.deYahooMyWebTechnoratiFurllive.comnetscapeTagThatWebnews

4 Comments

  1. on Thursday, 09-08-07 19:23 MIchael Cannon
    Can you provide examples of converting USER_INT coding to cHash?
  2. on Friday, 17-08-07 12:24 the polarizer
    My suggestions:

    Measure actual response time with e.g. apache's ab2

    Deinstall all unused/not really used extensions.

    This can speed up a lot.

    Use an php accelerator, eaccelerator[1] worked fine for me.

    Now measure again.

    If it's still not fast enough try fl_staticfilecache[2] for heavy speed boost on "static" sites

    the polarizer

    [1] http://eaccelerator.net/
    [2] http://typo3.org/extensions/repository/view/fl_staticfilecache/0.1.7/
  3. on Friday, 17-08-07 12:36 polarizers
    Not to mention the comprehensive article[1] on this issue hosted at typo3.org

    polarizers 2 cents

    [1] http://typo3.org/development/articles/testing-and-tuning-typo3-performance/
  4. on Wednesday, 22-08-07 13:12 Dmitry
    Michael, take a look how typolink() makes cHash.

Leave a Reply