Articles

Informative articles on various technologies ...

Incremental backup of Drupal using rsync to iBackup.com

Rsync is a remote file sync protocol written by the same people who brought us the Samba project.

Rsync copies files from one location to another keeping both copies in sync. This means that files changed on location A will be copied to B and vice versa.

Rsync is also used by ibackup.com is a commerical service for online backup and online storage.

Contents: 

How many ways can you theme user profile pages?

Some sites need extra customization to make pages look a certain way. This is often done via theme customization.

One area that often advanced clients ask for is the user profile page. Drupal core offers pages based on profile categories, which each category listing the fields that belong to it.

The following methods require some additional programming.

Contents: 

Hosting Virtualization: Virtuozzo/OpenVZ vs. Xen, which is best?

Since 2bits moved into using VPS (Virtual Private Servers) when Xen became available we did not have to directly use other technologies, such as Virtuozzo, OpenVZ (free version of Virtuozzo), or the older User Mode Linux.

However, two recent cases proved what we have suspected for a long time: that indeed Xen is superior to competing technologies when it comes to performance.

Contents: 

Writing a simple node_access module: resume access

One of the powerful features in Drupal is the node_access system. This is an API within Drupal which allows modules to do fine grained access access contol to individual nodes.

If you are using Drupal core, this system does nothing. You need to either enable one of the many node access modules, or write your own module to do that.

Writing a simple specialized node access module is what this article covers.

Contents: 

Native PHP compilers: Roadsend

Roadsend's PHP Compiler is now open source!

It moves PHP into directions never possible before, by compiling PHP into native executables on Linux, FreeBSD and Windows. It does not depend on Zend's PHP engine at all.

It has some drawbacks though: it requires Scheme to compile it (more work), does not support PHP 5 (stuck with PHP4), and has no 64-bit version yet (my test server is AMD64 native 64bit).

After compiling your PHP application, you can run it using the built in microserver, or as a FastCGI process.

Contents: 

Apache 2 and PHP5 on Ubuntu Feisty: bloated?

In the past, we were able to reduce the size of an Apache 2 process to 10-12M (resident set size), by using eAccelerator, and disabling all unnecessary modules.

Last week we ran a Drupal caching benchmark on Ubuntu Feisty (7.04) and noticed that we cannot run as many concurrent processes as we used to under Ubuntu Edgy (6.10). After running the following command against Drupal 5.1:

Contents: 

advcache and memcached benchmarks with Drupal

Robert Douglass has been working on two very interesting and promising modules that should boost Drupal's performance significantly. One is the memcache module and the other is Advcache (Advanced Cache).
Robert posted a request for benchmarks, with an overview of the modules, so here they are.
The benchmarks turned out to be normal Drupal caching with and without memcache. Advanced Caching could not be tested on plain 5.1.

Testing environment

We used a simple setup, with memcached on the same server that is running Drupal. In a real production environment, memcached would be distributed over several servers, and Drupal would be running on one or more web servers, and a database server.

The hardware consists of the following:

  • AMD64 3000+
  • 1GB RAM
  • WD 160GB SATA

The software is as follows:

  • Ubuntu Feisty 7.04, AMD 64bit kernel
  • PHP 5.2.1
  • MySQL 5.0.38
  • eAccelerator 0.9.5.1
  • Drupal 5.1

The tests were simple too, they consisted of 500 requests to the home page anonymously, with a concurrency of 5.

The command used is ab -n500 -c5 http://example.com/

Contents: 

Installing eAccelerator 0.9.5.1 on Ubuntu Feisty 7.04

In a previous article on op-code cache benchmarking, we briefly mentioned instructions on installing eAccelerator from source.

We now expand these instructions a bit to update that for installing on Ubuntu Feisty 7.04.

Download eAccelerator

First, download eAccelerator 0.9.5.1 from the project's web site. Note that 0.9.5.1 has a patch for PHP 5.2.x which Ubuntu Feisty installs by default.

Contents: 

Displaying previous/next thumbnails for image nodes

A recent request for a site that uses the image module was to have easier navigation for their collection. The requirements was to have the thumbnail of the previous and next image below the image that is being displayed as a visual cue for the user so they click on the ones that interest them.

Of course, with a bit of magic, this is perfectly possible.

Two pieces of code are needed. The first go into the template.php of the theme you are using.

In this file, add the following function:

Contents: 

Pages

Subscribe to RSS - Articles