0
where is your data cached? (and where should it be cached?) sarah novotny [email_address]
<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...
<ul><li>why do we cache </li></ul>cache: a component that transparently stores data so that future requests for that data ...
<ul><li>count them </li></ul>CPU caches (L1, L2, L3) disk caches disk controller caches database caches memcached layer ap...
and then there were more DNS caching (ISP and client side) web proxies client side application caches and all the hardware...
<ul><li>a short diversion: </li></ul>my background is as an SA and DBA.  i’ll be focusing data safety facets of caching
 
disk caches disk controller caches database caches memcached layer operating system caches
<ul><li>which are redundant? </li></ul>
get moving!
 
<ul><li>which are a risk? </li></ul>
disks lie
raid controllers lie (sometimes)
 
<ul><li>benchmarking </li></ul>
 
every infrastructure  is different every benchmark has to take that into account
 
<ul><li>monitoring </li></ul>
measure multiple points only you can  prevent firedrills
 
<ul><li>tools to manage </li></ul><ul><li>this insanity— </li></ul><ul><li>Innotop </li></ul><ul><li>Percona toolkit </li>...
credits <ul><li>flickr </li></ul><ul><li>license plate – severud </li></ul><ul><li>tools – meanestindian </li></ul><ul><li...
CIO Meteor Entertainment Program Chair OSCON Program Chair PLMCE Board Member Blue Gecko Chef Community MySQL Community [e...
Upcoming SlideShare
Loading in...5
×

where is your data cached?

869

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
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
869
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • fundamentally we cache to improve speed. that’s accomplished by moving data to the furthest out point in a architecture that it can safely reside. pushing that data out as close to the client as possible.
  • how many caching points do you think there are in a modern web stack? I’m sure I’ve missed some that happen but I counted 9 that I see in most architectures.
  • client side once I’ve expanded the hardware caching again I count 6.
  • Choose 5.1 or 5.4 only if you need the featuresets.
  • Choose 5.1 or 5.4 only if you need the featuresets.
  • Choose 5.1 or 5.4 only if you need the featuresets.
  • Choose 5.1 or 5.4 only if you need the featuresets.
  • Choose 5.1 or 5.4 only if you need the featuresets.
  • Choose 5.1 or 5.4 only if you need the featuresets.
  • •❑ disk•❑memory•❑up/down•❑cachehit -- baseline defiinition•❑replication •❑ mktablesync•❑mkchecksum
  • Transcript of "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
    1. A particular slide catching your eye?

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

    ×