Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

where is your data cached?

1,229 views

Published on

Taking a look at the many layers of caching in the modern webstack can lead to some interesting optimizations. We know that raid card caches, disk caches and CPU caches all exist at the hardware level, but how do they interact with database caching, application code caching and rendered page caching. Where are the redundancies and where is the most optimal location for your services to cache? Are you risking data integrity by using both disk and raid card caching? Is there a similar risk in using both filesystem and database caching? These are hard won lessons if you have to learn them during an outage. they can be avoided with some forethought and benchmarking. I’ll call out the many layers where data is cached and talk about some of the risks and potential performance gains that we’ve found by selectively disabling and adding particular caching layers.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

where is your data cached?

  1. 1. where is your data cached? (and where should it be cached?) sarah novotny [email_address]
  2. 2. <ul><li>why do we cache? </li></ul><ul><li>count them </li></ul><ul><li>which are redundant? </li></ul><ul><li>which are a risk? </li></ul><ul><li>benchmarking </li></ul><ul><li>monitoring </li></ul>
  3. 3. <ul><li>why do we cache </li></ul>cache: a component that transparently stores data so that future requests for that data can be served faster
  4. 4. <ul><li>count them </li></ul>CPU caches (L1, L2, L3) disk caches disk controller caches database caches memcached layer application code caches http cache edge cache or CDN operating system caches
  5. 5. and then there were more DNS caching (ISP and client side) web proxies client side application caches and all the hardware caching again
  6. 6. <ul><li>a short diversion: </li></ul>my background is as an SA and DBA. i’ll be focusing data safety facets of caching
  7. 8. disk caches disk controller caches database caches memcached layer operating system caches
  8. 9. <ul><li>which are redundant? </li></ul>
  9. 10. get moving!
  10. 12. <ul><li>which are a risk? </li></ul>
  11. 13. disks lie
  12. 14. raid controllers lie (sometimes)
  13. 16. <ul><li>benchmarking </li></ul>
  14. 18. every infrastructure is different every benchmark has to take that into account
  15. 20. <ul><li>monitoring </li></ul>
  16. 21. measure multiple points only you can prevent firedrills
  17. 23. <ul><li>tools to manage </li></ul><ul><li>this insanity— </li></ul><ul><li>Innotop </li></ul><ul><li>Percona toolkit </li></ul><ul><li>sysbench </li></ul><ul><li>cacti templates </li></ul><ul><li>nagios </li></ul>
  18. 24. credits <ul><li>flickr </li></ul><ul><li>license plate – severud </li></ul><ul><li>tools – meanestindian </li></ul><ul><li>other </li></ul><ul><li>3ware image via http:// www.xbitlabs.com / </li></ul><ul><li>remaining images istockphoto </li></ul>
  19. 25. CIO Meteor Entertainment Program Chair OSCON Program Chair PLMCE Board Member Blue Gecko Chef Community MySQL Community [email_address] @sarahnovotny stuff I do

×