Memcache acceleration (D6 port)

skiminki - March 13, 2009 - 08:53
Project:Radioactivity
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:skiminki
Status:closed
Description

Currently, radioactivity issues one insert-or-update to db for each node profile where node view energy is defined, per node view. For example, 3 different node popularity profiles means 3 insert-or-updates for each node view. For busy sites, this might pose some problems.

One possibility of eliminating these insert-or-updates is memcached-based acceleration. Instead of insert-or-updates per each view, an entry is written into memcache. Cron runs could process these entries and update db with only a few combined insert-or-updates. In essense, after this we'd have a small amount of communication with memcached per node view, and insert-or-update for each decay profile per cron-run. Sounds promising.

Let's investigate if this could work!

#1

skiminki - March 13, 2009 - 15:40

Ok, committed initial version of memcache acceleration into 5.x development branch:
http://drupal.org/cvs?commit=182998

To enable memcache acceleration:

  1. Enable memcache for either cache or session
  2. Configure memcache bin radioactivity. Preferably, this bin would use separate server(s) from bins used by caches to avoid lost energy additions. (Drupal cache bins are flushed constantly)
  3. Go to radioactivity admin page and enable memcache acceleration

To verify that memcache acceleration is really working, try:

  • Devel module to list all SQL statements
  • Enable SQL logging from mysql or postgresql
  • Use SQL monitor

You should see that radioactivity-related sql activity is shifted from node views to crons.

#2

skiminki - March 28, 2009 - 20:35
Status:active» fixed

This runs now in production and seems to be working as expected. So let's say this is fixed. Thanks to Uusi Suomi for sponsoring the development!

#3

skiminki - March 28, 2009 - 20:36
Title:Memcached acceleration» Memcache acceleration

#4

System Message - April 11, 2009 - 20:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#5

mcload - May 3, 2009 - 13:37
Status:closed» active

Is it committed to D6 too?

#6

skiminki - May 3, 2009 - 18:22
Title:Memcache acceleration» Memcache acceleration (D6 port)
Version:5.x-1.x-dev» 6.x-1.x-dev
Category:task» feature request

Nope, this is not yet ported to D6. Changed the title and version to reflect this feature request.

#7

viz8 - June 2, 2009 - 16:22

Subscribing

#8

skiminki - July 28, 2009 - 12:11
Status:active» fixed

D6 port implemented and committed: http://drupal.org/cvs?commit=243816

If you encounter problems, please re-open this issue.

#9

skiminki - July 31, 2009 - 15:53

Note that the D6-version stores all energy events into memcached and processes them at cron runs. The D5 version does this only for node views. Also, you can review the pending events in /admin/debug/radioactivity/memcache provided that radioactivity_debug is enabled (D6 only).

#10

System Message - August 14, 2009 - 16:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.