Problem/Motivation
Bug because this is a performance problem.
See #2765271: Rationalize use of the 'discovery' cache bin, since it's stored in the limited size APCu by default for background and data. views_data is in my case 3MB of data, storing that in apcu is not a good idea. We also don't need it on most requests.
Proposed resolution
Two options:
1. Easy: Completely move all entries to the data cache bin. Do so by changing the service definition for the token service and pass in cache.data instead of cache.discovery.
2. A bit more complicated: Add data as a second cache bin, store the full cache in there, the tables still in discovery.
I would suggest we start with 1. On my pretty big site with empty render cache, my frontpage loaded 19 tables from cache. I didn't count but I expect that e.g. render cache did a lot more cache gets there.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#15 | change_viewsdata_to_use-2824547-15.patch | 679 bytes | faline |
#10 | change_viewsdata_to_use-2824547-10.patch | 676 bytes | Ginovski |
#8 | change_viewsdata_to_use-2824547-8.patch | 5.71 KB | Ginovski |
Comments
Comment #2
BerdirComment #3
BerdirComment #4
dawehnerYeah let's go with 1)
If you have to handtune on that level of detail, you probably have much bigger issues you can solve in the first place.
Comment #5
Wim LeersYep, let's go with option 1. Much simpler.
Comment #6
Wim LeersComment #7
catchThe individual tables should only be queried when views is a render cache miss anyway, so agreed seems fine to move the whole lot - going to be small compared to actually running the query and rendering the view.
Comment #8
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commented1. Changed the services to pass cache.data instead
Comment #9
BerdirThat's too much. *Only* ViewsData must be changed.
Comment #10
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedChanged only Viewsdata.
Comment #11
Wim LeersComment #12
Berdir+1, #2824548: Move token info cache to data cache bin shows the size of cache_discovery before/after applying the two patches.
Comment #13
catchLike the token issue, this should use cache.default I think. cache.data is for unbounded items.
Comment #14
Wim LeersComment #15
faline CreditAttribution: faline at CI&T commentedChange cache.data to cache.default
Comment #16
Wim LeersPerfect, thank you! :)
Comment #17
alexpottComment #18
alexpottCommitted 11c68ce and pushed to 8.3.x. Thanks!
Comment #21
xjm