How to reduce size of ibdata1 file in MySQL

If you use Innodb engine for your MySQL database, you may have noticed that the /var/lib/mysql/ibdata1 file is the most important and heavy file of your MySQL server. Day by day, this file will increase and can quickly consume all your hard drive. Reducing its size can be a little bit tricky. When "innodb _ file _ per _ table" is set to "0" in your my.cnf file, the ibdata1 file normally stores many classes of information, such as table data, table indexes, MVCC (Multiversioning Concurrency Control) data, table metadata, and so on. You can check this if you want a well explained schema. Many people create multiple ibdata files hoping for better diskspace management and performance. It does not help. Unfortunately, OPTIMIZE TABLE against an InnoDB table stored in ibdata1 does two things: Makes the table's data and ...

How to install Memcache for Drupal

If you host a high traffic website, you probably have already wondered how to improve performances and reduce the load of your web server. To do this, you can start to optimize Apache and MySQL parameters, but at the end, you will always need powerful caching systems. In my opinion, the two important ones for a PHP website are APC (to cache PHP opcode) and Memcache (database oriented). Of course, you can also work with Redis, Varnish, and so on. This tutorial will help you to set up Memcache on a Apache/MySQL Debian 6 server, to use it with Drupal. It may work without troubles on Ubuntu server too. Method On your web server, run the following commands to install everything: apt-get update apt-get install memcached libmemcached-tools apt-get install php5-dev php-pear make apt-get install php5-memcached pecl install memcache-3.0. ...

Display Memcached stats like APC stats

Everybody knows this "cool" APC stats page where you can find all useful information about this powerful caching system. When you first install Memcached, you can be a little bit lost without such information, but the good thing is that a very nice guy (Harun Yayli) has written the same page for Memcache ! You can download this nice file here. ...