CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • massive performance improvement from MYSQL_CLIENT_COMPRESS
Pages: [1]

Author Topic: massive performance improvement from MYSQL_CLIENT_COMPRESS  (Read 3821 times)

rimu

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6
massive performance improvement from MYSQL_CLIENT_COMPRESS
January 15, 2010, 04:48:40 pm
We've been using CiviCRM on Drupal to manage a few tens of thousands of contacts for a while now, and the performance has always been terrible - several seconds delay when loading any page.

Until now. The fix was to simply add the MYSQL_CLIENT_COMPRESS flag to the connect() call in include/database.mysqli.inc. So you end up with something like

@mysqli_real_connect($connection, $url['host'], $url['user'], $url['pass'], substr($url['path'], 1), $url['port'], NULL, MYSQLI_CLIENT_FOUND_ROWS|MYSQL_CLIENT_COMPRESS);

There's a discussion on drupal.org about this (along with a bunch of hand-waving by the core team about why they aren't going to add an option for compression of the DB connection):  http://drupal.org/node/11891

This would probably only make a difference if you have a separate MySQL server from your web server, as we do. There may be an underlying issue with our network that is causing slow communication (and necessitating compression in the first place!) that we don't know about yet, but probably not.

rimu

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6
Re: massive performance improvement from MYSQL_CLIENT_COMPRESS
January 19, 2010, 01:17:11 pm
The root of the problem seems to be something to do with how drupal's menus are cached, because the slow queries are the ones that retrieve the menus from the cache. So our performance issues may have more to do with drupal than civicrm.

Maybe this will be of use to someone, someday, anyway.

kung

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: 5
  • CMS version: Drupal 6 or 7
  • MySQL version: 5
  • PHP version: 5
Re: massive performance improvement from MYSQL_CLIENT_COMPRESS
March 03, 2012, 04:39:01 pm
Thanks very much for this tip.  I'm using Drupal too and have 300K contacts and am doing everything I can for speed.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • massive performance improvement from MYSQL_CLIENT_COMPRESS

This forum was archived on 2017-11-26.