From Dreamwidth Notes
Revision as of 13:47, 27 June 2009 by Sophira (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Memcache is a system used by Dreamwidth to lessen the amount of database access needed, by temporarily storing frequently-accessed information in memory for quick access. It was developed by Brad Fitzpatrick and is used in many high-profile websites, including Slashdot, Wikipedia, and, of course, LiveJournal (for which it was developed). Dreamwidth Studios also uses this system.

Using Memcache on a Dreamhack

To use memcache on a Dreamhack, do the following:

  • Contact the owner of the Dreamhack box you're using for a port to use with the memcached program; this will either be Sophie or Afuna.
  • Use screen to run this command:
memcached -m 8 -l -p <port>
...replacing <port> with the port number assigned to you in the previous step. If you need help with screen, feel free to contact Sophie. (A wiki page on this should be available in the future.)
  • Edit your etc/ file and look for the line:
#@MEMCACHE_SERVERS = ('hostname:port');
Change this to:
@MEMCACHE_SERVERS = ('<port>');
again replacing <port> with the appropriate port number. (Make sure also that the line is uncommented by removing the # at the front.)

Your Dreamhack should now be set up for memcache.