Your SlideShare is downloading. ×
0
Memcache
Lightning fast object retrieval




                                  1
Site too slow?




                 2
Can’t serve all requests?




                            3
Memcache
may be for you.
    But maybe not.




                     4
Do you have spare
      resources?

• Spare memory?
 • webserver
 • fileserver
 • database server


                       5
What’s cheapest to add?


• More webservers?
• More database servers?
• More memory servers?


                           6
Memory servers are
       cheap

• You may have spare memory on your
  network
• Memory servers don’t need hard disks
• Me...
Memory cache can turn
   down the heat

• Less PHP processing
• Fewer database queries



                           8
Advantages of
         Memcache

• Memory based and fast
• Keys and bytes (anything goes in)
• Cache things only once


  ...
Redundant caches




                   10
Single shared cache




                      11
What do you need?



                    12
Memcached server

http://danga.com/
  memcached/

                    13
Memcache PECL
   extension

http://pecl.php.net/
package/memcache

                       14
Spare memory.
  4MB - nGB


                15
Memcache Drupal
      module

http://drupal.org/projects/memcache




                                      16
Memcache Drupal
       module

• A module
• An include file /includes/memcache.inc
• Patches


                            ...
Why do you need
        patches?
• We’re caching things that Drupal normally
  doesn’t cache
  • Built nodes
  • Taxonomy ...
Who should use
       memcache?

• A personal blog (Apache, MySql on one box)
  Page requests went from 400ms to 100ms



...
Large Media site


• Handles yearly spikes by adding a cluster of
  memcache servers during the spike




                ...
21
Soon to come
• Admin section
 • Statistics
 • Clustering
 • Bins
• Greater abstraction at the Drupal cache
  layer



    ...
Upcoming SlideShare
Loading in...5
×

Memcache - Lightning fast object retrieval

841

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
841
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Memcache - Lightning fast object retrieval"

  1. 1. Memcache Lightning fast object retrieval 1
  2. 2. Site too slow? 2
  3. 3. Can’t serve all requests? 3
  4. 4. Memcache may be for you. But maybe not. 4
  5. 5. Do you have spare resources? • Spare memory? • webserver • fileserver • database server 5
  6. 6. What’s cheapest to add? • More webservers? • More database servers? • More memory servers? 6
  7. 7. Memory servers are cheap • You may have spare memory on your network • Memory servers don’t need hard disks • Memory servers don’t need fast CPUs 7
  8. 8. Memory cache can turn down the heat • Less PHP processing • Fewer database queries 8
  9. 9. Advantages of Memcache • Memory based and fast • Keys and bytes (anything goes in) • Cache things only once 9
  10. 10. Redundant caches 10
  11. 11. Single shared cache 11
  12. 12. What do you need? 12
  13. 13. Memcached server http://danga.com/ memcached/ 13
  14. 14. Memcache PECL extension http://pecl.php.net/ package/memcache 14
  15. 15. Spare memory. 4MB - nGB 15
  16. 16. Memcache Drupal module http://drupal.org/projects/memcache 16
  17. 17. Memcache Drupal module • A module • An include file /includes/memcache.inc • Patches 17
  18. 18. Why do you need patches? • We’re caching things that Drupal normally doesn’t cache • Built nodes • Taxonomy terms, vocabularies, trees • Comments • Paths 18
  19. 19. Who should use memcache? • A personal blog (Apache, MySql on one box) Page requests went from 400ms to 100ms 19
  20. 20. Large Media site • Handles yearly spikes by adding a cluster of memcache servers during the spike 20
  21. 21. 21
  22. 22. Soon to come • Admin section • Statistics • Clustering • Bins • Greater abstraction at the Drupal cache layer 22
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×