diff --git a/documentation/optimization.html b/documentation/optimization.html index 9eff6a97ff..1a86cac9e5 100755 --- a/documentation/optimization.html +++ b/documentation/optimization.html @@ -51,6 +51,7 @@
It might have come to your attention that file downloads through Chamilo might get slow, under default conditions, in particular using Apache 2.
There are several ways to fix this, one of which is removing the .htaccess inside the courses/ directory. This, however, will remove all permissions checks on the files contained in this directory, so... most of the time, not ideal unless your portal is *really* open to the world.
Another technique, revealed to us by VirtualBlackFox on this Stackoverflow post, is to use the X-SendFile module for Apache 2.2+ (other web servers might offer other solutions, or avoid the problem initially).
@@ -398,11 +401,13 @@ $_configuration['enable_x_sendfile_headers'] = true; Done! Now your downloads should go substantially faster. This is still a feature in observation. We're not sure the benefits are sufficient, so don't hesitate to let us know in the related issue in Chamilo's tracking system -IGBinary is a small PECL library that replaces the PHP serializer. It uses less space (so less memory for serialized objects) and is particularly efficient with memory-based storages (like Memcached). Use it for course backups (see issue 4443) or to boost sessions management.
-
This measure is not cumulative with mod_xsendfile explained above. It is not *recommended* either, as it removes an important security layer.
@@ -435,13 +440,29 @@ RewriteRule ([^/]+)/work/(.*)$ /main/work/download.php?file=work/$2&cDir=$1 [QSA
This is easy, doesn't require a server reload and you should see the results pretty quickly. As mentioned above, if security of your content is an issue, though, you should avoid using this technique.
+If your database server is separate from your web server, you have to play with bandwidth, firewalls, and network restrictions in general.
+In particular, when dealing with large-scale portals, the time a SQL query will take to return to the web server will take longer and, eventually, in the most critical cases, will take too long, and your web servers will be completely overloaded (load average very high because the system is waiting for I/O operations, but processors usage not being very high is a clear sign of this).
+To solve this kind of issues, MySQL and MariaDB offer a data compression mechanism, which will reduce the amount of data passed between PHP and the database server. Ultimately, this reduction will lower bandwidth usage and reduce the impact of numerous and heavy data requests (and save you).
+In 1.10.0, we have added the possibility to enable this compression very easily, from the configuration.php file, uncommenting the following line:
+
+//$_configuration['db_client_flags'] = MYSQL_CLIENT_COMPRESS; ++This should have an immediate effect on the load average on your server.