contact us

TYPO3 performance tips
6 Dec 03, 2008
All these years I was wondering, what would be the best practice and configuration to have TYPO3 running huge number records with several connections. I found answers to some of the queries, but still working to get a clean solution. TYPO3 can play havoc if not configured properly. So here are the few tips that should be considered while setting up your server. It is better to get your own dedicated server for a TYPO3 hosting.
Do not use unused extensions
TYPO3 writes information about the every page display. So disable any TYPO3 built-in statistics. The more visitors you get, the slower the site will work if you have statistics enabled.
Remove orphan extensions as some of them provide hooks that executed for every page view. Others do complex actions during TYPO3 initialization phase. Even the simple operation of registering plugins takes time! So get rid of anything you do not use.
do not use indexed_search
Do not use indexed_search for searching web sites until it implements FULLTEXT indexing. FULLTEXT indexing should be faster than current way. But currently indexed_search is not suitable for sites with more than 100 pages. It is terribly slow and puts huge load on the TYPO3 database. Remove it and you will notice how server load drops and performance of web sitre increases.
What to use as replacement? The easiest is to use Google web site search. It can be customized for your web site look and feel. If you do not like to use Google, then I am coming up with an extension which will be integrated with Apache Solr.
use InnoDB for database tables
Yes InnoDB. The main advantage is that it allows simultaneous read and writes. By default MYISAM is used, which locks whole table while anyone is writing to it. So imagine if one user is browsing the page and data is written to the cache table. No other users can browse the site in the same moment.
But do not tend to make all tables use InnoDB. InnoDB is an advantage for tables that are read and written simultaneously. MyISAM is better for tables that are mostly read
optimize MySQL
Every server is different and needs different settings. Even if hardware is the same, sites are still different, data is different and it may need tuning.
But still I will give some tune up configuration which you guys can try out:
query_cache_type=1
query_cache_limit=5M
query_cache_size=100M
key_buffer=200M
join_buffer=4M
sort_buffer=4M
read_buffer=4M
read_rnd_buffer=4M
record_buffer=4M
wait_timeout=15
table_cache=128
thread_cache=32
max_connections=300
thread_concurrency=10
innodb_buffer_pool_size=40M
innodb_additional_mem_pool_size=40M
key_buffer=128M
do not use persistent connections
Firsts, they are not really faster than regular connections. Secondly, resource associated with connection is freed only in two cases: it is freed explicitely in the code or when connection is closed. So if developer forgot to free resource, it will hang alive until connection is alive. This eats memory and eventually may cause swapping on the is level, which always decreases performance. So, go to Install tool and check that you do not use persistent connection. If you are developer, the best you can do is to ensure that you call proper functions to free MySQL resources.
- Try the extension t3p_scalable to enable memcached and database load balancin.
- Use mod_expires, so make sure you enabled mod_expires in apache.
- You can try eAccelerator as a PHP cache. It really boost your performance.
