Caching technology comparison

5,246
-1

Published on

Dynacache and Data Replication Service vs Memcached

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
5,246
On Slideshare
0
From Embeds
0
Number of Embeds
40
Actions
Shares
0
Downloads
119
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Last update:
  • Caching technology comparison

    1. 1. <ul>Caching Technologies for Java Applications </ul><ul>Martin Presler-Marshall ICS Performance </ul>09/30/2011
    2. 2. <ul>Technologies </ul><ul><li>General object cache attributes
    3. 3. Memcached
    4. 4. DistributedMap (part of Dynacache) </li></ul>
    5. 5. <ul>General Object Cache Characteristics </ul><ul><li>An object cache is a Key-Value lookup table </li></ul><ul><ul><li>Similar to java.util.Hashtable </li></ul></ul><ul><li>Have configurable maximum sizes </li></ul><ul><ul><li>May be configured number of cache entries or memory size
    6. 6. Objects typically discarded on least-recently-used policy when cache is full </li><ul><li>Some caches may offer other algorithms, such as priority-based schemes </li></ul></ul></ul><ul><li>Have configurable lifetimes per cache entry </li><ul><li>Items are automatically discarded once lifetime is exceeded </li></ul></ul>
    7. 7. Overview: Cache Instances <ul><li>A cache instance is a logical grouping of cache keys & values
    8. 8. Identical keys in two separate cache instances do not collide
    9. 9. Cache statistics can typically be monitored on an instance level
    10. 10. Support for creating multiple instances varies by cache implementation </li></ul>
    11. 11. <ul>Overview: Memcached </ul><ul><li>“ Free & open source, high-performance, distributed memory object caching system” (from memcached.org)
    12. 12. Main components: </li></ul><ul><ul><li>memcached server – standalone server storing cached items </li><ul><li>Each cluster of servers is a single cache instance
    13. 13. To run multiple instances, must run multiple servers on each node </li></ul><li>memcached client software </li><ul><li>Available for multiple programming languages
    14. 14. Keys & values must be serialized, then transmitted over TCP/IP </li></ul></ul></ul><ul><li>Cluster design: </li></ul><ul><ul><li>Client uses hashing algorithm to assign keys to servers
    15. 15. Each key is cached on at most one server
    16. 16. Explicit invalidations go only to the server which should store that key </li></ul></ul>
    17. 17. <ul>Overview: DistributedMap </ul><ul><li>Built-in component in WAS Network Deployment </li></ul><ul><ul><li>Only available to Java clients </li></ul></ul><ul><li>Content is cached in JVM memory </li></ul><ul><ul><li>Cache operations are POJO calls </li></ul></ul><ul><li>Multiple cache instances can be created simply </li></ul><ul><ul><li>Each is treated separately for monitoring, synchronization, LRU and invalidation </li></ul></ul><ul><li>Cluster design: </li></ul><ul><ul><li>Cache keys may be cached in multiple nodes
    18. 18. Explicit invalidation notifies peers to discard the cache key
    19. 19. Option available to push entries to peers on cache insert </li></ul></ul>
    20. 20. Advantages: Dynacache <ul><li>Fast cache operations - the key raison d'etre for a cache </li><ul><li>Lookups through POJO calls - no network delays
    21. 21. No serialization/ deserialization of keys and values – lower CPU consumption </li></ul><li>Successful experience with many IBM products & customers </li><ul><li>We know how to use it well </li></ul><li>Mature, supported part of WAS
    22. 22. Integration points: Extreme Scale, OpenJPA </li></ul><ul><li>Flexibility </li><ul><li>Easy support for multiple cache instances
    23. 23. Priority-based LRU algorithm
    24. 24. Disk offload </li></ul><li>Monitoring/management tools: (PMI, Mbean, Cache Monitor) </li></ul>
    25. 25. Advantages: Memcached <ul><li>Does not consume memory in Java heap </li><ul><li>This is less important on a 64-bit JVM
    26. 26. We've successfully run WAS apps with 6+GB heaps </li></ul><li>Active community support </li><ul><li>...though available documentation is not great </li></ul><li>Usable in Tomcat, WAS CE, php applications
    27. 27. Used successfully by multiple public sites </li></ul><ul><li>Single instance of each cache key </li><ul><li>No peer-to-peer traffic on invalidations
    28. 28. A key inserted by one node is immediately available to all peers </li><ul><li>Typically will increase hit rates </li></ul></ul><li>Cache size increases as nodes are added
    29. 29. Free tools exist for monitoring </li><ul><li>...but somewhat hard to use </li></ul></ul>
    30. 30. Open Questions <ul><li>Need some direct performance comparisons </li><ul><li>Have done some limited benchmarking of memcached using various clients
    31. 31. Small-scale (single server, small cachesize) </li></ul><li>Monitor memcached servers in LotusLive performance environment </li><ul><li>May provide useful data on memcached performance in a nearly-real-world use case </li></ul></ul>
    1. A particular slide catching your eye?

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

    ×