Jump to content

Achievo/Howto/Developers/Speed up Achievo: Difference between revisions

From NusaATK
Woody (talk | contribs)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page will describe some tricks to speed up Achievo. As of version 1.4 (not released yet) there are some performance updates done in Achievo it self.
This page will describe some tricks to speed up Achievo. As of version 1.4 (not released yet) there are some performance updates done in Achievo it self.


== Turn of debugging ==
In atkconf.inc change the following config:
<syntaxhighlight lang="php">
$config_debug = -1;
</syntaxhighlight>
This will reduce the memory usage and give some performance.


== Use gzip compression ==
== Use gzip compression ==
Line 9: Line 16:


== Use apache deflate module ==
== Use apache deflate module ==
With the apache [http://httpd.apache.org/docs/2.0/mod/mod_deflate.html deflate] module it is possible to compress the output of the files that are send to the client.  
With the apache [http://httpd.apache.org/docs/2.0/mod/mod_deflate.html deflate] module it is possible to compress the output of the files that are send to the client.
 
  <IfModule mod_deflate.c>
    SetOutputFilter DEFLATE
   
    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html
 
    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
 
    # MSIE masquerades as Netscape, but it is fine
    # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
 
    # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
    # the above regex won't work. You can use the following
    # workaround to get the desired effect:
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
 
    # Don't compress everything
    SetEnvIfNoCase Request_URI \.(?i:gif|jpe?g|png)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?i:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
 
  </IfModule>


== Use apache expires module ==
== Use apache expires module ==
With the apache [http://httpd.apache.org/docs/2.0/mod/mod_expires.html expires] module it's possible to change the cache behaviour of files.
With the apache [http://httpd.apache.org/docs/2.0/mod/mod_expires.html expires] module it's possible to change the cache behaviour of files.


  <ifModule mod_expires.c>
   ExpiresActive on
   ExpiresActive on
 
   # cache common graphics for 3 days
   # cache common graphics for 3 days
   ExpiresByType image/jpg "access plus 3 days"
   ExpiresByType image/jpg "access plus 3 days"
   ExpiresByType image/gif "access plus 3 days"
   ExpiresByType image/gif "access plus 3 days"
   ExpiresByType image/jpeg "access plus 3 days"
   ExpiresByType image/jpeg "access plus 3 days"  
   ExpiresByType image/png "access plus 3 days"
   ExpiresByType image/png "access plus 3 days"
 
   # cache CSS for 24 hours
   # cache CSS for 24 hours
   ExpiresByType text/css "access plus 24 hours"
   ExpiresByType text/css "access plus 24 hours"
   # set the default to 24 hours
 
   ExpiresDefault "access plus 24 hours"
   # cache javascript for 24 hours
  ExpiresByType text/javascript "access plus 24 hours" 
  ExpiresByType application/x-javascript "access plus 24 hours"
   ExpiresByType application/javascript "access plus 24 hours"
 
  </IfModule>
 
== Use apache headers module ==
With the apache [http://httpd.apache.org/docs/2.0/mod/mod_headers.html headers] module it's possible to change the expires headers of files.
 
  #set expires header to 2 days
  <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
    Header set Cache-Control "max-age=172800, public"
  </FilesMatch>
 
 
== FileETag Directive ==
In your apache vhost configuration you can set an entity tag ([http://httpd.apache.org/docs/2.0/mod/core.html#fileetag ETag]):
 
  FileETag MTime Size
 
== Use a PHP Accelerator ==
 
You can speed up Achievo by using a PHP accelerator:
 
- [http://pecl.php.net/package/APC APC]
 
- [http://xcache.lighttpd.net/ xCache]
 
- [http://www.zend.com/en/products/platform/ Zend Platform] (Commercial)
 
- [http://www.zend.com/de/community/zend-server-ce Zend Community Server] (non Commercial)
 
- [http://eaccelerator.net/ eAccelerator]


Some people think Zend Optimizer is an accelerator, but actually it is a byte-code loader for the Zend Guard (encoding) product. It does not include a byte code cache.


== Create selector nodes ==
== Create selector nodes ==
If your nodes has multiple manytoone relations, make sure the destination node doesn't contain too many relations. If this is case, just make a simple selector node for it with only the fields needed to get a decent descriptor.
If your nodes has multiple manytoone relations, make sure the destination node doesn't contain too many relations. If this is case, just make a simple selector node for it with only the fields needed to get a decent descriptor.
== Other resources ==
- article on performance for TYPO3 by Michiel Roos: http://typofree.org/articles/optimizing-typo3-backend-responsiveness/

Latest revision as of 06:50, 15 July 2009

This page will describe some tricks to speed up Achievo. As of version 1.4 (not released yet) there are some performance updates done in Achievo it self.

Turn of debugging

In atkconf.inc change the following config:

$config_debug = -1;

This will reduce the memory usage and give some performance.

Use gzip compression

In atkconf.inc you can add the following config:

$config_output_gzip = true;

Use apache deflate module

With the apache deflate module it is possible to compress the output of the files that are send to the client.

 <IfModule mod_deflate.c>
   SetOutputFilter DEFLATE
   
   # Netscape 4.x has some problems...
   BrowserMatch ^Mozilla/4 gzip-only-text/html
 
   # Netscape 4.06-4.08 have some more problems
   BrowserMatch ^Mozilla/4\.0[678] no-gzip
 
   # MSIE masquerades as Netscape, but it is fine
   # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
 
   # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
   # the above regex won't work. You can use the following
   # workaround to get the desired effect:
   BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
 
   # Don't compress everything
   SetEnvIfNoCase Request_URI \.(?i:gif|jpe?g|png)$ no-gzip dont-vary
   SetEnvIfNoCase Request_URI \.(?i:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
   SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
 
 </IfModule>

Use apache expires module

With the apache expires module it's possible to change the cache behaviour of files.

 <ifModule mod_expires.c>
 ExpiresActive on
 
 # cache common graphics for 3 days
 ExpiresByType image/jpg "access plus 3 days"
 ExpiresByType image/gif "access plus 3 days"
 ExpiresByType image/jpeg "access plus 3 days" 
 ExpiresByType image/png "access plus 3 days"
 
 # cache CSS for 24 hours
 ExpiresByType text/css "access plus 24 hours"
 
 # cache javascript for 24 hours
 ExpiresByType text/javascript "access plus 24 hours"  
 ExpiresByType application/x-javascript "access plus 24 hours"
 ExpiresByType application/javascript "access plus 24 hours"
 
 </IfModule>

Use apache headers module

With the apache headers module it's possible to change the expires headers of files.

 #set expires header to 2 days
 <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
   Header set Cache-Control "max-age=172800, public"
 </FilesMatch>


FileETag Directive

In your apache vhost configuration you can set an entity tag (ETag):

 FileETag MTime Size

Use a PHP Accelerator

You can speed up Achievo by using a PHP accelerator:

- APC

- xCache

- Zend Platform (Commercial)

- Zend Community Server (non Commercial)

- eAccelerator


Some people think Zend Optimizer is an accelerator, but actually it is a byte-code loader for the Zend Guard (encoding) product. It does not include a byte code cache.

Create selector nodes

If your nodes has multiple manytoone relations, make sure the destination node doesn't contain too many relations. If this is case, just make a simple selector node for it with only the fields needed to get a decent descriptor.


Other resources

- article on performance for TYPO3 by Michiel Roos: http://typofree.org/articles/optimizing-typo3-backend-responsiveness/