01-scaling-across-cores 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. 01-scaling-across-cores
  2. Introduction
  3. ------------
  4. The general issue is how to insure that the resolver scales.
  5. Currently resolvers are CPU bound, and it seems likely that both
  6. instructions-per-cycle and CPU frequency will not increase radically,
  7. scaling will need to be across multiple cores.
  8. How can we best scale a recursive resolver across multiple cores?
  9. Some possible solutions:
  10. a. Multiple processes with independent caches
  11. b. Multiple processes with shared cache
  12. c. A mix of independent/shared cache
  13. d. Thread variations of the above
  14. All of these may be complicated by NUMA architectures (with
  15. faster/slower access to specific RAM).
  16. How does resolution look like:
  17. Receive the query. @# <------------------------\
  18. | |
  19. | |
  20. v |
  21. Parse it, etc. $ |
  22. | |
  23. | |
  24. v |
  25. Look into the cache. $# |
  26. Cry <---- No <---------- Is it there? -----------> Yes ---------\ |
  27. | ^ | |
  28. Prepare upstream query $ | | |
  29. | | | |
  30. v | | |
  31. Send an upstream query (#) | | |
  32. | | | |
  33. | | | |
  34. v | | |
  35. Wait for answer @(#) | | |
  36. | | | |
  37. v | | |
  38. Parse $ | | |
  39. | | | |
  40. v | | |
  41. Is it enough? $ ----> No ---------/ | |
  42. | | |
  43. Yes | |
  44. | | |
  45. \-----------------------> Build answer $ <----------------------/ |
  46. | |
  47. | |
  48. v |
  49. Send answer # -----------------------------/
  50. Legend:
  51. * $ - CPU intensive
  52. * @ - Waiting for external event
  53. * # - Possible interaction with other tasks