cycomate1
11-12-2006, 08:56 PM
Hi everyone,
I'm running vB and it's database on different servers. A forum hit consumes around 350 kB of traffic (from the database server to the webserver) - that makes more than 100 GB per month.
I already tried the MYSQL_CLIENT_COMPRESS flag but it seems not to be working:
@@ -272,3 +272,3 @@ class vB_Database
{
- $link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password);
+ $link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password, MYSQL_CLIENT_COMPRESS);
}
I still see the database content rushing in clear text.
However, a self-written php file that queries the database using MYSQL_CLIENT_COMPRESS works fine, the result gets compressed.
I saw there is many unvarying data being transferred on each forum hit - like the forum templates, phrases, permissions etc. In fact that's the majority of what's being transferred.
Is there a way of caching these tables locally (in php, on the webserver's side)? If not, how to compress the data?
Regards,
cycomate
I'm running vB and it's database on different servers. A forum hit consumes around 350 kB of traffic (from the database server to the webserver) - that makes more than 100 GB per month.
I already tried the MYSQL_CLIENT_COMPRESS flag but it seems not to be working:
@@ -272,3 +272,3 @@ class vB_Database
{
- $link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password);
+ $link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password, MYSQL_CLIENT_COMPRESS);
}
I still see the database content rushing in clear text.
However, a self-written php file that queries the database using MYSQL_CLIENT_COMPRESS works fine, the result gets compressed.
I saw there is many unvarying data being transferred on each forum hit - like the forum templates, phrases, permissions etc. In fact that's the majority of what's being transferred.
Is there a way of caching these tables locally (in php, on the webserver's side)? If not, how to compress the data?
Regards,
cycomate